Add Dune (OCaml build system) by kisaragi-hiu · Pull Request #6814 · github-linguist/linguist · GitHub
Skip to content

Add Dune (OCaml build system)#6814

Merged
lildude merged 4 commits into
github-linguist:masterfrom
kisaragi-hiu:dune
Aug 29, 2024
Merged

Add Dune (OCaml build system)#6814
lildude merged 4 commits into
github-linguist:masterfrom
kisaragi-hiu:dune

Conversation

@kisaragi-hiu

@kisaragi-hiu kisaragi-hiu commented May 6, 2024

Copy link
Copy Markdown
Contributor

Description

Dune is a build system for OCaml, used in a large number of OCaml projects. This PR adds classification and syntax highlighting support for it.

I specified ace_mode: lisp because Dune is an Sexp-based language. I'm guessing that this is appropriate.

Checklist:

@kisaragi-hiu kisaragi-hiu requested a review from a team as a code owner May 6, 2024 17:04
@kisaragi-hiu kisaragi-hiu changed the title Add Dune Add Dune (OCaml build system) May 14, 2024

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Marking as pending popularity as the two workspace files aren't sufficient yet.

Comment thread lib/linguist/languages.yml Outdated

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewing this with fresh eyes, I don't think it makes sense splitting this out into different languages. They all share the same grammar and are grouped together so it makes sense to put them all into a single Dune language definition.

I note you've manually set each entry in this PR with a different scopes, however the upstream grammar only has a single source.dune so your other scopes won't work. This also further confirms these are all the same language so don't need separate entries.

Please merge these languages into a single Dune language.

@kisaragi-hiu

Copy link
Copy Markdown
Contributor Author

@lildude lildude dismissed their stale review August 29, 2024 14:02

Changes applied. Pending popularity of everything but the dune-project file.

@lildude

lildude commented Aug 29, 2024

Copy link
Copy Markdown
Member

As an FYI, dune-project currently meets our usage requirements. dune is close. The other two are miles off. In short, everything but dune-project is preventing this PR from being merged.

If you want, you can make this PR just for dune-project and add support for the others as popularity grows. User will be able to use an override in the meantime.

Since they all share the same grammar, they should just be considered as
one language. The grammar used also only defines one source.dune scope.
- `dune` is only used by a bit over 100 repositories (5 pages), the
  1.8k in the search results isn't what we're counting here
- The two workspace files have even fewer uses
@kisaragi-hiu

Copy link
Copy Markdown
Contributor Author

@lildude lildude added this pull request to the merge queue Aug 29, 2024
Merged via the queue into github-linguist:master with commit ebbedf0 Aug 29, 2024
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants