Skip to content
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

Add ReScript programming language #4975

Merged
merged 9 commits into from
Nov 5, 2020
Merged

Conversation

brnrdog
Copy link
Contributor

@brnrdog brnrdog commented Aug 28, 2020

Description

This pull request adds ReScript programming language.
ReScript was born from a new syntax introduced in Reason BuckleScript 8.1.

Checklist:

@brnrdog
Copy link
Contributor Author

brnrdog commented Aug 28, 2020

@chenglou @ryyppy Unfortunately the colour #df4b37 is too close to #e34c26 and #df4b37, which are colours already defined for other languages, so the test fails. Would you have another colour suggestion?

@chenglou
Copy link

What about #e6484f? That's the other better red we use

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.

Woah! You're removing all the license files in this PR 😱. Please put those back. The only license file change we should see is the addition of the license file for the grammar, which I've noted doesn't appear to have a license.

lib/linguist/languages.yml Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
.gitmodules Show resolved Hide resolved
@brnrdog
Copy link
Contributor Author

brnrdog commented Sep 3, 2020

Woah! You're removing all the license files in this PR 😱. Please put those back. The only license file change we should see is the addition of the license file for the grammar, which I've noted doesn't appear to have a license.

Whoops sorry! It should be fixed now!

I'm still trying to find an available option for the ReScript color, there are many shades of red registered already.

@brnrdog brnrdog force-pushed the rescript branch 2 times, most recently from 01a78f0 to f19ec31 Compare September 7, 2020 10:17
@brnrdog
Copy link
Contributor Author

brnrdog commented Sep 7, 2020

I've managed to find a good color match for ReScript: #ed5051

@ryyppy
Copy link
Contributor

ryyppy commented Sep 9, 2020

I've managed to find a good color match for ReScript: #ed5051

That color works for us! Thanks for figuring this out 😅

@ryyppy
Copy link
Contributor

ryyppy commented Sep 25, 2020

@lildude I think we fulfilled all missing requirements, just wondering if there's anything else left that needs to be done to push this PR further?

@lildude
Copy link
Member

lildude commented Sep 29, 2020

@lildude I think we fulfilled all missing requirements, just wondering if there's anything else left that needs to be done to push this PR further?

Yes. We still need to identify as many of the other languages that use the .res extension as possible and add support for them to this PR.

As this PR stands every file on GitHub.com with a .res extension would be identified as ReScript because this would become the only language with that extension associated with it which means we'll never get to the heuristic.

@bloodyowl
Copy link

Is there a way we can make a two-step pass on this? First, merge the PR without extension inference (making ReScript known to GitHub and configurable through .gitattributes) and then add some inference?

@lildude
Copy link
Member

lildude commented Oct 9, 2020

Is there a way we can make a two-step pass on this? First, merge the PR without extension inference (making ReScript known to GitHub and configurable through .gitattributes) and then add some inference?

Unfortunately not as that would require changes to the tests to accept a language without an extension or filename which kind of defeats the purpose.

If we use the search results from the more generic search:code extension:res NOT nothack search, we can see XML is clearly identified as a popular user of this extension and from a quick calculation, it fits the criteria for inclusion in Linguist, so you could get this moving by adding .res to XML and add a sample.

From a search of those files that aren't XML or ReScript, most appear to be "binaries" with the x-dtbresource+xml mime type which would be ignored by Linguist and GitHub anyway so wouldn't count to the stats or be identified as ReScript or XML.

@ryyppy
Copy link
Contributor

ryyppy commented Oct 14, 2020

@lildude I added .res as an extension to the XML language and and added a holobloc XML file as a sample

@lildude
Copy link
Member

lildude commented Oct 26, 2020

Thanks @ryyppy. Can you please update the template in the OP with a link to the source of the XML file and state the license for the file.

Other than that, this is looking good to me.

@ryyppy
Copy link
Contributor

ryyppy commented Oct 26, 2020

Great! I don't have edit rights for the thread (will need to ping the OP to do that).

Will drop the information in this comment for now:

Sample Source:

Sample License:

@brnrdog
Copy link
Contributor Author

brnrdog commented Oct 26, 2020

@ryyppy @lildude thanks, I just updated the description with the new sample source and license!

@lildude lildude merged commit 7c9740d into github-linguist:master Nov 5, 2020
@brnrdog brnrdog deleted the rescript branch November 5, 2020 10:11
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 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.

None yet

5 participants