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

Update unknown Xcode version error message and provide an environment variable to force re-evaluation #19512

Conversation

brentleyjones
Copy link
Contributor

@brentleyjones brentleyjones commented Sep 13, 2023

As of c747ae7, you need to run bazel sync --configure instead of bazel shutdown, to force re-finding of Xcode versions.

Certain setups have a hard time running that new command, versus previously only having to cause Bazel to restart. To accommodate that, I’ve also added the XCODE_VERSION variable to environ (to match a similar use defined here: bazelbuild/apple_support@ddf25c2), which allows those setups to force the re-evaluation by using --repo_env. And since the default attribute is influenced by DEVELOPER_DIR, I've included that in environ as well.

… variable to force re-evaluation

As of c747ae7, you need to run `bazel sync --configure` instead of `bazel shutdown`, to force re-finding of Xcode versions.

Certain setups have a hard time running that new command, versus previously only having to cause Bazel to restart. To accommodate that, I’ve also added the `XCODE_VERSION` variable to `environ` (to match a similar use defined here: bazelbuild/apple_support@ddf25c2), which allows those setups to force the re-evaluation by using `--repo_env`.

Signed-off-by: Brentley Jones <github@brentleyjones.com>
@brentleyjones brentleyjones requested review from lberki and a team as code owners September 13, 2023 18:31
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Sep 13, 2023
@fmeum
Copy link
Collaborator

fmeum commented Sep 13, 2023

@brentleyjones Could you elaborate on what challenges are linked to running bazel sync --configure?

(The PR is totally fine, I just want to understand this better.)

@brentleyjones
Copy link
Contributor Author

In rules_xcodeproj we have nested Bazel invocations and output bases. Users don't run commands on the nested output bases, so if they run bazel sync --configure, it will only adjust the outer output base, leading to the one used by Xcode to still be incorrectly configured. The same can happen for any other setup that uses different output bases (for example scripts/tools).

Signed-off-by: Brentley Jones <github@brentleyjones.com>
@sgowroji sgowroji added the team-Rules-ObjC Issues for Objective-C maintainers label Sep 14, 2023
@brentleyjones brentleyjones added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Sep 14, 2023
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Sep 15, 2023
@brentleyjones
Copy link
Contributor Author

@bazel-io flag

@brentleyjones brentleyjones deleted the bj/update-unknown-xcode-version-error-message-and-provide-an-environment-variable-to-force-re-evaluation branch September 15, 2023 12:39
@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Sep 15, 2023
@iancha1992
Copy link
Member

@bazel-io fork 6.4.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Sep 15, 2023
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Sep 15, 2023
… variable to force re-evaluation

As of c747ae7, you need to run `bazel sync --configure` instead of `bazel shutdown`, to force re-finding of Xcode versions.

Certain setups have a hard time running that new command, versus previously only having to cause Bazel to restart. To accommodate that, I’ve also added the `XCODE_VERSION` variable to `environ` (to match a similar use defined here: bazelbuild/apple_support@ddf25c2), which allows those setups to force the re-evaluation by using `--repo_env`. And since the `default` attribute is influenced by `DEVELOPER_DIR`, I've included that in `environ` as well.

Closes bazelbuild#19512.

PiperOrigin-RevId: 565610471
Change-Id: Ideca7165308ce53fdf1ce22b31eeb7a9e681dedc
iancha1992 pushed a commit that referenced this pull request Sep 15, 2023
…ironment variable to force re-evaluation (#19540)

As of c747ae7, you need to run `bazel
sync --configure` instead of `bazel shutdown`, to force re-finding of
Xcode versions.

Certain setups have a hard time running that new command, versus
previously only having to cause Bazel to restart. To accommodate that,
I’ve also added the `XCODE_VERSION` variable to `environ` (to match a
similar use defined here:
bazelbuild/apple_support@ddf25c2),
which allows those setups to force the re-evaluation by using
`--repo_env`. And since the `default` attribute is influenced by
`DEVELOPER_DIR`, I've included that in `environ` as well.

Closes #19512.

Commit
19979e6

PiperOrigin-RevId: 565610471
Change-Id: Ideca7165308ce53fdf1ce22b31eeb7a9e681dedc

Co-authored-by: Brentley Jones <github@brentleyjones.com>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 6.4.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-ObjC Issues for Objective-C maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants