move-language / move

Apache License 2.0
2.25k stars 679 forks source link

[BUGFIX][loader] Only add module to verified_dependencies on load #999

Closed amnn closed 1 year ago

amnn commented 1 year ago

...not during publish. During publish we can end up verifying a to-be-published module's dependencies without them being loaded if they exist in the same bundle that is currently being published.

In that case, we don't want to mark the module as having its dependencies verified because that will prevent us from traversing (and actually loading into the compiled module cache) the dependencies when we are loading the module itself.

This manifests as a MISSING_DEPENDENCY error from the loader.

Test Plan

New tests for the loader, exercising the bundle publish flow:

$ cargo nextest -- loader_tests::publish_bundle