-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement swift-get-version
in SwiftPM
#6840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please smoke test |
Linux smoke test failure is a compiler issue:
|
8be50bf
to
c14ce02
Compare
swift-get-version
in SwiftPM
return [] | ||
} | ||
guard let tool = buildDescription.copyCommands[command.name] else { | ||
guard let tool = buildDescription.writeCommands[command.name] else { | ||
self.context.observabilityScope.emit(error: "command \(command.name) not registered") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously completely wrong and was always returning an empty signature.
That error means the freshly-built trunk compiler is dynamically linking against the 5.8 Swift stdlib somehow, though I'm not sure how that's possible unless you're modifying I know this because I had to fix it when compiling the Aug. 10 trunk source snapshot natively on Android recently, because some test runners and SwiftPM were actually dynamically linked against the Swift 5.8 stdlib, then failing because it doesn't have that Note that Swift 5.8.1 was just pre-installed to the linux CI yesterday, swiftlang/swift-docker#346. Pinging @bnbarham, since you're dealing with installing a prebuilt release toolchain to the linux CI. |
It's the same issue as your other PR. The PR I linked there will fix it, sorry for the noise. |
No, my 5.9 pull has a different error when linking the
Looking into this pull's build log further, it is failing in the compiler build when building a backtrace file, which is quite strange, since it's able to build other stdlib files fine. I notice an This probably worked before because the runpath is already set for the freshly-built trunk Swift compiler to use the freshly-built stdlib, but now it is somehow picking up the 5.8 stdlib instead? I'm still not sure where it's getting the path to the 5.8 stdlib. |
It's a different error, but the underlying cause is the similar - we hit this on other jobs. If my PR doesn't fix this I'll look into it further. |
I'm fairly certain disabling building early swift driver/syntax won't fix this backtrace build error seen here, but I'm happy to be proven wrong. Let's see. |
@swift-ci please smoke test linux |
c14ce02
to
2b35cad
Compare
swift-get-version
in SwiftPMswift-get-version
in SwiftPM
swiftlang/swift#68094 |
@swift-ci please test windows |
swiftlang/swift#68094 is for 5.9, not sure if it will work with this trunk pull, you want swiftlang/swift#68091. |
swiftlang/swift#68091 |
@swift-ci please test windows |
swiftlang/swift#68091 |
@swift-ci please test windows |
Looks like your new test is failing on the self-hosted linux run, putting aside the upstream issues with the smoke test. |
Yep, this looks like a real issue with my PR |
I think the issue is that the script I am using in the test doesn't work on Linux as is:
|
swiftlang/swift#68091 |
@swift-ci please test windows |
@swift-ci please smoke test windows |
@swift-ci please test windows |
¯\_(ツ)_/¯ |
@swift-ci please test windows |
1 similar comment
@swift-ci please test windows |
Seems like Windows CI is just broken now
cc @shahmishal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of small suggestions / questions
macOS smoke test failure
I guess the PR has been merged since I kicked off the build. A bit unfortunate that we essentially have a multi-hour race condition window? |
I'm so sorry :(. All the PRs are merged now |
You were right, @bnbarham, disabling those other products fixed this build. Oh well, something to watch out for when you enable them again, I think |
Feels weird that self-hosted is also affected by merging a PR, even though it doesn't even support cross-repo testing at all. With macOS hosts always pretty backed up, it might be nice to just fall back to |
@swift-ci please smoke test macOS |
@swift-ci please test windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark the test to be skipped on all platforms but Darwin. The introduction of bash means that the test is not portable. (Debian doesn't default to including bash, it uses dash
as a portable ash
, windows does not have bash
either).
Debian is not a supported platform, skipping the test for Windows seems fine, but I'd like to do this in a follow up since we really should be fixing this regression. |
Actually looks like we did make any existing tests using bash scripts macOS only, so makes sense to do it for this as well. Still don't agree that this is a merge blocker, we are not running these tests on any affected platforms AFAIK. |
Wondering if I just take a different approach from a bash script and just write a small Swift program which can be a dependency of this test. That way it could hopefully be more portable. |
The changes in #6585 meant that we are no longer using LLBuild's built-in tracking of Swift compiler versions. We are lacking the infrastructure to really use that for the same purpose since we are now running the Swift compiler as a shell-tool, so this is adding a poor man's version of that. We have a task that writes the output of `swift -version` for a particular Swift compiler path to the build directory and all Swift tasks that are using that compiler depend on that file as an input. This should give us the desired behavior of the tasks re-running if the Swift version changes. rdar://114047018
d9b8920
to
5f48133
Compare
@swift-ci please smoke test |
@swift-ci please test windows |
The changes in #6585 meant that we are no longer using LLBuild's built-in tracking of Swift compiler versions. We are lacking the infrastructure to really use that for the same purpose since we are now running the Swift compiler as a shell-tool, so this is adding a poor man's version of that.
We have a task that writes the output of
swift -version
for a particular Swift compiler path to the build directory and all Swift tasks that are using that compiler depend on that file as an input. This should give us the desired behavior of the tasks re-running if the Swift version changes.rdar://114047018