-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add notes on contributing, especially w.r.t the parser verification check #92
Comments
Do we really need https://github.com/alex-pinkus/tree-sitter-swift#frequently-asked-questions |
The only reason I am a bit hesitant is that it seems to deviate from the dominant convention of including the parser, even if it's comparatively large. See e.g. |
Might be worth keeping an eye on
which propose to remove the generated files from the repos. |
...but also include it as a release artefact for semantic versioned(!) releases. (This parser takes a comparatively long time to generate, so just dropping it would not be preferred albeit workable. A separate "release branch", though, is highly discouraged -- some parsers chose to do that in the early days, but it's more headache for everyone than it's worth.) In either case, please keep committing the generated json, as these are enough to generate the parser without node. (Not that your parser requires |
Yes, to be clear, I don't propose to remove anything for now, just to monitor what upstream does. When the official recommendation changes, we can revisit this. |
Sure; I was just explaining current upstream policy ;) |
New PRs regularly fail the CI check that verifies that the generated parser matches the committed
parser.c
, presumably because their development machine didn't generate a byte-for-byte-exact copy of the parser as the GitHub Actions runner.Perhaps we could add some notes to clarify the motivation behind this check and how to successfully generate a conforming
parser.c
. Something along the lines of:tree-sitter generate
only seems to be deterministic when run on the same platform. Since the GitHub-hosted runners use x86_64 Linux, contributors have to generate the parser from that platform too (even aarch64 Linux/macOS will produce a different output).regenerate-parser.yml
workflow in their own fork. This would potentially require customizing the branch it runs on.The text was updated successfully, but these errors were encountered: