theoremlp / rules_multitool

Bazel rules for ergonomic tool definitions
Apache License 2.0
24 stars 5 forks source link

Fix lockfile registration to ensure root module lockfiles win conflicts #43

Closed mark-thm closed 5 months ago

mark-thm commented 5 months ago

Issue

Fixes #41.

41 highlighted that my assumption that a root module lockfile would override lockfiles coming from module dependencies. The iteration order of module_ctx.modules is well specified and opposite of what I had assumed when originally writing this code.

Summary

Reverse the iteration order of module_ctx.modules to ensure that root module declared tools win over module dependency declared tools.