Add functionality to the weekly sync workflow to detect newly added or
deleted C++ source files and spec files that may require manual CMake
configuration updates. When such files are detected, the PR body will
include a warning section listing the files and instructions for
maintainers.
This addresses issue #121 where new files added to Sleigh in Ghidra
weren't being noticed, leading to missing headers that required manual
fixes later.
Changes:
- Add CategorizedChanges dataclass to track added/deleted cpp/spec files
- Add helper methods to parse git status and categorize files
- Expand IGNORED_EXTENSIONS to filter more non-relevant file types
- Set new GitHub Actions outputs: needs_manual_intervention and
intervention_details
- Update workflow to conditionally add warning section to PR body
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Used Cursor v0.46.11 with claude-3.7-sonnet-thinking Agent mode with context
files:
- scripts/update_ghidra_head.py
and the following prompt (in the same chat as the parent commit):
---------------------
Please reduce code duplication when appropriate
Used Cursor v0.46.11 with claude-3.7-sonnet-thinking Agent mode with context
files:
- scripts/update_ghidra_head.py
and the following prompt:
---------------------
Please add an option to allow the user to specify begin and end commits, such
that the script does not read from or update the CMake file and requires
specifying an existing Ghidra git repository. For instance, it would look
something like the following, where `Ghidra_11.3_build` and `Ghidra_11.3.1_build`
are starting and ending commit, respectively.
```
python3 ./scripts/update_ghidra_head.py --ghidra-repo ./src/ghidra-HEAD Ghidra_11.3_build Ghidra_11.3.1_build
```
I also want it to support where only a starting commit is provided, and it shows
the commits from start to the current commit specified by `--ghidra-repo` path.
This also shouldn't update anything
```
python3 ./scripts/update_ghidra_head.py --ghidra-repo ./src/ghidra-HEAD Ghidra_11.3_build
```
Used Cursor v0.46.11 with claude-3.7-sonnet-thinking Agent mode with context
files:
- scripts/update_ghidra_head.py
- .github/workflows/main.yml
and the following prompt:
---------------------
Please refine the Python script to be more succinct, easier to understand, and
extendable. Use professional Python 3 constructs, syntax, and design. Do not
overcomplicate it. This script is standalone and won't be integrated into a
larger project.
Add detailed commit information to the Ghidra HEAD update process:
- Display information about each commit affecting sleigh files
- Include these commit details in GitHub Action PR descriptions
- Add --dry-run flag to preview changes without modifying files
- Improve output formatting and error handling
Also reformat the Python script with ruff
Python string split behaves differently than I assumed:
>>> "".split("\n")
['']
returns a list of size 1 but
>>> "".split()
[]
returns size 0 and
>>> "".splitlines()
[]
also returns size 0
* Major CMake refactor
* CI fixes
* Fix CMake errors
* Install graphviz on Windows
* More consistent CMake build types
* Fix compiler defines for Windows
* Fix more bugs
* Add standalone tool building support
* Fix typo
* Update README
* Install sleighLift before trying to smoketest it
* Test coverage preset
The compiler option '-fkeep-inline-functions' originally included with
the coverage build type causes errors with the message "undefined
reference to 'vtable for OpAction*'" for all OpAction subclasses.
This StackOverflow answer might help in resolving this?
https://stackoverflow.com/a/57504289
* Build documentation by default with CI presets
* Use COMPONENT for install commands
This allows for someone to specify which components they want to install
if they only want or need a subset
* Support cross compiling with host system sleigh compiler
* Various fixes found during review
* Move "_WINDOWS" define to CMakeLists.txt file
* Rename ToB 'tools' directory to 'extra-tools'
* Separate projects for sleigh tools
Library is still top-level CMakeLists.txt
More options
* CMake find_package(Git)
* Fix bad merge for patch paths
* Fix missing libconfig.h header install
* Fix issues with installation of headers
* More refactoring
* Refactor sleighexample into its own project/directory
* Refactor specfiles building into separate project/directory
* Check for termios.h header and set define if found
* Update READMEs
* Better consistency with install rules
* Build sleighLift as a standalone project with added source
* More changes to CMake subprojects
* Also add "Specs" component to sleigh installation config
* Try to be better at bootstrapping subprojects (hopefully this doesn't
bite us, but if it does, I'm happy to remove it and say "not
supported")
* Address some code review
* Add project sleigh_tool for tool subdirectory
Could make it easier to build just the tools
* Add help text to name the tool executable name
* Add license notice to CMake files
* Fix/Remove too specific CPack packaging configuration
* Consistent capitalization of Sleigh
Co-authored-by: Alex Cameron <asc@tetsuo.sh>