Skip to content

Copy files into local_config_apple_cc instead of symlinking#355

Merged
brentleyjones merged 1 commit intomasterfrom
bj/copy-files-into-local_config_apple_cc-instead-of-symlinking
Dec 13, 2024
Merged

Copy files into local_config_apple_cc instead of symlinking#355
brentleyjones merged 1 commit intomasterfrom
bj/copy-files-into-local_config_apple_cc-instead-of-symlinking

Conversation

@brentleyjones
Copy link
Copy Markdown
Collaborator

@brentleyjones brentleyjones commented Dec 13, 2024

There is a bug in Bazel where the repository symlinks can resolve (nondeterministically in a race condition way) to old contents of files. This leads to errors like:

ERROR: error loading package '@@apple_support~~apple_cc_configure_extension~local_config_apple_cc//': Encountered error while reading extension file 'cc_toolchain_config.bzl': Unexpected short read from file '/Users/brentley.jones/Developer/rules_xcodeproj/bazel-output-base/external/apple_support~~apple_cc_configure_extension~local_config_apple_cc/cc_toolchain_config.bzl' (expected 100570, got 95733 bytes)

or

ERROR: /Users/brentley.jones/Developer/rules_xcodeproj/bazel-output-base/external/apple_support~~apple_cc_configure_extension~local_config_apple_cc/cc_toolchain_config.bzl:2667:23: syntax error at 'newline': expected ]

There is a bug in Bazel where the symlinks can resolve (nondeterministically in a race condition way) to old contents of files. This leads to errors like:

```
ERROR: error loading package '@@apple_support~~apple_cc_configure_extension~local_config_apple_cc//': Encountered error while reading extension file 'cc_toolchain_config.bzl': Unexpected short read from file '/Users/brentley.jones/Developer/rules_xcodeproj/bazel-output-base/external/apple_support~~apple_cc_configure_extension~local_config_apple_cc/cc_toolchain_config.bzl' (expected 100570, got 95733 bytes)
```

or

```
ERROR: /Users/brentley.jones/Developer/rules_xcodeproj/bazel-output-base/external/apple_support~~apple_cc_configure_extension~local_config_apple_cc/cc_toolchain_config.bzl:2667:23: syntax error at 'newline': expected ]
```

Signed-off-by: Brentley Jones <github@brentleyjones.com>
@brentleyjones brentleyjones merged commit 8d477fc into master Dec 13, 2024
@brentleyjones brentleyjones deleted the bj/copy-files-into-local_config_apple_cc-instead-of-symlinking branch December 13, 2024 20:49
@keith
Copy link
Copy Markdown
Member

keith commented Dec 13, 2024

+1

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.

3 participants