Check for [workspace] when finding workspace root#30
Check for [workspace] when finding workspace root#30mgeisler wants to merge 1 commit intorust-analyzer:masterfrom
[workspace] when finding workspace root#30Conversation
|
Eh, ehm... This fails because the tests interact with each other: the first unit test will read the environment variable and cache it. So this will need some other approach to be testable (an Integration test could work, but it doesn't have access to the private |
|
You could make an integration test which creates a file containing |
Before, the top-most `Cargo.toml` file was used. Now we use the nearest `Cargo.toml` file which contain a line saying `[workspace]`. This should avoid false positives when Cargo workspaces are nested inside each other: in this case, the inner package will have an empty `[workspace]` table.
9960b05 to
2d8af43
Compare
Ah, that's a good idea! I was shying away from that approach since I feared that I would need to call |
Before, the top-most
Cargo.tomlfile was used. Now we use the nearestCargo.tomlfile which contain a line saying[workspace].This should avoid false positives when Cargo workspaces are nested inside each other: in this case, the inner package will have an empty
[workspace]table.