-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use llbuild's new content-exclusion-patterns
node attribute to prevent it from descending into .build
and .git
directories
#5594
Conversation
I'm actually not sure how a custom scratch directory could be excluded in a way that wouldn't have side effects — at the llbuild level, the exclusion is for directory entries and contains just names (last path components), so if the scratch directory is |
@swift-ci please smoke test |
Confirmed that this fixes the problem, when the latest llbuild is used, and with the test case from #5482. Surprisingly using |
…ent it from descending into `.build` and `.git` directories This requires the llbuild commit a1adaff2a405c3a74925e60356431050cb9a3a9d, but it does not cause problems if the llbuild being used doesn't yet support this property. Instead it will be ignored. This adds a dedicated unit test with a flat package. We should consider whether any customized scratch directory should also be included in the list. This is a little tricky since the exclusion patterns are applied to all subdirectory name, not just those at the top level. In testing, it doesn't actually seem to be required, which seems a little surprising. The fix in this commit is safe and good on its own, and we can consider adding customized scratch paths later once we've looked deeper into that issue. rdar://93982172
c987281
to
f51fc51
Compare
Found a way to reproduce the problem using a test fixture, so I'm adding an end-to-end test as well. |
content-exclusion-patterns
node attribute to prevent it from descending into .build
and .git
directoriescontent-exclusion-patterns
node attribute to prevent it from descending into .build
and .git
directories
@swift-ci please smoke test |
@tomerd I managed to find a way to repro and add a unit test here. Wanted to let you know since it's a chance since last you looked. |
…ent it from descending into `.build` and `.git` directories (swiftlang#5594) This requires the llbuild commit a1adaff2a405c3a74925e60356431050cb9a3a9d, but it does not cause problems if the llbuild being used doesn't yet support this property. Instead it will be ignored. This adds a dedicated unit test with a flat package. We should consider whether any customized scratch directory should also be included in the list. This is a little tricky since the exclusion patterns are applied to all subdirectory name, not just those at the top level. In testing, it doesn't actually seem to be required, which seems a little surprising. The fix in this commit is safe and good on its own, and we can consider adding customized scratch paths later once we've looked deeper into that issue. rdar://93982172 (cherry picked from commit fb032ac)
…ent it from descending into `.build` and `.git` directories (#5594) (#5599) This requires the llbuild commit a1adaff2a405c3a74925e60356431050cb9a3a9d, but it does not cause problems if the llbuild being used doesn't yet support this property. Instead it will be ignored. This adds a dedicated unit test with a flat package. We should consider whether any customized scratch directory should also be included in the list. This is a little tricky since the exclusion patterns are applied to all subdirectory name, not just those at the top level. In testing, it doesn't actually seem to be required, which seems a little surprising. The fix in this commit is safe and good on its own, and we can consider adding customized scratch paths later once we've looked deeper into that issue. rdar://93982172 (cherry picked from commit fb032ac)
This seems to have fixed #5482 (#5482 (comment)). Can we add #5505 as a regression test, then close both #5482 and #5505? |
This requires the llbuild commit a1adaff2a405c3a74925e60356431050cb9a3a9d, but it does not cause problems if the llbuild being used doesn't yet support this property. Instead it will be ignored.
Also added a dedicated test with a flat package.
We should consider whether any customized scratch directory should also be included in the list. This is a little tricky since the exclusion patterns are applied to all subdirectory name, not just those at the top level. Oddly, in testing I did not repro the problem if I was using a custom scratch directory, so this may not be a issue in practice.
Note that this fixes the problem with doing spurious rebuilds (of which the spurious JSON output is just a symptom) for the case of a flat package structure, where the root directory of the package is considered to be a source directory. We have also seen this output when switching toolchains, which seems to be a completely different problem with similar symptoms.
rdar://93982172