fix: look for MODULE.bazel in child repos to remove need for stub WORKSPACE #416
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.
TL;DR
This minimal change in this PR allows me to use example/child workspaces for integration test without creating empty WORKSPACE files.
The Challenge
Following the
README.md
to implementrules_bazel_integration_test
, I found that the child_workspaces needed to have stubbed/emptyWORKSPACE
files in them; creating empty files caused the error to disappear:This seems to be that the lines modified are not looking for
MODULE.bazel
files as a signal that a valid child workspace exists:Suggested Fix
This minimal change in this PR allows me to re-remove the empty
WORKSPACE
files and have proper functionality back with abzlmod
-formatted ruleset, with my child_workspaces -- my examples -- detected by presence ofMODULE.bazel
as I would expect. The user can choose existingWORKSPACE
,WORKSPACE.bazel
,MODULE.bazel
, orREPO.bazel
as can be seen in the PR.NOTE 1: I'm unsure whether
REPO.bazel
is appropriate here.NOTE 2: if you test this, you may need to use an absolute path on your
local_path_override()
for therules_bazel_integration_test
: I found that a relative path caused the child workspaces to look in the run files location for arules_bazel_integration_test
whereas I had my working copy parallel/peer to my ruleset that I was developing.