-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
F* highlighting is broken (a fix is made in a fork because original repo is abandoned) #5528
Comments
I'd suggest submitting a PR to the grammar as it may appear abandoned, but it is owned by the F* community so it might get a review and merge. Failing that, the only other options are to fork and maintain the grammar yourself and update Linguist to use your fork, or find another grammar that doesn't have the problem and is actively maintained and update Linguist to use that… maybe there's an active grammar for VSCode or Textmate? |
I believe only fstar-mode for emacs is currently up-to-date with fstar. Will ask the guys in their chat how to best handle this... |
I forked that grammar and committed the fix. The original atom-fstar is abandoned after all :( Can we just reference my fork? |
|
Done! Can you review @ accept my PR? |
Where/how exactly did you confirm this? I have reservations about replacing an official grammar when its maintenance status is unclear at best. |
I confirmed it by asking in F* community slack chats. They only write in emacs, and fstar-mode for emacs is the only editor that is kept up-to-date. Support for other editors such as vscode, atom, etc, is effectively dead, as even the grammars are years behind the current language version, not to mention the interactive mode that is essential if you write anything more complex than hello world. Is there an option to switch linguist to using my fork and immediately switch back if atom-fstar suddenly turns out to be alive? |
That's a real pain. Perhaps ask one of the @FStarLang members to transfer maintenance of the repository to you? If it's officially abandoned, transferring ownership will at least continue to benefit those using the package in Atom. Failing that, our last resort is to use a fork. |
Alright. I contacted the guys in charge, and they merged my PR to atom-fstar. Still, it is indeed abandoned, so we'll soon copy the file directly to the FStar repository, and ask linguist team to reference that instead My current PR to linguist only contains the submodule update within the original atom-fstar repo. |
This doesn't sit well with me. For a start, that'll require us to hardcode an exception to the logic usually employed to locate grammar files. Since upstream might change the grammar's location within the project in the future, we'll be forced to tamper with Go code every time its location changes. Ideally, this should be configurable, but it currently isn't; see #4990. The other problem is size. Checking out the entire |
Your F* file referenced in the OP looks good now. Closing. |
Awesome! Thanks! |
Lines like
are being wrongly treated by F* highlighter.
To see the bug, look at this F* source file
I made a quick fix to the grammar, but since the referenced project that has the currently-in-use fstar grammar file seems to be abandoned, I don't know where to even put it :)
The text was updated successfully, but these errors were encountered: