serayuzgur/crates

Dot notation triggers error, while it's syntactically correct

michalfita opened this issue · 4 comments

Describe the bug
The following line in Cargo.toml triggers three exclamation marks and underscore error next to dot causing the file to be red:

[dependencies]
my-local-crate.path = "../../my-local-crate"

To Reproduce
Open file with above.

Expected behavior
Don't underscore error and don't make the file red.

Screenshots
[None]

Desktop (please complete the following information):

  • OS: any
  • Version: v0.5.10

Additional context
Add any other context about the problem here.

Just want to report that, with the new workspace inherited dependencies, this syntax will have a lot more usage, so it would be good to prioritize this.

Just another dev who got caught out by this! The official workspaces documentation uses the dot syntax which caused me to encounter this very bug.

foo = { workspace = true } works, in case anyone wanted to know the work around.

(I was going to work on a pull request to fix this but I couldn't get the tests to work.)

Edit: apparently this is resolved by #170 but the change hasn't been submitted to the marketplace?

I can confirm that the above workaround works, but otherwise using the regular syntax for the cargo dependencies table causes this issue.

#170 seem to handle workspace only, but not the rest on the valid notation.