Bazel and bazel central registry support#136
Conversation
|
Am I right in thinking this just involves adding some files to the GitHub repo (and a minor tweak to .gitignore)? Or would it be necessary also to include these files in the release tarballs? |
|
Just the GitHub repo is fine. Unless you'd prefer one of the tarball over the repository archive to be in the bazel central registry. e.g. https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/zlib/1.2.11/source.json#L8 |
|
OK, I have merged this pull request but it's up to you or any other Bazel user to do any necessary maintenance. I note that MODULE.bazel contains the PCRE2 version number. Will that have to be updated for each release? |
|
Yeah the version will have to be updated each release. Is there a script I can modify to make that happen? |
|
PrepareRelease is probably the right place to do something like that. Unfortunately, it does not at the moment make any use of the release number, so you would have to write code to pick that out of configure.ac. PrepareRelease already makes use of Perl, so adding a short in-line Perl script would be fine. |
I mainly use bazel as my build system and I was wondering if pcre2 would be willing to accept these files upstream to add pcre2 to the bazel central registry. I can write patches for the repository and submit it that way, but it is preferred to have them in the repository.
At the moment this is a minimal configuration that successfully runs the
pcre2demo. e.g.If this was accepted and submited to the bazel central registry then bazel users would only have to add the following to their
MODULE.bazel.And then any target that uses pcre2 would simply be added to their
depslist.I'm happy to add tests that cover bazel and make any other modifications you require.