rapidjson icon indicating copy to clipboard operation
rapidjson copied to clipboard

Bazel Support

Open zaucy opened this issue 6 years ago • 6 comments

Would the maintainers here be willing to support Bazel? It would require at minimum a WORKSPACE and BUILD.bazel file in this repository. If tests were supported it would require a couple more BUILD.bazel files.

I'd be willing to make a PR and help with any bazel related support that crop up in the issues here.

zaucy avatar Aug 21 '19 05:08 zaucy

I have not investigated what is it. But RapidJSON is an header-only library, cmake is only used for building unit tests and examples.

So is it really need to add more build system?

miloyip avatar Sep 26 '19 03:09 miloyip

@zaucy You can inject a BUILD file with http_archive without changing this repository.

ashi009 avatar Jul 30 '20 06:07 ashi009

@ashi009 You absolutely can, but having the build file as part of the repository is much nicer.

zaucy avatar Jul 30 '20 06:07 zaucy

@ashi009 You absolutely can, but having the build file as part of the repository is much nicer.

To be honest, I actually prefer the manual way. As through that I can have total control over how the third party code being build. And it's easier to maintain those build files from your repo instead of from upstream.

ashi009 avatar Jul 30 '20 06:07 ashi009

I believe build_file_content or build_file in an http_archive rule take presidence over the existance of the build files in a repository so if a repository did start supporting bazel directly you'd still have the option to control how it is built.

I think there is a lot of value in a repository supporting bazel directly. I find it very nice to just 'import' a bazel package by adding the repository to my bazel WORKSPACE. When I'm working with multiple repositories that might be using a package I don't want to re-set it up everytime. Certainly there could be other solutions such as having another repository that just has the common build files for the various third party packages (which I believe is what this archived repository was going to be https://github.com/bazelbuild/bazel-packages), but I believe having direct bazel support is the way to go.

zaucy avatar Jul 30 '20 07:07 zaucy

note that in 2024 with bzlmod the BUILD file for this can be centralized in the BCR (and the last tagged version is already there)

keith avatar Oct 08 '24 23:10 keith