-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove sourcehut tree-sitter grammars from default build #9316
Conversation
Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar. For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are really niche languages anyway and it is not hard to reenable them so this seems like a good solution. I would be in favor of some sort of mirror eventually
…r#9316) Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar. For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.
…r#9316) Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar. For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.
…r#9316) Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar. For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.
…r#9316) Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar. For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.
Hi there! I'm both a maintainer of Hare and a sysop at SourceHut. I would appreciate it if you would consider restoring this to the default build. The SourceHut outage that caused this problem was an extraordinary event. Ordinarily, SourceHut has substantially better uptime and reliability than even GitHub. If you'd like to read our post-mortem on events to judge if it instills greater confidence, we have published it here: https://sourcehut.org/blog/2024-01-19-outage-post-mortem/ Thanks for your consideration. |
Thank you for writing that up, it's an excellent read! I was following along at the time and I really appreciate your transparency especially during a bad situation. I'm not so worried about the reliability now - particularly after reading the postmortem. The tougher issue for us to work around is user renaming. I can't find the original issue about it but a few releases ago one of the SourceHut-hosted grammar repositories' authors changed their username. That caused the clone of their repository to fail which broke the build for that release. That's what makes me hesitant to re-enable these by default: if a repository owner changes their name then we're forced to cut a new release to fix the build for packagers. For the future our plan is to change the way that we download the parser/scanner and query files. (Currently we're looking at something like a Cargo v1 style index, i.e. a git repository.) There are a number of drawbacks of cloning so many repositories that we can solve by setting up our own index, and it would pave the way for interactively installing parsers and queries in the future - something we've wanted for a while. With that in place we could comfortably re-enable these languages by default. |
I'm not sure what happened here but it definitely wasn't that -- users cannot be renamed on SourceHut right now. What's more likely is that they deleted the repository and/or their account, which can happen on any platform and isn't unique to SourceHut.
👍 One of the Hare maintainers is maintaining a tree sitter for Hare here, which is the current recommended option from Hare upstream: https://git.sr.ht/~ecs/tree-sitter-hare This can be reasonably expected to have longevity and availability. Perhaps you're open to using this for now? |
Ah ok that makes sense, they must've deleted their account and moved their repositories over to a new one. I would be open to re-enabling Hare by default then, I'll add a PR and see what the others think. Pascal and I worked on the future plan I mentioned this last week and got pretty far so it may be a moot point soon enough anyways (i.e. all of the sourcehut based languages would be enabled by default). |
Thanks! Can you also update it to point to the upstream-maintained tree sitter? |
Yep actually that's what we already use: Lines 2079 to 2081 in e290479
|
Thanks :) |
wow, what an interesting series of events... and here i am just tryin' to figure out why wren isn't showin' syntax-highlighting... # languages.toml
use-grammars = { except = [ "hare", "wren", "gemini" ] }
# ...
[[grammar]]
name = "wren"
source = { git = "https://git.sr.ht/~jummit/tree-sitter-wren", rev = "6748694be32f11e7ec6b5faeb1b48ca6156d4e06" } it still seems to exist on sourcehut... and that is indeed the latest revision.. if not, may have to ask @Jummit to put it on github (or another alt), or ask for permission to do so.. (also sourcehut looks dope! first time i've stumbled upon it) |
Sourcehut has outages occasionally that cause the CI and from-source builds to fail. It also doesn't setup redirects when a user renames themselves, so if a user that publishes a tree-sitter grammar we use changes their sourcehut name then it breaks the build and any prior builds using that grammar.
For now let's remove them from the default build. It's a bandaid over a larger reliability and trust problem with the grammar repositories but it should fix the build for now.