tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.26k stars 108 forks source link

False positive syntax error when using dotted key syntax #601

Closed msrd0 closed 2 months ago

msrd0 commented 2 months ago

I recently learned that you can write mydep.path = ... instead of mydep = { path = ... }. However, this amazing extension unfortunately gives a false positive syntax error when using this syntax:

Screenshot_2024-04-20-21-11-53

This is the relevant toml snippet from my workspace Cargo.toml:

[workspace.dependencies]
mydep.path = "./mydep"

Given that cargo accepts my file, I assume it is valid toml and should not trigger syntax errors.

panekj commented 2 months ago

Extension isn't distinguishing valid values, it's all provided by file schema in which case it might have recognised file as something other than Cargo Manifest, you have outdated schema downloaded or there are local overrides in place.

panekj commented 2 months ago

I also can't reproduce this problem locally. image

tamasfe commented 2 months ago

The error is not coming from this extension, this repo is for the Event Better TOML extension.

msrd0 commented 2 months ago

Hm weird, I don't have any other toml extensions installed. But today the error is gone so I have no idea what the problem was. I didn't change any settings since yesterday :shrug: