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

Support new attribute shorthand #173

Merged
merged 12 commits into from
Nov 19, 2024

Conversation

mkatychev
Copy link
Contributor

Added support for new attribute shorthand:

[attr_key: "value"]
foo:
  echo "bar"

https://github.com/casey/just/blob/fa5770e71aa93402068ebc9e179e493fc94f8532/tests/attributes.rs#L202-L205

test/corpus/recipes.txt Outdated Show resolved Hide resolved
@mkatychev
Copy link
Contributor Author

Getting an npm error on just lint:

npm run lint:check
npm error Missing script: "lint:check"
npm error
npm error To see a list of scripts, run:
npm error   npm run

@tgross35
Copy link
Collaborator

Hey sorry I totally missed this. Could you turn this into separate PRs, one that does the grammar updates (for the shorthand) and a separate one doing the support/CI/gitignore/etc updates? The grammar updates is small and looks great to me, everything else needs some more discussion.

@mkatychev
Copy link
Contributor Author

No worries, should get to this by EOW

@mkatychev
Copy link
Contributor Author

@tgross35 this should be ready to review once more

@mkatychev
Copy link
Contributor Author

https://github.com/IndianBoy42/tree-sitter-just/actions/runs/11768782768/job/32778994256?pr=173 should generated code be omitted from formatting?

@@ -0,0 +1,9 @@
/// <reference types="node" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do these new tests in bindings work? They don't seem to be getting run in CI.

I would rather put these new tests in a separate PR if possible, along with a check in CI via the root justfile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is something created by tree-sitter cli with the latest version, I will try to see where this is created

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, interesting. No worries then, it can stick around if it's the same version used in CI (which should probably be bumped)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm actually unable to produce the bindings_test.js, I've deleted the file :\

@tgross35
Copy link
Collaborator

https://github.com/IndianBoy42/tree-sitter-just/actions/runs/11768782768/job/32778994256?pr=173 should generated code be omitted from formatting?

Irc there was an issue at some point where TS generated slightly different formatting for different platforms. In any case it doesn't hurt to keep things uniform, and I think just fmt should get it.

@mkatychev
Copy link
Contributor Author

@tgross35 I ran just fmt locally but it seems to produce different results from CI

@tgross35
Copy link
Collaborator

I just updated all the versions and I can't get tree-sitter to generate the new files in bindings. Could you just drop those new files and make this a new test (#173 (comment))? If CI still complains after that, I'll figure out the formatting on my end.

@mkatychev mkatychev force-pushed the feat/attribute-shorthand branch 2 times, most recently from 6fc6bfc to 6763844 Compare November 19, 2024 18:24
@mkatychev mkatychev force-pushed the feat/attribute-shorthand branch from 6763844 to bc7a9b1 Compare November 19, 2024 18:29
@mkatychev mkatychev force-pushed the feat/attribute-shorthand branch from c8c4204 to 8a73365 Compare November 19, 2024 18:46
Copy link
Collaborator

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Looks great now, thanks!

@tgross35 tgross35 merged commit f6d2930 into IndianBoy42:main Nov 19, 2024
5 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.

2 participants