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

tree-sitter-grammars: Add koka #267000

Merged
merged 1 commit into from
Mar 23, 2024
Merged

Conversation

akirak
Copy link
Contributor

@akirak akirak commented Nov 12, 2023

Description of changes

A tree-sitter grammar for Koka: https://github.com/mtoohey31/tree-sitter-koka

Koka is a strongly typed functional-style language with effect types and handlers.

Koka v2 is a research language that is currently under development and not ready for production use. Nevertheless, the language is stable and the compiler implements the full specification. The main things lacking at the moment are libraries, package management, and deep IDE integration.

Adding this grammar to nixpkgs will promote development of editor integrations of the language. There is a GitHub Discussion on the parser: koka-lang/koka#370

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@akirak
Copy link
Contributor Author

akirak commented Nov 13, 2023

Result of nixpkgs-review pr 267000 run on x86_64-linux 1

2 packages built:
  • diffsitter
  • tree-sitter-grammars.tree-sitter-koka

Copy link
Member

@mtoohey31 mtoohey31 left a comment

Choose a reason for hiding this comment

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

Thanks for this @akirak, looks good to me! I did just make one small change to the queries, so you might want to update the rev to include that. There's also a fix for the scoped keyword coming (see helix-editor/helix#8727 (comment)).

@akirak akirak marked this pull request as draft November 14, 2023 06:08
@akirak
Copy link
Contributor Author

akirak commented Nov 14, 2023

I've marked this PR as a draft for updating the branch. I'll unmark it when it's ready.

@akirak
Copy link
Contributor Author

akirak commented Nov 14, 2023

Result of nixpkgs-review pr 267000 run on x86_64-linux 1

2 packages built:
  • diffsitter
  • tree-sitter-grammars.tree-sitter-koka

@akirak
Copy link
Contributor Author

akirak commented Nov 14, 2023

@mtoohey31 I've updated the PR, but I don't know when to undraft it (maybe wait for scoped branch?). Please ping me once your Koka parser is ready for a release.

@mtoohey31
Copy link
Member

Thanks @akirak, I've added the scoped change to main. There's just two final points I'm waiting for feedback on in the Helix PR, so I'll let you know once those are resolved.

@akirak
Copy link
Contributor Author

akirak commented Mar 20, 2024

This language has been integrated into helix (see helix-editor/helix@2e4653e), so I think it is ready to get merged. Thank you for your patient work, @mtoohey31 and others!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3658

@akirak akirak marked this pull request as ready for review March 20, 2024 02:09
@mtoohey31
Copy link
Member

Thanks for paying attention to that PR! Sorry that I forgot to ping you even though I said I would 🤦 There may be more updates once I get around to addressing mtoohey31/tree-sitter-koka#2, but it's probably best to include that in a future PR, cause I'm not sure when I'll get around to it.

Would you mind bumping the revision of the grammar in the PR to the latest one on main? There have been a couple of fixes since the earlier rev that would be nice to include.

@akirak
Copy link
Contributor Author

akirak commented Mar 20, 2024

Would you mind bumping the revision of the grammar in the PR to the latest one on main?

Yes! I forgot that. Sorry for being dumb. I have updated the JSON to reflect your latest main branch.

Copy link
Member

@mtoohey31 mtoohey31 left a comment

Choose a reason for hiding this comment

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

No worries! Thanks!

@SuperSandro2000
Copy link
Member

@ofborg build tree-sitter-grammars.tree-sitter-koka

@SuperSandro2000 SuperSandro2000 merged commit 4d701ac into NixOS:master Mar 23, 2024
23 of 24 checks passed
@akirak akirak deleted the tree-sitter-koka branch March 23, 2024 23:32
@akirak
Copy link
Contributor Author

akirak commented Mar 23, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants