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

Remove sourcehut tree-sitter grammars from default build #9316

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

the-mikedavis
Copy link
Member

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.

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.
@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Jan 11, 2024
Copy link
Member

@pascalkuthe pascalkuthe left a 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

@the-mikedavis the-mikedavis merged commit 17dd102 into master Jan 11, 2024
6 checks passed
@the-mikedavis the-mikedavis deleted the use-grammars-except-git.sr.ht branch January 11, 2024 15:26
@kirawi kirawi mentioned this pull request Jan 20, 2024
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
…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.
@kirawi kirawi mentioned this pull request Mar 13, 2024
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
…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.
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
…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.
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
…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.
@ddevault
Copy link

ddevault commented Aug 8, 2024

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.

@the-mikedavis
Copy link
Member Author

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.

@ddevault
Copy link

ddevault commented Aug 9, 2024

The tougher issue for us to work around is user renaming.

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.

For the future our plan is to change the way that we download the parser/scanner and query files.

👍

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?

@the-mikedavis
Copy link
Member Author

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).

@ddevault
Copy link

Thanks! Can you also update it to point to the upstream-maintained tree sitter?

https://git.sr.ht/~ecs/tree-sitter-hare

@the-mikedavis
Copy link
Member Author

Yep actually that's what we already use:

helix/languages.toml

Lines 2079 to 2081 in e290479

[[grammar]]
name = "hare"
source = { git = "https://git.sr.ht/~ecs/tree-sitter-hare", rev = "07035a248943575444aa0b893ffe306e1444c0ab" }

@ddevault
Copy link

Thanks :)

@rahil627 rahil627 mentioned this pull request Sep 9, 2024
@rahil627
Copy link

rahil627 commented Sep 9, 2024

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)

@rahil627
Copy link

image

welp, after removing wren from the exceptions list, and then fetching and building wren, it seems to be working fine... i mean, for an embedded language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants