-
Notifications
You must be signed in to change notification settings - Fork 5
Suppress Windows DLL hard-error dialog on incompatible plugin load #185
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9e261f7
Add CLAUDE.md with developer tooling reference
nicoddemus cb2944f
Remove unknown pytest option: collect_ignore
nicoddemus 7cad0d6
Fix local build and test setup for VS 2019 BuildTools
nicoddemus 6dd2187
Suppress Windows DLL hard-error dialog on incompatible plugin load
nicoddemus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,3 +115,4 @@ environment.yml | |
| _ | ||
| /docs/build/ | ||
| /_build/ | ||
| /.claude/ | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # hookman — Developer Tooling Reference | ||
|
|
||
| ## Environment setup | ||
|
|
||
| This project uses a plain virtualenv (not pixi, despite the presence of `pixi.devenv.toml`). | ||
|
|
||
| ```bash | ||
| python -m venv .venv | ||
|
|
||
| # Windows | ||
| .venv/Scripts/pip install -e . -r requirements_dev.txt | ||
|
|
||
| # Linux | ||
| .venv/bin/pip install -e . -r requirements_dev.txt | ||
| ``` | ||
|
|
||
| ## Type checking | ||
|
|
||
| ```bash | ||
| prek run mypy -a | ||
| ``` | ||
|
|
||
| ## Running tests | ||
|
|
||
| ```bash | ||
| # Windows | ||
| .venv/Scripts/pytest tests/test_hooks.py tests/test_hookman_utils.py -v | ||
|
|
||
| # Linux | ||
| .venv/bin/pytest tests/test_hooks.py tests/test_hookman_utils.py -v | ||
| ``` | ||
|
|
||
| Some tests require compiled C++ artifacts (see **Building** below). The | ||
| `add_artifacts_to_path` autouse fixture in `conftest.py` adds `build/artifacts` | ||
| to `sys.path` automatically, so no `PYTHONPATH` setup is needed. | ||
|
|
||
| ## Building C++ artifacts | ||
|
|
||
| ```bash | ||
| # Windows | ||
| .venv/Scripts/inv build | ||
|
|
||
| # Linux | ||
| .venv/bin/inv build | ||
| ``` | ||
|
|
||
| This compiles the test plugins (`.dll`/`.so`) and the pybind11 binding | ||
| (`.pyd`/`.so`), installing them to `build/artifacts/`. Must be re-run whenever | ||
| C++ source files change. | ||
|
|
||
| On Windows, requires Visual Studio with MSVC. On Linux, requires a C++ compiler | ||
| (e.g. `g++`) and `ninja`. | ||
|
|
||
| ## Regenerating file regression snapshots | ||
|
|
||
| Some tests in `test_hookman_generator.py` use `pytest-regressions` to compare | ||
| generated files against stored snapshots. When the generator output changes | ||
| intentionally, regenerate the snapshots with: | ||
|
|
||
| ```bash | ||
| # Windows | ||
| .venv/Scripts/pytest tests/test_hookman_generator.py --force-regen | ||
|
|
||
| # Linux | ||
| .venv/bin/pytest tests/test_hookman_generator.py --force-regen | ||
| ``` | ||
|
|
||
| Then verify the regenerated files look correct before committing them. | ||
|
|
||
| ## Pre-commit / linting | ||
|
|
||
| ```bash | ||
| prek run --all-files | ||
| ``` | ||
|
|
||
| This runs mypy, ruff, and other hooks defined in `.pre-commit-config.yaml`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,3 @@ exclude = docs | |
|
|
||
| [aliases] | ||
| test = pytest | ||
|
|
||
| [tool:pytest] | ||
| collect_ignore = ['setup.py'] | ||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.