Migrate from WORKSPACE
to MODULE.bazel
.
#172
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This represents a pretty significant amount of work to move away from the old
and deprecated
WORKSPACE
way of managing Bazel external dependencies, to usingMODULE.bazel
aka Bzlmod.At this point, I have
bazel build //...
andbazel test //...
up and runningsmoothly. The only thing I am aware of that doesn't work is
bazel run @hedron_compile_commands//:refresh_all
, but it seems that the issue I amrunning into is getting fixed
soon.
In the process of doing this I did a few things to get the migration over the
line.
Migrated from
rules_docker
torules_oci
. The former is more or lessdeprecated and there's no Bazel module for it in BCR. There is a module for
rules_oci
though, which seems to be the spiritual successor torules_docker
.They do mostly the same things, although in different ways.
Bumped version of most dependencies. The main reason for doing so was to get
on versions of dependencies that likely had much better support for Bzlmod.
Struggled a lot to get the dependencies on the Docker Go libraries working,
and ended up refactoring my old version of
dockertest
in favor of one based ongithub.com/ory/dockertest/v3
which I know from professional experience worksperfectly fine and doesn't require me to do some of the lower-level Docker stuff
myself.
Removed a bunch of the existing Docker-related stuff, since I couldn't be
bothered to fix it and will likely not be using it in the near future anyway.
Removed the
./bazel
script, and chose to just rely on Bazelisk beinginstalled on the system instead.
Probably more things I'm forgetting, but they're probably not that important if
I can't think of them right now.