Skip to content

contrib: remove syntax (Dockerfile syntax) files#50606

Merged
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:rm_contrib_syntax
Aug 4, 2025
Merged

contrib: remove syntax (Dockerfile syntax) files#50606
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:rm_contrib_syntax

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 1, 2025

The Dockerfile syntax is now maintained as part of BuildKit in the https://github.com/moby/buildkit repository, but our contrib still had syntax highlighting files for various editors;

  • The TextMate (.tmbundle) syntax was last update 9 months ago in c2029cb, but this was a stale pull request from 2018, so at least 7 Years behind on updates to the syntax.
  • The vim syntax is now integrated in upstream, and our copy was remove 6 Years ago in 5511f45.
  • The Nano syntax was added 10 Years ago in 76bc44f, and received an update 9 Years ago in 4cb71f8, and received no contributions since.
  • The kate syntax was already unmaintained, and removed 9 Years ago in a2f695d.

I think it's fair to state that these are unmaintained and severely outdated. I do think it would be good to have maintained versions of such files, as it can improve the experience for users. However, this would be more suitable for the BuildKit project, and I'm not sure if the current copies of these files are a good starting point (if needed, they can still be obtained from git history).

This patch removes the files.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

contrib: remove Dockerfile syntax highlighting files for `nano` and TextMate (`tmbundle`) as they were unmaintained and outdated.

- A picture of a cute animal (not mandatory but encouraged)

The Dockerfile syntax is now maintained as part of BuildKit in the
https://github.com/moby/buildkit repository, but our contrib still
had syntax highlighting files for various editors;

- The TextMate (`.tmbundle`) syntax was last update 9 months ago
  in c2029cb, but this was a stale
  pull request from 2018, so at least 7 Years behind on updates to
  the syntax.
- The vim syntax is now integrated in upstream, and our copy was
  remove 6 Years ago in 5511f45.
- The Nano syntax was added 10 Years ago in 76bc44f,
  and received an update 9 Years ago in 4cb71f8,
  and received no contributions since.
- The kate syntax was already unmaintained, and removed 9 Years ago
  in a2f695d.

I think it's fair to state that these are unmaintained and severely outdated.
I _do_ think it would be good to have maintained versions of such files,
as it can improve the experience for users. However, this would be more
suitable for the BuildKit project, and I'm not sure if the current copies
of these files are a good starting point (if needed, they can still be
obtained from git history).

This patch removes the files.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

🫡

@austinvazquez austinvazquez merged commit 4761d97 into moby:master Aug 4, 2025
187 checks passed
@thaJeztah thaJeztah deleted the rm_contrib_syntax branch August 4, 2025 14:44
@alexr00
Copy link

alexr00 commented Aug 6, 2025

👋 from the VS Code team. I maintain our textmate grammars (which really consists of pulling them from other OSS projects), and we used to get out Dockerfile grammar from here. It sounds like there are no plans at the moment to have a new Dockerfile grammar. We will hold at the last version of the grammar that was here, but if a new maintainer of the Dockerfile textmate grammar comes along, I'd really appreciate a ping so we can update our scripts to pull from there! 🙏

@thaJeztah
Copy link
Member Author

Oh, hi @alexr00! Thanks for reaching out (hope I didn't cause a massive headache with this PR).

So, situation with these was that;

  • This repository is no longer the "source of truth" for the Dockerfile syntax. The syntax evolved (significantly), and is now maintained in the BuildKit project; releases of the Dockerfile "front-end" (which handles the parsing), including docs for each version can be found using the dockerfile/xxx tags. For example, the latest stable release of the Dockerfile "front-end" here; dockerfile/1.17.1.
  • This also meant that the contrib/syntax directories were very out of sync with latest versions, so only would provide a minimal subset of the syntax (possibly invalidating newer, but valid, versions).

And the very honest part also was that these syntaxes were not tested, and no maintainer had proper knowledge of these to maintain them (I know that I merged the last change to the tmbundle one in #36766, but really "I trust the contributor and commenters to have verified it works"). That's not a great situation 😂

My ideal would be for the BuildKit project to carry these as part of the dockerfile front-end code (can still be a "contrib" to indicate it's not guaranteed to be stable). I did try to reach out to them internally some time ago, but I can try to do this again, or to open a pull request to extract the code and transfer it.

I know @rcjsuen did a lot of digging into the syntax as part of his work on https://github.com/docker/docker-language-server and the https://github.com/docker/vscode-extension, so (if the BuildKit maintainers accept the move) maybe he's able to assist in bringing them up to speed.

But contributions very likely would be welcome there (let me know if you know people with expertise in these areas, @alexr00).

Short term, I would suggest for VS Code to pull the syntax from the last tag (v28.3.3) in this repository that had these files, or any tag created from the v28.x branch (as they won't be removed there); https://github.com/moby/moby/tree/v28.3.3/contrib. At least, that would give you the syntax what was present, until we found a stable home for these files.

Let me know your thoughts! (Thanks again for reaching out!)

@thaJeztah
Copy link
Member Author

Short term, I would suggest for VS Code to pull the syntax from the last tag (v28.3.3) in this repository

Oh! Let me know if that's an option; I'm not a VS Code user myself, and don't know how it gets the grammar (i.e., is it bundled, or is it installed at runtime, and currently hard-coded to download the file from master).

If this is currently breaking users (i.e., trying to download from master), let me know; I'm happy to (temporarily) revert the commit to give you time to update it to use the tagged version. 🫶

@alexr00
Copy link

alexr00 commented Aug 6, 2025

Thanks for all the details @thaJeztah! It is definitely not breaking users, we pull the TM grammars into our repo and then the built product has them all bundled in. We are totally fine to hold at the last version that we pulled! We do occasionally have users file bugs against us for grammars, and then I move them to the relevant upstream repo. Eventually, we'll probably need to move to another TM grammar (if such a thing exists) so that fixes can be made to the grammar, which is why I was curious about whether there would be a new maintainer, but for now we're ok!

@thaJeztah
Copy link
Member Author

thaJeztah commented Aug 6, 2025

Thank you! That's at least a relief that I didn't break stuff 😅. I will have a look at my other suggestions; i.e., to see if moving the files (even if they're incomplete) to the BuildKit repository would be accepted. At least that would give them a new home, and a potential place for people to contribute. I'll /cc you on that PR if I get round to it so that you can follow progress, and if you have recommendations on "experts" for these grammars, then I'm still "all ears"!

@alexr00
Copy link

alexr00 commented Aug 6, 2025

Thank you! /cc would be perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants