facebook / starlark-rust

A Rust implementation of the Starlark language
Apache License 2.0
672 stars 53 forks source link

Bazel: Fix relative go to definition in external repositories #103

Closed cameron-martin closed 6 months ago

cameron-martin commented 6 months ago

The resolve root was calculated incorrectly for relative load statements in external repositories. Instead of removing the file's path relative to the external repository, it only kept this part. For example if the current file is $(bazel info output_base)/external/foo/bar/BUILD, it would compute the resolve root as bar/BUILD, whereas it needs to be $(bazel info output_base)/external/foo.

facebook-github-bot commented 6 months ago

@ndmitchell has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 6 months ago

@ndmitchell merged this pull request in facebookexperimental/starlark-rust@c696737c7408e430ab40d928c81a382b0da10665.