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

languages: add HashiCorp Sentinel #2282

Closed
wants to merge 1 commit into from
Closed

languages: add HashiCorp Sentinel #2282

wants to merge 1 commit into from

Conversation

vancluever
Copy link
Contributor

This adds HashiCorp's Sentinel policy-as-code language as a supported
language.

https://docs.hashicorp.com/sentinel

This adds HashiCorp's Sentinel policy-as-code language as a supported
language.

https://docs.hashicorp.com/sentinel
@joshgoebel
Copy link
Member

Currently the core library is closed to new language submissions as there are not really even enough core maintainers to maintain our existing languages (much less add and support new ones).

Context: #2149

We'd be happy to create a repository for you in the highlightjs organization if you'd like to host (and maintain) your grammar there. And feel free to join the discussion.

I'd like to make it much easier for people to build custom bundles (including 3rd party grammars), that is something I'll be looking into after we switch to a simpler build system for the core library.

That said it's currently terribly easy to "add" a new language just be including an extra JS file in the browser... so if vlang.io wants to support this they only need to include the vlang.js file AFTER they load the main library, or build a custom build.

@vancluever
Copy link
Contributor Author

Thanks @yyyc514.

We are using highlight.js in Sentinel's new website for syntax highlighting. Currently the site hosts a local copy like you mentioned, but upstreaming was the logical step to assist with maintenance, especially if anyone else noticed issues.

I'd be open to a repo that I/we at HC maintained for sure. Is there an existing framework yet for packaging, testing, and distribution? I guess as this gets solidified (it seems that #2149 is still in discussion), there will be more info.

Let me know!

@joshgoebel
Copy link
Member

I'd be open to a repo that I/we at HC maintained for sure. Is there an existing framework yet for packaging, testing, and distribution?

NO, but there are samples inside the HLJS organization such as:
https://github.com/highlightjs/highlightjs-robots-txt

You'd just package it as an npm package. No great testing story yet.

@egor-rogov
Copy link
Collaborator

Hi @vancluever,
I've created a repo for this language: https://github.com/highlightjs/highlightjs-sentinel
Please accept the invite to become administrator of the repo.
As Josh said, you can look at other repos under highlightjs for examples.

@vancluever
Copy link
Contributor Author

@egor-rogov @yyyc514 thanks for that! I've populated the repository with the content from this PR.

Assuming that's all that's necessary for now this can be closed I guess?

Regarding builds - will you all be building/pushing the packages or is that left to the maintainers? I notice there isn't one for robots.txt yet.

@joshgoebel
Copy link
Member

Regarding builds - will you all be building/pushing the packages or is that left to the maintainers?

I think that'd be up to maintainers. And I don't think having a NPM is an absolutely necessity, but it makes things easier for people wanting to use it via NPM.

@vancluever
Copy link
Contributor Author

Alright, I'm going to close this off now, since the repo is populated. We'll figure out a strategy for maintaining this on NPM if we need to, otherwise it's just available by source.

Thanks again you two!

@vancluever vancluever closed this Dec 4, 2019
@joshgoebel
Copy link
Member

We'll figure out a strategy for maintaining this on NPM if we need to

That's just a matter of packaging and publishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants