openapi-generator-bazel
openapi-generator-bazel copied to clipboard
bzlmod support
This is my attempt at adding bzlmod support for this library https://github.com/OpenAPITools/openapi-generator-bazel/issues/50.
Context around changes
I moved away from using jvm_maven_import_external
because it did not seem to support bzlmod and only generated a WORKSPACE file. So I migrated the code to using rules_jvm_external
.
Open issues
-
I haven't looked into it yet but using the
maven_install.json
lock file doesn't seem to work for non-bzlmod usage ofrules_jvm_external
. I'm not sure why. Ideally I would like to preserve the hermiticity of the original code. -
Another thing that I haven't figured out it how someone would customize the version of the CLI to use when running under bzlmod. I'd think this would happen with a module extension, but I'm not able to find a way to trigger the extension logic in my attempts.
-
I still need to cleanup the README.
Testing
Tested locally (worked with commenting out WORKSPACE content as well)
jparraga@U-2AQ9340S9KI77:~/code/openapi-generator-bazel$ bazel build //... --experimental_enable_bzlmod
INFO: Analyzed 8 targets (80 packages loaded, 835 targets configured).
INFO: Found 8 targets...
INFO: Elapsed time: 2.018s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
I'm relatively new to Bazel so there are a few things I'm not sure how to solve.
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.
Let me know if you need help fixing it.
Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account
please resolve the merge conflicts when you've time. thanks
Hi, @wing328 @Sovietaced, I was about to do this myself as I wanted it integrated in my repo. Any thoughts on moving this forward? More than happy to take over the merging.
@geoffreygarrett feel free to take the changes and merge them.