Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Bazel): Fix local registry modules path #8805

Merged

Conversation

nnobelis
Copy link
Member

Bazel modules are always in a 'modules' directory alongside the bazel_registry.json file. See 1.

The latter is still parsed and will be used in a future commit to handle modules with type 'local_path'.

This is a fixup for 5968180.

@nnobelis nnobelis requested a review from a team as a code owner June 27, 2024 11:02
JSON.decodeFromStream<BazelRegistry>(it)
}

moduleDirectory = registryFile.resolve(bazelRegistry.moduleBasePath)
moduleDirectory = registryFile.parentFile.resolve(BAZEL_MODULES_DIR)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use resolveSibling instead of parentFile.resolve.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.96%. Comparing base (5bcaf9b) to head (dcb5541).
Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8805      +/-   ##
============================================
- Coverage     67.79%   66.96%   -0.84%     
- Complexity     1164     1165       +1     
============================================
  Files           243      243              
  Lines          7711     7843     +132     
  Branches        861      914      +53     
============================================
+ Hits           5228     5252      +24     
- Misses         2127     2230     +103     
- Partials        356      361       +5     
Flag Coverage Δ
funTest-non-docker 33.96% <ø> (ø)
test 38.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Bazel modules are always in a 'modules' directory alongside the
`bazel_registry.json` file. See [1].

The latter is still parsed and will be used in a future commit to handle
modules with type 'local_path'.

This is a fixup for 5968180.

[1]: https://bazel.build/external/registry#index_registry

Signed-off-by: Nicolas Nobelis <[email protected]>
@nnobelis nnobelis force-pushed the nnobelis/fix_bazel_local_path branch from 2f047c4 to dcb5541 Compare June 27, 2024 12:08
@nnobelis nnobelis requested a review from sschuberth June 27, 2024 12:09
@sschuberth sschuberth enabled auto-merge (rebase) June 27, 2024 12:19
@sschuberth sschuberth merged commit 767475e into oss-review-toolkit:main Jun 27, 2024
19 of 20 checks passed
@nnobelis nnobelis deleted the nnobelis/fix_bazel_local_path branch June 27, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants