Skip to content
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 CI workflow, and update tree-sitter #4

Merged
merged 9 commits into from
May 3, 2024
Merged

Conversation

erik-krogh
Copy link
Collaborator

No description provided.

@clason
Copy link

clason commented May 3, 2024

Please use the official workflows: https://github.com/tree-sitter/workflows

@erik-krogh erik-krogh changed the title add CI workflow add CI workflow, and update tree-sitter May 3, 2024
…y `tree-sitter generate` does not work with the reference tree-sitter workflow
@hvitved hvitved mentioned this pull request May 3, 2024
Copy link
Collaborator

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this looks good, but there are two things I think need to be fixed.

Cargo.toml Outdated
@@ -1,26 +1,23 @@
[package]
name = "tree-sitter-ql-dbscheme"
description = "ql dbscheme grammar for the tree-sitter parsing library"
name = "tree-sitter-dbscheme"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this rename. The repo is still called tree-sitter-ql-dbscheme, after all.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the parser is. Having the repo named different from the language is not really intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is because the name in gammar.js is wrong. The generate script is copy-pasting from there.
I'm fixing it.

Copy link
Collaborator

@tausbn tausbn May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow. The parser is what? (Edit: Ah, @erik-krogh's interim answer cleared this up for me.)

Currently, the name of the parser is tree-sitter-ql-dbscheme. This is also how the (to my knowledge) only downstream user refers to it.

To be clear, I would be happy to see this renamed to tree-sitter-dbscheme. The original name contained -ql- out of an abundance of caution, in case some other user of dbscheme was out there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the grammar is named dbscheme.
I cannot change it to ql-dbscheme, because then tree-sitter gives me the following error:
Error: Grammar's 'name' property must not start with a digit and cannot contain non-word characters..

What can we do?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try underscore instead? ql_dbscheme

Copy link

@clason clason May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(To be clear, I'm not saying you're doing it wrong; I'm just pointing out that the tooling is built with different expectations, so you can't trust it blindly if you deviate. You'll just have to postprocess manually.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Underscore seem to work

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, a number of other grammars use that trick.

Cargo.toml Outdated Show resolved Hide resolved
@erik-krogh erik-krogh requested a review from tausbn May 3, 2024 13:41
Copy link
Collaborator

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks reasonable. (As with the corresponding changes to tree-sitter-ql, QlDbscheme is a bit weird in the description of the package, but I don't care strongly about it.)

@erik-krogh erik-krogh merged commit 5f770f5 into main May 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants