bazelbuild / bazelbuild/rules_apple
GenerateAppleSymbolsFile fails with permission error
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
I'm running a build with `+output_groups=dsym` and in some conditions in CI, the build fails with the following error:
`Failed to write bazel-out/applebin_ios-ios_arm64-opt-ST-55c05c3eeee9/bin/XXXXXXXXXXXX.framework-intermediates/symbols_output/0D911365-E3B1-37ED-AFC6-D4FBB0160CB1.symbols: You don’t have permission to save the file “0D911365-E3B1-37ED-AFC6-D4FBB0160CB1.symbols” in the folder “symbols_output”.`
When looking at the directory, it is indeed read-only but I'm failing to understand why `actions.declare_directory` from https://github.com/bazelbuild/rules_apple/blob/96fa885dd8310ddc65289e590f31d1f3b25f46d9/apple/internal/intermediates.bzl#L43 fails to give the rule a directory that can be written to.
This happens when running the same build multiple times, I'll try to find a sure way to reproduce it, but would be happy to get any insight in the meantime if you have any.
Contributor guide
Research direction
Start at apple/internal/intermediates.bzl around line 43, where actions.declare_directory is used, and reproduce the repeated CI build with +output_groups=dsym. Inspect the permissions of symbols_output and the generated .symbols path across repeated builds. Done means identifying why the declared directory becomes read-only and ensuring GenerateAppleSymbolsFile can write its output.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100