-
Notifications
You must be signed in to change notification settings - Fork 108
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
Consider releasing 0.21 (and yanking 0.20.2 and 0.20.3) due to a breaking change #294
Comments
This got marked as a "bug" by an issue template and I can't change it. I don't mean to imply the parser has a bug. |
Hey, I've wanted to use semantic versioning for tree-sitter core and its grammars - but Max does not want to do that, not until at least core hits 1.0. And to be fair, the spec does say anything pre-1.0 is subject to breaking changes, even if it's a patch increase. From the semantic versioning spec:
It's also difficult to reason about what is a |
Is that true of the grammars too, or just the core libraries? Can you point me to a discussion or issue where that was discussed? I mildly disagree with that for the core libraries, and strongly disagree for the grammars. |
Here's one place - tree-sitter/tree-sitter-regex#19 In another - I can't remember where, but Max wants every grammar + core to effectively be within nearby versions (0.20.x, 0.21.x, etc), so grammars wouldn't get that bump till core does, which I disagree with tbh |
Note that Cargo explicitly deviates from the semver spec for 0.y.z releases:
This is why |
Cargo also has a surprisingly worked-out convention for what changes are considered "major" (such that, for The first bullet point in the list is
This of course refers to Rust items, not "items" in the sense of tree-sitter grammar node types. But the tree-sitter grammar is what users code against. This is a judgment call and it's certainly up to the package maintainers. I think most Rust folks would consider this at least sketchy though.
Yeah, I can see wanting to do that, but it sure is in conflict with how Cargo uses these version numbers... |
@amaanq thank you for the link! I had not seen that discussion since I'm not watching that grammar repo closely. I've moved some of the points into the higher level tree-sitter discussion in the interests of visibility: tree-sitter/tree-sitter#1768 (comment) The main point from there that I'd bring back down here is really just to echo what @jorendorff said above: |
Hey, I don't mean to be a blocker if there is a clear plan for improvement, and humans willing to do the work. There was a time when tree-sitter's own language ABI changed frequently, and grammars' syntax node names changed almost constantly, so that in practice, it was much more important for the version to communicate the ABI version than it was to try to model the syntax tree changing using a version number. The situation is somewhat different now; the ABI hasn't needed to change in a while, and there exist a lot of mature grammars that don't change that much. I'm fine with changing the policy. Do folks need anything from me to begin the work of sorting things out and instituting a new embrace of semver? |
In particular, are there |
Well, I can always institute the actions I proposed initially using release-please to automatically follow semver, and generate a changelog in every grammar - it would just require using conventional commits but I think that's a great thing all around. This is what I use in all of my own grammars to follow semver and it works great. |
0.20.2 changed the name of function expression nodes from
function
tofunction_expression
.Broadly speaking, point releases shouldn't break downstream users in the Cargo ecosystem, and 0.20.2 broke us in GitHub code search. We have tree queries that search for functions, and
function
is no longer a valid thing to ask for.This might affect other users at any time. The fix would be to re-release 0.20.3 as version 0.21.0, and then yank 0.20.2 and 0.20.3.
I guess the question of when to bump is not really settled tree-sitter ecosystem. It seems bad for a simple
cargo update
to break users, though. There's a proposal here to treat breaking changes to grammars as requiring a version bump.The text was updated successfully, but these errors were encountered: