Message ID | 5Vd2H2MDjpVPQxgawXDNnlt9fABkK8GbS0UOOARnZcHtkl9IJ0iUJjC8YXeO5g4MJ8zAs5c03prTh2cH2bgifUrvfgyuHHrZEzSmHfumWHo=@emturner.co.uk |
---|---|
State | New |
Headers | show |
Series | [bug#66836] gnu: Add tree-sitter-yaml. | expand |
Hi Emma, On Mon, 30 Oct 2023 04:47:34 +0800, Emma Turner via Guix-patches via wrote: > > [1 <text/plain; utf-8 (base64)>] > [2 <text/html; utf-8 (base64)>] > * gnu/packages/tree-sitter.scm (tree-sitter-yaml): New variable. > > Change-Id: Id48040eee325b0cdb435d8693caf48c9654cf14c > --- > gnu/packages/tree-sitter.scm | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm > index 41257d42f1..608f8b6519 100644 > --- a/gnu/packages/tree-sitter.scm > +++ b/gnu/packages/tree-sitter.scm > @@ -7,6 +7,7 @@ > ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr> > ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> > ;;; Copyright © 2023 Raven Hallsby <karl@hallsby.com> > +;;; Copyright © 2023 Emma Turner <mail@emturner.co.uk> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -629,3 +630,11 @@ (define-public tree-sitter-scala > "scala" "Scala" > "0hs6gmkq5cx9qrmgfz1mh0c34flwffc0k2mhwf13laawswnywfkz" > "0.20.2")) > + > +(define-public tree-sitter-yaml > + (tree-sitter-grammar > + "yaml" "Yaml" > + "1ay4snkd2s4pid7pcr4bgx0y9cj7b5vlgd7wfc1j0896l0p61cjb" > + "0.5.0" > + #:repository-url "https://github.com/emturner/tree-sitter-yaml" > + #:commit "f53859209fef065b677995802842a2b65314defb")) > > base-commit: 2b5c6e1a41e4ddcf4cfa53a319ed784a856eac5d > -- > 2.41.0 There seem to be formatting issue in your patch, making the last two lines embedded into one: "--2.41.0". You can have a look at it in [1]. I think your changes can be shipped as a patch with Guix. Maybe you can open a PR to upstream as well? :) I have modified your commit since we don't have to clone the submodule and generated files in src/ are deleted. I will send v2 for the change. Thanks --- [1]: https://issues.guix.gnu.org/66836
Hi Hilton,
Thanks so much! Having the test fixes as its own patches makes complete sense.
I will try open a PR to see if the fixes can get upstreamed, and open a future patch of it does get merged.
Thanks,
Emma
-------- Original Message --------
On 4 Nov 2023, 12:15, Hilton Chain wrote:
> Hi Emma, On Mon, 30 Oct 2023 04:47:34 +0800, Emma Turner via Guix-patches via wrote: > > [1 ] > [2 ] > * gnu/packages/tree-sitter.scm (tree-sitter-yaml): New variable. > > Change-Id: Id48040eee325b0cdb435d8693caf48c9654cf14c > --- > gnu/packages/tree-sitter.scm | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm > index 41257d42f1..608f8b6519 100644 > --- a/gnu/packages/tree-sitter.scm > +++ b/gnu/packages/tree-sitter.scm > @@ -7,6 +7,7 @@ > ;;; Copyright © 2023 Nicolas Graves > ;;; Copyright © 2023 Zheng Junjie > ;;; Copyright © 2023 Raven Hallsby > +;;; Copyright © 2023 Emma Turner > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -629,3 +630,11 @@ (define-public tree-sitter-scala > "scala" "Scala" > "0hs6gmkq5cx9qrmgfz1mh0c34flwffc0k2mhwf13laawswnywfkz" > "0.20.2")) > + > +(define-public tree-sitter-yaml > + (tree-sitter-grammar > + "yaml" "Yaml" > + "1ay4snkd2s4pid7pcr4bgx0y9cj7b5vlgd7wfc1j0896l0p61cjb" > + "0.5.0" > + #:repository-url "https://github.com/emturner/tree-sitter-yaml" > + #:commit "f53859209fef065b677995802842a2b65314defb")) > > base-commit: 2b5c6e1a41e4ddcf4cfa53a319ed784a856eac5d > -- > 2.41.0 There seem to be formatting issue in your patch, making the last two lines embedded into one: "--2.41.0". You can have a look at it in [1]. I think your changes can be shipped as a patch with Guix. Maybe you can open a PR to upstream as well? :) I have modified your commit since we don't have to clone the submodule and generated files in src/ are deleted. I will send v2 for the change. Thanks --- [1]: https://issues.guix.gnu.org/66836
On 2023-11-04 20:15, Hilton Chain via Guix-patches via wrote: > Hi Emma, > > On Mon, 30 Oct 2023 04:47:34 +0800, > Emma Turner via Guix-patches via wrote: >> >> [1 <text/plain; utf-8 (base64)>] >> [2 <text/html; utf-8 (base64)>] >> * gnu/packages/tree-sitter.scm (tree-sitter-yaml): New variable. >> >> Change-Id: Id48040eee325b0cdb435d8693caf48c9654cf14c >> --- >> gnu/packages/tree-sitter.scm | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm >> index 41257d42f1..608f8b6519 100644 >> --- a/gnu/packages/tree-sitter.scm >> +++ b/gnu/packages/tree-sitter.scm >> @@ -7,6 +7,7 @@ >> ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr> >> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> >> ;;; Copyright © 2023 Raven Hallsby <karl@hallsby.com> >> +;;; Copyright © 2023 Emma Turner <mail@emturner.co.uk> >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -629,3 +630,11 @@ (define-public tree-sitter-scala >> "scala" "Scala" >> "0hs6gmkq5cx9qrmgfz1mh0c34flwffc0k2mhwf13laawswnywfkz" >> "0.20.2")) >> + >> +(define-public tree-sitter-yaml >> + (tree-sitter-grammar >> + "yaml" "Yaml" >> + "1ay4snkd2s4pid7pcr4bgx0y9cj7b5vlgd7wfc1j0896l0p61cjb" >> + "0.5.0" >> + #:repository-url "https://github.com/emturner/tree-sitter-yaml" >> + #:commit "f53859209fef065b677995802842a2b65314defb")) >> >> base-commit: 2b5c6e1a41e4ddcf4cfa53a319ed784a856eac5d >> -- >> 2.41.0 > > > There seem to be formatting issue in your patch, making the last two lines > embedded into one: "--2.41.0". You can have a look at it in [1]. > > I think your changes can be shipped as a patch with Guix. Maybe you can open a > PR to upstream as well? :) It seems that https://github.com/ikatyang/tree-sitter-yaml is unmaintained, that's probably why I didn't add this grammar earlier. So maybe forking and taking a maintainance is not a bad idea. > > I have modified your commit since we don't have to clone the submodule and > generated files in src/ are deleted. I will send v2 for the change. > > Thanks > --- > [1]: https://issues.guix.gnu.org/66836 > > >
Hi Andrew, On Sat, 18 Nov 2023 15:42:20 +0800, Andrew Tropin wrote: > > > There seem to be formatting issue in your patch, making the last two lines > > embedded into one: "--2.41.0". You can have a look at it in [1]. > > > > I think your changes can be shipped as a patch with Guix. Maybe you can open a > > PR to upstream as well? :) > > It seems that https://github.com/ikatyang/tree-sitter-yaml is > unmaintained, that's probably why I didn't add this grammar earlier. > > So maybe forking and taking a maintainance is not a bad idea. I have found the first tree-sitter commit causing the test failures, it's 0fb864c1a0a5a53a951e3bf830fdbdc5edac385d (v0.20.4-9-g0fb864c1), there's also open issue for it[1]. And the tree-sitter-yaml repository actually has some relevant activity this July[2]. Thanks --- [1]: Regression in YAML parsing with web-tree-sitter + tree-sitter-yaml https://github.com/tree-sitter/tree-sitter/issues/2339 [2]: https://github.com/ikatyang/tree-sitter-yaml/tree/feat/error-recovery
diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 41257d42f1..608f8b6519 100644 --- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Raven Hallsby <karl@hallsby.com> +;;; Copyright © 2023 Emma Turner <mail@emturner.co.uk> ;;; ;;; This file is part of GNU Guix. ;;; @@ -629,3 +630,11 @@ (define-public tree-sitter-scala "scala" "Scala" "0hs6gmkq5cx9qrmgfz1mh0c34flwffc0k2mhwf13laawswnywfkz" "0.20.2")) + +(define-public tree-sitter-yaml + (tree-sitter-grammar + "yaml" "Yaml" + "1ay4snkd2s4pid7pcr4bgx0y9cj7b5vlgd7wfc1j0896l0p61cjb" + "0.5.0" + #:repository-url "https://github.com/emturner/tree-sitter-yaml" + #:commit "f53859209fef065b677995802842a2b65314defb"))