wide-midnight-78598
03/19/2022, 11:52 PMPackage.swift
in swift or package.json
with Node stuff), should those be pulled in and used as a compilation target in lieu of bundling all sources?
I'm not sure if a Slack thread is even the best mechanism for this, as it almost feels like a Pants "evolution" type of question. I'm kinda caught between the two cases, since I don't like duplicating work, but I see the value in going all native Pants too, but, then I think about overreach - and it all spirals in my brain.
To clear up something/anything, what I'm trying to describe would be the difference between the following (noting that in both cases, the entire folder and subfolders would be pulled into a hermetic environ):
a) swift build
in a folder with a Package.swift
which then references the sources/tests
b) swiftc Sources/File1.swift Sources/File2.swift
in the "manual" version which would have a swift_sources
targetbitter-ability-32190
03/20/2022, 12:35 AMbitter-ability-32190
03/20/2022, 12:37 AMpackage-lock.json
)fast-nail-55400
03/20/2022, 2:06 AMgo build
— it actually invokes go tool compile
and go tool link
so Pants can control the compilation precisely and capture the package archives produced.fast-nail-55400
03/20/2022, 2:06 AMfast-nail-55400
03/20/2022, 2:07 AMfast-nail-55400
03/20/2022, 2:08 AMswiftc
fast-nail-55400
03/20/2022, 2:09 AMswift build
— otherwise it might have the same problem as using go build
— pants does not get to capture intermediate outputs into the Pants cachewide-midnight-78598
03/20/2022, 4:14 AM