-
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
Move Starlark to separate language #4759
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.
Noice
lib/linguist/languages.yml
Outdated
extensions: | ||
- ".bazel" | ||
- ".bzl" | ||
- ".starlark" |
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.
Copybara uses *.sky as well.
The Go Starlark interpreter examples uses *.star.
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.
I think .sky
should be abandoned since Skylark is Starlark at this point. Gonna add .star
since there are 20K hits and it might be a widespread extension in the future. Thanks!
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.
You'll need to remove .starlark
because it falls short of our usage requirements (only 41 files at the time of writing). Otherwise, this looks file to me.
@@ -390,6 +390,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting | |||
- **Squirrel:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle) | |||
- **Stan:** [jrnold/atom-language-stan](https://github.com/jrnold/atom-language-stan) | |||
- **Standard ML:** [textmate/standard-ml.tmbundle](https://github.com/textmate/standard-ml.tmbundle) | |||
- **Starlark:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython) |
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.
Hmm, typo?
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.
@jin Not a typo. The list is auto-generated from whatever grammars are assigned to a language, which in this case happens to be Python.
lib/linguist/languages.yml
Outdated
extensions: | ||
- ".bazel" | ||
- ".bzl" | ||
- ".starlark" |
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.
You'll need to remove .starlark
because it falls short of our usage requirements (only 41 files at the time of writing). Otherwise, this looks file to me.
Yup, just have to wait for a GitHub staff member to give their 👍 of approval before we can merge. |
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 your contribution @arturdryomov!
I've left a couple comments inline. I'm 👍 for the separation of Starlark and Python, but have some concerns regarding the two new file extensions (see below).
/cc @Dominator008 who added the .bzl
extension to Python in #2846.
@pchaigno, do we need to make some changes to merge this? I hope I haven’t missed something 😰 |
@pchaigno, sorry for pinging you again. Is there anything else needs to be changed? Just attempting to not abandon this PR when it slips away from the Recent Activity section on GitHub 😉 |
@arturdryomov We need to wait for a GitHub staff member to give a final 👍 of approval before we can merge. 😉 It's a matter of policy, because Linguist is a production dependency of the site. |
Huzza! Thanks @lildude! |
now that github-linguist/linguist#4759 is in place, i'm happy to have those counted :)
now that github-linguist/linguist#4759 is in place, i'm happy to have those counted :)
- WORKSPACE | ||
aliases: | ||
- bazel | ||
- bzl |
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.
I see you mentioned .star
as one of the extensions in your PR description. Any reason why it was left out?
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.
@c4milo Please see #4759 (comment).
Starlark is a scripting language inspired by Python.
Starlark is mostly a Bazel build system child. But it gains a bit of traction. For example, the Buck build system adopts it as well. Interestingly Drone CI supports Starlark as a configuration language.
GitHub stats:
.bzl
files (118K hits);.bazel
files (413K hits);.star
files (20K hits);.starlark
files (41 hits);What this change does:
BUILD
,WORKSPACE
) and Buck (BUCK
) related from Python to Starlark;.starlark
extension;CC @jin, @artem-zinnatullin