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

Typst grammar not accessible #7145

Closed
lildude opened this issue Dec 2, 2024 · 6 comments
Closed

Typst grammar not accessible #7145

lildude opened this issue Dec 2, 2024 · 6 comments
Labels

Comments

@lildude
Copy link
Member

lildude commented Dec 2, 2024

Tests are failing because the typst grammar can't be found:

Error updating vendor/grammars/typst-grammar
Cloning into '/home/runner/work/linguist/linguist/vendor/grammars/typst-grammar'...
fatal: could not read Username for 'https://github.com/': No such device or address
fatal: clone of 'https://github.com/michidk/typst-grammar.git' into submodule path '/home/runner/work/linguist/linguist/vendor/grammars/typst-grammar' failed
Failed to clone 'vendor/grammars/typst-grammar'. Retry scheduled
Cloning into '/home/runner/work/linguist/linguist/vendor/grammars/typst-grammar'...
fatal: could not read Username for 'https://github.com/': No such device or address
fatal: clone of 'https://github.com/michidk/typst-grammar.git' into submodule path '/home/runner/work/linguist/linguist/vendor/grammars/typst-grammar' failed
Failed to clone 'vendor/grammars/typst-grammar' a second time, aborting

Looks like @michidk renamed the repo to just typst.

@michidk I see your repo is a fork of the upstream repo and is now trailing it. Should we switch to using the upstream grammar?

@michidk
Copy link
Contributor

michidk commented Dec 3, 2024

Hi @lildude so sorry about this. I deleted the repo since it was vastly out of date and people were complaining in the issues. I should have archived it instead.

Dont switch to michidk/typst this is the source code for the compiler and does not contain the grammar.

@lildude
Copy link
Member Author

lildude commented Dec 3, 2024

@michidk are you able to find another maintained grammar? If not the only option is to remove the current grammar which will upset a lot of Typst users, unless someone has a recent clone of your repo (I might, but there's no guarantee as I mostly use codespaces which are cleaned up regularly).

@michidk
Copy link
Contributor

michidk commented Dec 3, 2024

There are more up-to-date grammars, like https://github.com/Myriad-Dreamin/tinymist/tree/main/syntaxes/textmate but I dont think they are supported by linguist (at least I remember having a look at this and didnt get it to work, but maybe im wrong).
if you think it should work, I might have another look at it in future.

I have re-created the repository using information from other issues and PRs: https://github.com/michidk/typst-grammar/
For what its worth, I also added you as a maintainer.

I am not 100% sure its the latest version, so if you have a copy lying around feel free to post that here and I will have a look.

I am sorry for the inconvenience this caused.

Maybe a more future-proof version of this repository could host the grammars itself?

@lildude
Copy link
Member Author

lildude commented Dec 3, 2024

I am not 100% sure its the latest version, so if you have a copy lying around feel free to post that here and I will have a look.

I do, and it's got the latest commit we're expecting to I'll force push my clone.

@lildude
Copy link
Member Author

lildude commented Dec 3, 2024

There are more up-to-date grammars, like https://github.com/Myriad-Dreamin/tinymist/tree/main/syntaxes/textmate but I dont think they are supported by linguist (at least I remember having a look at this and didnt get it to work, but maybe im wrong).
if you think it should work, I might have another look at it in future.

Nope. Looks like it needs some sort of preprocessing which we don't do.

Maybe a more future-proof version of this repository could host the grammars itself?

We try not to host any grammars as there's an expectation that we'll maintain it which we won't 😁.

@michidk
Copy link
Contributor

michidk commented Dec 12, 2024

I think this can be closed then

@lildude lildude closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants