Add ReScript interface extension '.resi' by namenu · Pull Request #6161 · github-linguist/linguist · GitHub
Skip to content

Add ReScript interface extension '.resi'#6161

Merged
lildude merged 2 commits into
github-linguist:mainfrom
namenu:rescript-resi
Jun 2, 2025
Merged

Add ReScript interface extension '.resi'#6161
lildude merged 2 commits into
github-linguist:mainfrom
namenu:rescript-resi

Conversation

@namenu

@namenu namenu commented Nov 14, 2022

Copy link
Copy Markdown
Contributor

This PR adds ReScript language's interface files (.resi) in addition to implementation (.res) files.

Description

This PR supplements the original implementation introduced in #4975.

Checklist:

@namenu namenu requested a review from a team as a code owner November 14, 2022 13:53
@glennsl

glennsl commented Mar 17, 2023

Copy link
Copy Markdown

@lildude

lildude commented Mar 18, 2023

Copy link
Copy Markdown
Member
  • Treat this as a single-file-per-repo extension and use the 200-file requirement instead. Because public repos are mostly libraries, and most libraries are simple enough to only need a single .resi file to describe their public interface.

No, as this isn't the case and is bending the "rules" to suit a single use case. This will in turn set a precident which I'll have to argue over and over again.

  • Include private repositories, if possible, as they tend to have a higher amount of these files since they're more often complex applications that need more internal abstraction than simple libraries. As just one example, the private repo I'm working on has a 1-10 ratio of resi. to .res files (16 of 162, to be precise).

Most definitely not. This is an invasion of privacy and contradicts the whole purpose of private repos. Private repos are also private to GitHub staff.

  • Factor in .res files to get a better sense of language popularity.

Linguist doesn't work like that. It looks at files in isolation so we do the same thing for the popularity requirement.

There is already a solution users can, and many do, use: implement an override in the repo like these repos to tell Linguist to treat these files as ReScript.

@glennsl

glennsl commented Mar 18, 2023

Copy link
Copy Markdown

@lildude lildude requested a review from a team as a code owner June 2, 2025 08:39

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

LGTM. Thanks.

Important

The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.

@lildude lildude added this pull request to the merge queue Jun 2, 2025
Merged via the queue into github-linguist:main with commit 9d86ae3 Jun 2, 2025
5 checks passed
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Sep 5, 2025
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.

3 participants