Skip to content

[Jobs] Switch EmitSupportedFeaturesJob to use `-emit-supported-argu… #1875

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

Closed
wants to merge 1 commit into from

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Apr 15, 2025

…ments` option

This is a driver side change for swiftlang/swift#80833

@xedin
Copy link
Contributor Author

xedin commented Apr 15, 2025

swiftlang/swift#80833
@swift-ci please test

@@ -31,7 +30,7 @@ extension Toolchain {
var commandLine: [Job.ArgTemplate] = swiftCompilerPrefixArgs.map { Job.ArgTemplate.flag($0) }
var inputs: [TypedVirtualPath] = []
commandLine.append(contentsOf: [.flag("-frontend"),
.flag("-emit-supported-features")])
.flag("-emit-supported-arguments")])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are in a place where, unfortunately, this code needs to be compatible with compilers that do not yet have swiftlang/swift#80833, so we must maintain compatibility with both. So we need something like:

if isFrontendArgSupported(.emitSupportedArguments) {
  commandLine.append(.flag("-emit-supported-arguments"))
} else {
  commandLine.append(.flag("-emit-supported-features"))
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I leave it as -features for now then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, I don't think that we can actually do that since this call is the source of "supported arguments" :)

@artemcm
Copy link
Contributor

artemcm commented Apr 15, 2025

swiftlang/swift#80833 @swift-ci please test

There is no cross-repository testing in this direction, so in order to test this in CI, swiftlang/swift#80833 needs to get merged and then make it into a nightly snapshot (which is what swift-driver CI uses).

`-emit-supported-features` didn't actually support "features".
The compiler now has an alias to `emit-supported-arguments` to
make sure that this is not confused with `-print-supported-features`
in the future.
@xedin xedin force-pushed the emit-supported-arguments branch from 53070c0 to 87aec6a Compare April 17, 2025 18:38
@xedin
Copy link
Contributor Author

xedin commented Apr 17, 2025

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Apr 17, 2025

@swift-ci please test Windows platform

@xedin
Copy link
Contributor Author

xedin commented Apr 17, 2025

Closing this for now since we need maintain backward compatibility.

@xedin xedin closed this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants