Skip to content

Comments

Update Astro grammar source#7803

Open
Princesseuh wants to merge 1 commit intogithub-linguist:mainfrom
Princesseuh:main
Open

Update Astro grammar source#7803
Princesseuh wants to merge 1 commit intogithub-linguist:mainfrom
Princesseuh:main

Conversation

@Princesseuh
Copy link

Description

Hello! We merged our language-tools repo at Astro into our Astro monorepo, as such the location of the grammar has now changed. I've updated all the paths to point to the new repo.

Checklist:

@Princesseuh Princesseuh requested a review from a team as a code owner February 13, 2026 14:15
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

Please use the process for replacing a grammar detailed in the CONTRIBUTING.md file to update the paths (and other files the scripts modifies) rather than manually modifying things.

@lildude lildude changed the title fix(astro): Update path to grammar for new repo changes Update Astro grammar source Feb 13, 2026
@Princesseuh
Copy link
Author

Ah, apologies I missed that. Will do!

@Princesseuh
Copy link
Author

Tried to do it, but both in local and in GitHub Codespaces I get errors about submodules not existing, Docker not working etc. when using the script. I'll try again over the weekend perhaps on another computer.

@lildude
Copy link
Member

lildude commented Feb 13, 2026

Yeah, this is expected if you're trying to do it with your past modifications in place. Start with a clean checkout of main and things should work fine, though you might hit an issue with git-lfs missing which I'm addressing in #7804

@lildude
Copy link
Member

lildude commented Feb 13, 2026

Ooof. I've just hit it in #7804

Error updating vendor/grammars/astro
Cloning into '/home/runner/work/linguist/linguist/vendor/grammars/astro'...
fatal: remote error: upload-pack: not our ref 49a486e05fe5da215842d4542c90e8b8a21879a1
fatal: Fetched in submodule path 'vendor/grammars/astro', but it did not contain 49a486e05fe5da215842d4542c90e8b8a21879a1. Direct fetching of that commit failed.

Looks like the history in the original repo has been rewritten (someone force-pushed) and removed the commit we need.

I'll fix it for now in my PR by pointing to the lastest SHA in the original repo.

@lildude lildude mentioned this pull request Feb 13, 2026
1 task
@Princesseuh
Copy link
Author

Strange! We have force pushes disabled all across the organization, not sure what happened. Thank you for fixing it!

@Princesseuh
Copy link
Author

Princesseuh commented Feb 13, 2026

Reset my fork to nothing, did a fresh clone, opened in dev containers and this is what I get (same thing happen with uppercase Astro, in case it matters)

image

It's very possible I'm stupid.

EDIT: I figured it out, it does that if you don't have the submodule initialized, confusing error.

@Princesseuh Princesseuh reopened this Feb 14, 2026
@Princesseuh Princesseuh requested a review from lildude February 14, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants