Originally created by @udf2457 on GitHub (Feb 10, 2024).
Please consider adding documentation for interop with Bazel, in particular bzlmod and gazelle.
Thank you
Originally created by @udf2457 on GitHub (Feb 10, 2024).
Please consider adding documentation for interop with Bazel, in particular `bzlmod` and `gazelle`.
Thank you
@silicon-ninja The way I've typically seen it done at other projects is they create an MVP skeleton example repo which has the bare minimum, i.e.:
BUILD
MODULE.bazel
Other project-specific files/folders necessary to demonstrate the functionality (e.g. in your case pkl files located in a sub-folder)
The BUILD would then show the minimum configuration for integration with gazelle (becasue most real-world projects use gazelle). The bzlmod integration itself is inherent from using MODULE.bazel instead of the legacy WORKSPACE.bazel.
So gazelle is used to automatically locate project-specific files (e.g. pkl in your case) and then automatically create a local BUILD file in its immediate directory. Its very popular with e.g. go monorepos, but also other applications (e.g. building gRPC stubs from protobuf files).
Hope this helps clarify ?
@udf2457 commented on GitHub (Feb 11, 2024):
@silicon-ninja The way I've typically seen it done at other projects is they create an MVP skeleton `example` repo which has the bare minimum, i.e.:
- `BUILD`
- `MODULE.bazel`
- Other project-specific files/folders necessary to demonstrate the functionality (e.g. in your case `pkl` files located in a sub-folder)
The `BUILD` would then show the minimum configuration for integration with `gazelle` (becasue most real-world projects use `gazelle`). The `bzlmod` integration itself is inherent from using `MODULE.bazel` instead of the legacy `WORKSPACE.bazel`.
So `gazelle` is used to automatically locate project-specific files (e.g. `pkl` in your case) and then automatically create a local `BUILD` file in its immediate directory. Its very popular with e.g. go monorepos, but also other applications (e.g. building gRPC stubs from protobuf files).
Hope this helps clarify ?
@silicon-ninja commented on GitHub (Feb 11, 2024):
Well, @udf2457. I've used gazelle before it's great but not yet perfect for anything except rules_go in production as we have a monorepo. I like your idea of using gazelle for BUILD file generation. Did you have a look at gazelle directives. This would eliminate using gazelle directives completely if bazel team were to implement this. I think right now team at apple thought of it more like your typical config files that are used for the systems (primarily backend). To validate and use it with ease. Thanks.
@silicon-ninja commented on GitHub (Feb 11, 2024):
Well, @udf2457. I've used `gazelle` before it's great but not yet perfect for anything except `rules_go` in production as we have a monorepo. I like your idea of using gazelle for `BUILD` file generation. Did you have a look at `gazelle directives`. This would eliminate using `gazelle directives` completely if bazel team were to implement this. I think right now team at apple thought of it more like your typical config files that are used for the systems (primarily backend). To validate and use it with ease. Thanks.
We have now released initial Bazel integration, through rules_pkl. I'm not sure what this Issue asks for specifically (Bazel docs before integration). We do not yet have support for gazelle, because it (and Bazel) doesn't like how Pkl does multi-file output.
The generated Bazel docs don't yet integrate with our website build automation (because they render markdown instead of asciidoc). This is on my TODO list. When this is done, the documentation will be part of https://pkl-lang.org
@holzensp commented on GitHub (Apr 23, 2024):
We have now [released initial Bazel integration, through `rules_pkl`](https://github.com/apple/rules_pkl/). I'm not sure what this Issue asks for specifically (Bazel docs before integration). We do not yet have support for `gazelle`, because it (and Bazel) doesn't like how Pkl does multi-file output.
The generated Bazel docs don't yet integrate with our website build automation (because they render markdown instead of asciidoc). This is on my TODO list. When this is done, the documentation will be part of https://pkl-lang.org
I'm not sure what this Issue asks for specifically (Bazel docs before integration)
I thought Apple-peeps were supposed to be geniuses and capable of time travel (docs before integration) @holzensp 😛
In all honesty, the serious answer is you can assume "this issue asks for" a feature request. I will openly admit I could have worded it better / posted it in a better place / whatever.
Nonetheless, thank you for the efforts in getting rules_pkl out, I look forward to trying it out, and of course I will keep my fingers crossed for eventual gazelle integration (followed by docs 😉).
@udf2457 commented on GitHub (May 1, 2024):
> I'm not sure what this Issue asks for specifically (Bazel docs before integration)
I thought Apple-peeps were supposed to be geniuses and capable of time travel (docs before integration) @holzensp
:stuck_out_tongue:
In all honesty, the serious answer is you can assume "this issue asks for" a feature request. I will openly admit I could have worded it better / posted it in a better place / whatever.
Nonetheless, thank you for the efforts in getting `rules_pkl` out, I look forward to trying it out, and of course I will keep my fingers crossed for eventual `gazelle` integration (followed by docs :wink:).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @udf2457 on GitHub (Feb 10, 2024).
Please consider adding documentation for interop with Bazel, in particular
bzlmodandgazelle.Thank you
@silicon-ninja commented on GitHub (Feb 11, 2024):
How do you want it to look like @udf2457 ?
@udf2457 commented on GitHub (Feb 11, 2024):
@silicon-ninja The way I've typically seen it done at other projects is they create an MVP skeleton
examplerepo which has the bare minimum, i.e.:BUILDMODULE.bazelpklfiles located in a sub-folder)The
BUILDwould then show the minimum configuration for integration withgazelle(becasue most real-world projects usegazelle). Thebzlmodintegration itself is inherent from usingMODULE.bazelinstead of the legacyWORKSPACE.bazel.So
gazelleis used to automatically locate project-specific files (e.g.pklin your case) and then automatically create a localBUILDfile in its immediate directory. Its very popular with e.g. go monorepos, but also other applications (e.g. building gRPC stubs from protobuf files).Hope this helps clarify ?
@silicon-ninja commented on GitHub (Feb 11, 2024):
Well, @udf2457. I've used
gazellebefore it's great but not yet perfect for anything exceptrules_goin production as we have a monorepo. I like your idea of using gazelle forBUILDfile generation. Did you have a look atgazelle directives. This would eliminate usinggazelle directivescompletely if bazel team were to implement this. I think right now team at apple thought of it more like your typical config files that are used for the systems (primarily backend). To validate and use it with ease. Thanks.@dieu commented on GitHub (Feb 27, 2024):
@silicon-ninja, does PKL have integration with Bazel?
@silicon-ninja commented on GitHub (Feb 27, 2024):
Not yet, I am trying to write the rules. Maybe this week.
@dieu commented on GitHub (Feb 27, 2024):
@silicon-ninja Nice, looking forward to trying it out.
@holzensp commented on GitHub (Apr 23, 2024):
We have now released initial Bazel integration, through
rules_pkl. I'm not sure what this Issue asks for specifically (Bazel docs before integration). We do not yet have support forgazelle, because it (and Bazel) doesn't like how Pkl does multi-file output.The generated Bazel docs don't yet integrate with our website build automation (because they render markdown instead of asciidoc). This is on my TODO list. When this is done, the documentation will be part of https://pkl-lang.org
@udf2457 commented on GitHub (May 1, 2024):
I thought Apple-peeps were supposed to be geniuses and capable of time travel (docs before integration) @holzensp
😛
In all honesty, the serious answer is you can assume "this issue asks for" a feature request. I will openly admit I could have worded it better / posted it in a better place / whatever.
Nonetheless, thank you for the efforts in getting
rules_pklout, I look forward to trying it out, and of course I will keep my fingers crossed for eventualgazelleintegration (followed by docs 😉).