Closed kieran-ryan closed 4 months ago
LGTM, and do feel free to create a branch in this repository instead of your own. It will make collaboration with others easier.
LGTM, and do feel free to create a branch in this repository instead of your own. It will make collaboration with others easier.
Cheers - noted going forward 👍
🤔 What's changed?
Bumped
node-gyp
to10.0.1
.Provided an explicit error message for installation failure of tree-sitter language bindings; prior to attempting their compilation.
⚡️ What's your motivation?
Fixes #174 - which prevents the pipeline from passing and presents a blocker to release.
Fix Python 3.12 incompatibility
Following macOS 12 (20231029) release of the
macos-latest
GitHub runner, the Python distribution changed to 3.12 - this is incompatible with the version ofnode-gyp
used to compile the tree-sitter language bindings. Specifically, our pinned version uses thedistutils
module which is removed from the standard library 3.12 - which has been discussed on other issues (cucumber/gherkin#40). Our pipelines have failed since this release.The tree-sitter language binding dependencies were previously made optional to support Windows runners (#58) - suppressing the failure as the logs are less verbose. More information on the failure can be revealed by increasing the log verbosity (
-ddd
) and by making the dependency required.As such, the issue is resolved by either pinning Python to 3.9 or updating
node-gyp
to >= v10 - which is compatible with 3.12. The latter has been chosen, as we will need to bump the version in future in any case.Improve developer experience with enhanced error message
By first checking if the tree-sitter language binding module exists before attempting to compile them, it makes it clearer what caused the failure. We do not perform this check at present. This can make failures unclear as we trigger the compilation asynchronously so the module that fails can vary based on which process returns the failure first. With this PR, we will not attempt compilation of a missing module - and will get faster CI feedback.
Developers will see the following:
Instead of:
🏷️ What kind of change is this?
📋 Checklist: