fix: anchor build-output gitignore rules to repo root - #7735
Merged
Merged
Conversation
Lines 67-69 (`output/`, `build/`, `libs/`) duplicated the anchored
`/output/`, `/build/`, `/libs/` rules directly above them, but without a
leading slash they matched a directory of that name at ANY depth. That
silently ignored source packages such as pcgen.output.* (e.g. new files
under code/src/test/pcgen/output/), which only stay tracked because
gitignore does not evict already-tracked files.
The build writes its output to <root>/output (build.gradle: layout
.projectDirectory.dir("output")) and code/testsuite/output, both already
covered by the anchored /output/ and the explicit code/testsuite/output/
rules, so removing the unanchored trio ignores nothing the build needs
while unblocking new files in output/-named source packages.
Contributor
🚧 PCGen Code Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The build-output block in
.gitignorelisted both anchored and unanchored forms of the same directories:A pattern with no leading slash matches a directory of that name at any depth, so
output/also matched source packages likepcgen.output.*. Those files only remain tracked because gitignore does not evict already-tracked files — but any new file added to such a package (e.g. a test undercode/src/test/pcgen/output/) is silently ignored and won't show up ingit status.Fix
Remove the three unanchored duplicates. The build writes its output to
<root>/output(build.gradle:layout.projectDirectory.dir("output")) and tocode/testsuite/output, both already covered by the anchored/output/(and the explicitcode/testsuite/output/) rules. So this ignores nothing the build needs, while unblocking new files inoutput/-named source packages.Verified: after the change, no build artifact becomes newly tracked (
git statusclean), rootoutput/,build/,libs/, andcode/testsuite/output/remain ignored, andcode/src/test/pcgen/output/is no longer ignored.