filecoin-station / zinnia

Runtime for worker nodes executing modules in a resource-limited sandbox
https://crates.io/crates/zinnia
Other
17 stars 2 forks source link

fix: report canonicalized module path #560

Closed bajtos closed 1 month ago

bajtos commented 1 month ago

In 31c029238 (#557), I improved the error message printed when the module is outside of the root dir to include the file path of the imported module. That's not enough to troubleshoot the problem, because we print the non-canonical path, which is potentially different from the string we use to check if the module path is within the root dir.

In this commit, I refactored the method to make the code easier to follow, and improved the error message to print the canonicalized paths of the module and the root dir.

Links: