Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crate analyzer fails to parse version = { workspace = true } #19

Open
Stausssi opened this issue Aug 21, 2024 · 0 comments
Open

Crate analyzer fails to parse version = { workspace = true } #19

Stausssi opened this issue Aug 21, 2024 · 0 comments

Comments

@Stausssi
Copy link

Hi,

first of all, thanks for this extension 🚀 It does help me a lot!

I've just now updated my project structure to define the package version centrally inside the workspace Cargo.toml and then only reference it in the packages using version = { workspace = true }.
My project is structured like this:

├── package-1
│   ├── src
│   │   ├── package-1.rs
│   ├── Cargo.toml
├── package-2
│   ├── src
│   │   ├── package-2.rs
│   ├── Cargo.toml
...
├── Cargo.toml

Previously, every package had the same version specified inside the respective Cargo.toml, now I've moved it to the top-level workspace Cargo.toml.

Trying to build the docs now results in:

Error analyzing crate: Could not analyze crate: Error parsing: /..../package-1/Cargo.toml
TOML parse error at line 3, column 11
  |
3 | version = { workspace = true }
  |           ^^^^^^^^^^^^^^^^^^^^
invalid type: map, expected a string

My conf.py:

rust_crates = [
    "../../package-1",
    "../../package-2",
    ...
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant