kcl-lang / kcl

KCL Programming Language (CNCF Sandbox Project). https://kcl-lang.io
https://kcl-lang.io
Apache License 2.0
1.61k stars 112 forks source link

[Enhancement] Bazel Support #693

Closed kolloch closed 9 months ago

kolloch commented 1 year ago

Feature Request

Is your feature request related to a problem? Please describe:

We are currently evaluating bazel.build for internal use and are also searching for powerful enough easy-to-understand config language and KCL looks really nice! Thanks!

Therefore, I'd like to use KCL and its ecosystem from within Bazel. For reference here are some rule implementations for other config languages:

Describe the feature you'd like:

Since the tooling for KCL is so extensive, there is actually a lot that you can potentially do!

I am a beginner in KCL myself so take the following with a grain of salt. But this is what I consider as basic:

(whether one has more specific rules or fewer more powerful rules is of course a design decision. I think it would make sense to arrange them around the familiar KCL commands)

comfort level:

bonus level:

I am sure, there is more but that would be already awesome.

Describe alternatives you've considered:

Writing it myself ;)

Teachability, Documentation, Adoption, Migration Strategy:

If you use Bazel, that would be awesome. For other similar Buildsystems (Buck2, Pants, ...), it might be a very good starting block.

Peefy commented 1 year ago

Thank you for your attention. We will consider Bazel's support in the next KCL major version in September. ❤️

Peefy commented 10 months ago

Hi there @kolloch, sorry for the late response. I have built the initial version of the Bazel KCL rule here. If you have any questions, please feel free to communicate at any time. In addition, Issues and PRs welcome.

kolloch commented 10 months ago

Hi @Peefy, no worries at all! For now, we will not use KCL :( I hope it will be useful for future me or someone else.

I wonder, though, why you disable sandboxing here? https://github.com/kcl-lang/rules_kcl/blob/main/kcl/defs.bzl#L67-L70

Peefy commented 10 months ago

Hi @Peefy, no worries at all! For now, we will not use KCL :( I hope it will be useful for future me or someone else.

I wonder, though, why you disable sandboxing here? https://github.com/kcl-lang/rules_kcl/blob/main/kcl/defs.bzl#L67-L70

Just a mistake. I've opened a PR to open the sandboxing feature: https://github.com/kcl-lang/rules_kcl/pull/2

Thank you for your reply. :) We are working hard to improve KCL and its surrounding ecology. If you have any questions or ideas, please feel free to contact us through any channels including but not limited to GitHub Issues, PRs, Slack, etc. ❤️

zackzhangverkada commented 1 month ago

This is great! thank you! I created an issue in that repo requesting some additional features to make it better in production: https://github.com/kcl-lang/rules_kcl/issues/4