Skip to content
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

[SR-13497] [build-script] Check Xcode version and provide a warning/error if it's below the supported version #55939

Closed
typesanitizer opened this issue Sep 4, 2020 · 5 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@typesanitizer
Copy link

Previous ID SR-13497
Radar rdar://problem/68318696
Original Reporter @typesanitizer
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Project Infrastructure
Labels Bug
Assignee @kastiglione
Priority Medium

Watchers: @shahmishal

md5: 02b344090cf589abb5f59c959b1f6479

Issue Description:

From Dave Lee's comment on my documentation PR (#33786 (comment)

It would be ideal if an Xcode version check happened within scope of build-script, to fail early and report the issue in a clear way.

I've been bit before: using the wrong Xcode still kicks off a build, and then some point in the build, maybe a while later, a compilation error happens. The error is not likely to point to Xcode version as the root cause, which leads to searches for keywords found in the error message. If the person is lucky, someone else has already hit the error, posted on the forums, and received help telling them they need to use a newer version of Xcode.

It would be nice to have a check + error for this, which you could override with (say) a flag.

@typesanitizer
Copy link
Author

@swift-ci create

@shahmishal
Copy link
Member

I think we should have a warning message because this will cause issues when we are testing new Xcode versions.

Option A: Create a script which can check the system config and provide clear message what is missing/invalid.

Option B: Add an option to build-script to fail if the config does not match (--check-xcode-version) or something similar to it.

Option C: Provide a warning at the top of the log about the wrong Xcode version.

@typesanitizer
Copy link
Author

I don't think it should be opt-in (because that puts the burden of passing the flag on new contributors), it should be opt-out.

Option A and Option C both sound reasonable. If we go with Option A, I would prefer that build-script invoke the system config checking script so that everyone is using it. Otherwise, what might end up happening is that only people who are building things the first time use it, and then it gets out-dated. With Option C, it would be nice to present the output in an easily identifiable way (say using colorful output), so that when you're scrolling through the log, you'll notice that immediately.

@typesanitizer
Copy link
Author

cc @kastiglione ^^

@kastiglione
Copy link
Contributor

@keith has opened this PR #34227

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

3 participants