-
Notifications
You must be signed in to change notification settings - Fork 437
Add buildSrc to tags task. #7632
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
Changes from 3 commits
e54d555
ce78aa7
3ba9da3
dab9d94
d6741c6
007756c
90e176f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| tasks.register("tags", Exec) { | ||
| description = "Create Emacs TAGS table" | ||
| // `ctags -e -f TAGS` used to work in place of `etags`, but apparently no longer. | ||
| commandLine("bash", "-c", "find . \\( -name build -o -name jtreg -o -name tests \\) -prune -o -name '*.java' -print | sort-directory-order | xargs etags") | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Yes, GNU etags overwrites the TAGS file on each invocation by default. Without the -a/--append flag, it creates a new TAGS file (default name) containing tags only from the specified input files. The -a/--append flag causes it to append new tags to an existing TAGS file instead of overwriting it. Citations:
🏁 Script executed: # Verify the actual file exists and check its content
find . -path "*/buildSrc/src/main/groovy/tags.gradle" -type fRepository: typetools/checker-framework Length of output: 109 🏁 Script executed: # Search for the root build.gradle and look for tags/docTags task definitions
find . -maxdepth 2 -name "build.gradle" -type f | head -20Repository: typetools/checker-framework Length of output: 369 🏁 Script executed: # Search for references to "group = " in build.gradle files to confirm Emacs group
rg "group\s*=\s*[\"']Emacs[\"']" --type groovy -B 2 -A 2Repository: typetools/checker-framework Length of output: 842 🏁 Script executed: # Check if sort-directory-order is defined in the repository
rg "sort-directory-order" --type groovy --type sh --type bashRepository: typetools/checker-framework Length of output: 99 🏁 Script executed: # Read the actual tags.gradle file to confirm the code snippet
cat -n ./buildSrc/src/main/groovy/tags.gradleRepository: typetools/checker-framework Length of output: 421 🏁 Script executed: # Search for sort-directory-order without type specification
rg "sort-directory-order" -A 3 -B 3Repository: typetools/checker-framework Length of output: 571 🏁 Script executed: # Check if there's a sort-directory-order script/executable in the repo
fd "sort-directory-order" -type fRepository: typetools/checker-framework Length of output: 241 🏁 Script executed: # Search for sort-directory-order anywhere in the repo
rg "sort-directory-order"Repository: typetools/checker-framework Length of output: 264 🏁 Script executed: # Check if it's defined in plume-scripts or is an external utility
rg "def sort-directory-order" -A 5Repository: typetools/checker-framework Length of output: 53 🏁 Script executed: # Look for where plume-scripts or similar utilities are sourced
rg "plume" --max-count 10Repository: typetools/checker-framework Length of output: 50383 🏁 Script executed: # Check the root build.gradle for how the tags task incorporates subproject tags
cat -n ./build.gradle | grep -A 20 "tasks.register.*tags"Repository: typetools/checker-framework Length of output: 1059 🏁 Script executed: # Check if there's documentation or implementation of sort-directory-order in plume-scripts
rg "sort-directory-order" -A 10 -B 2 | head -50Repository: typetools/checker-framework Length of output: 503 🏁 Script executed: # Look for any test or usage examples of sort-directory-order with -z flag
rg "\-print0\|\-0\|\s-z\s" --max-count 20Repository: typetools/checker-framework Length of output: 53 🏁 Script executed: # Check if the plume-scripts repo or reference is present
ls -la checker/bin-devel/.plume-scripts 2>/dev/null || echo "plume-scripts not checked out"Repository: typetools/checker-framework Length of output: 100 🏁 Script executed: # Verify the actual impact by checking the sizes of source trees in affected subprojects
find checker/src -name "*.java" | wc -l
find framework/src -name "*.java" | wc -l
find dataflow/src -name "*.java" | wc -lRepository: typetools/checker-framework Length of output: 82 Add Two issues:
Proposed fix tasks.register("tags", Exec) {
description = "Create Emacs TAGS table"
+ group = "Emacs"
// `ctags -e -f TAGS` used to work in place of `etags`, but apparently no longer.
- commandLine("bash", "-c", "find . \\( -name build -o -name jtreg -o -name tests \\) -prune -o -name '*.java' -print | sort-directory-order | xargs etags")
+ commandLine("bash", "-c", "rm -f TAGS && find . \\( -name build -o -name jtreg -o -name tests \\) -prune -o -type f -name '*.java' -print0 | sort-directory-order -z | xargs -0 etags -a")
}Note: Verify that your 🤖 Prompt for AI Agents |
||
Uh oh!
There was an error while loading. Please reload this page.