Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust build support: Find Cargo.lock file upwards in tree
Cargo, the build tool for the rust ecosystem, provides a feature named "workspaces". In workspaces, multiple library- and binary-crates can be bundled together in one repository/project. The workspace functionality also provides functionality where dependencies are built once for several crates in the workspace. Thus the "Cargo.lock" file (as well as the ./target folder where the final binary lives) are placed in the top-level directory of the repository, while the `cargo build` command may be called somewhere in the working tree. Because of this we need to make sure that we find the `Cargo.lock` file by not only searching the current directory but also the directories above the `${sourceRoot}`. This change introduces a little helper to walk up the file tree and check for a file, starting with the current directory.
- Loading branch information