-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Wren language #4088
Add Wren language #4088
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Along with addressing my inline comments, you'll need to address the two failing tests too.
Additionally, whilst there are a lot of .wren
files, they're only distributed across 19 repos owned by 19 different people so doesn't meet the "used by hundreds of repositories" requirement yet. I've labelled the PR accordingly.
samples/Wren/ex.wren
Outdated
@@ -0,0 +1,15 @@ | |||
System.print("Hello, world!") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linguist needs real-world usage examples to properly train the classifier. "Hello world" code is never real-world usage code. Please replace this with an example of a file from a real project and provide a reference to it and it's license in a comment in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good sample file to use: https://github.com/munificent/wrenalyzer/blob/master/parser.wren
MIT license: https://github.com/munificent/wrenalyzer/blob/master/LICENSE
type: grammar | ||
name: wren-sublime | ||
license: other | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update your fork with the latest master, and try replacing the grammar with itself using:
script/add-grammar --replace wren-sublime https://github.com/munificent/wren-sublime
This should hopefully use the new Licensed code to correctly and automatically detect the license.
Looks like licenses are still broken - could this be something to do with wren-sublime using a different header than just "MIT License"? GitHub the site doesn't seem to detect that it's MIT either. @munificent I notice you use a similar "$project is licensed under the MIT License:" header in a lot of your repositories. Is there a specific reason for this, as it looks like it trips up GH? |
@lildude
Any ideas? |
Hmmm, I'm not sure why you're getting that error without seeing the full backtrace. I'll see if I can reproduce this locally on a clean installation. |
@lildude It's because This fixes it: diff --git a/script/add-grammar b/script/add-grammar
index 1d16f063..5a0b0b81 100755
--- a/script/add-grammar
+++ b/script/add-grammar
@@ -111,6 +111,7 @@ log "Confirming license"
if repo_old
command('script/licensed')
else
+ repo_new = File.absolute_path(repo_new)
command('script/licensed', '--module', repo_new)
end |
Ahhhh. Makes sense. I like your fix better than mine. |
Tried to apply your fix, @Alhadis, but nothing seems to have changed :/
I can try this on a clean branch from master if that might help? |
@heyitsmeuralex It's an issue with your submodules list. Git submodules are managed outside the usual versioning mechanics. Make sure you've merged the latest changes from When you hit the error the first time, a submodule was probably registered in your local config, even if it wasn't necessarily checked out in the This is I opened #4056 (which has been mostly addressed in #4097). It's a pretty nasty (and less-than-obvious) UX issue. |
No specific reason. I've been copy/pasting that file for ages, since long before GitHub even existed, much less detected licenses. :) I can try to fix it to something GitHub can recognize. |
That would be ✨ for Linguist but also all the visitors to your repos that use this format for the license file as GitHub will be able to automatically detect the license and add it to the top of the repo just above the language stats bar. |
Licensee (the GitHub project that detects licenses) uses https://choosealicense.com/ as its primary source for license texts. If you use that formatting for the MIT license, you can be sure it will be recognized by Licensee. |
OK, I went and fixed the LICENSE files for wren, wrenalyzer, and wren-sublime. I'll eventually work my way through all my various random little repos, but that might take a while. :) |
Added the Wren scripting language (grammar & sample). cc @munificent
Checklist:
Wren example on its website.