Comments (7)
This happened to me as well with the exact same error. The workaround I found was to rename Cargo.lock, generate the docset and then rename it back.
Cargo doc generation works normally with Cargo.lock
from cargo-docset.
That's definitely interesting, thank you for the workaround. My guess is that the version of cargo cargo-docset links with probably can't understand the lock file generated by a more recent version of cargo that you use for development.
I could simply update the version of cargo we link against, but that would force me to release a new version for every new Rust release, which is less than ideal. Alternatively, I could remove the direct dependency on cargo and invoke it through std::process::Command
, which may make things a bit more complicated and force me to rewrite part of the code, but would have the benefit of drastically cutting on the compile time for cargo-docset. I'll need to think on this when I'm a bit more awake, but at least we now know of a workaround in the meantime.
from cargo-docset.
Alright, if this crate needs to constantly try and keep up with cargo releases in lockstep to avoid these issues, then I think the sane thing to do here for the sake of maintainability is probably to drop the cargo dependency and just invoke it as a subprocess. It's not like this crate really needs to depend on cargo anyway, and cargo probably accounts for like 90% of the total compile time. I'll get on that ASAP.
from cargo-docset.
Thank you for the report. I never encountered that one so far despite using cargo-docset in workspaces, and the fact that cargo doc runs fine is certainly confusing, I'm gonna need some more information. Do you have the repository that causes the error online ? Being able to reproduce the problem would be a great start.
from cargo-docset.
I'm sorry but at this point in time the repository is private. I tried to make a minimal example with some path dependencies and some git dependencies and even colliding dependencies (one package depends on [email protected]
and the other [email protected]
but failed to do so...
from cargo-docset.
Yeah I've already tried these too, without problems. A minimal example would be very helpful indeed, at this point there's not much that I can do without it. Please let me know if you manage to create one.
from cargo-docset.
Same error message: "Cargo doc error: failed to parse lock file at: …/Cargo.lock"
You asked for a public repo: https://github.com/joelparkerhenderson/demo_rust_rocket
The repo is a typical demo of a typical Rust Rocket app, so I hope you can use it as a good example case. Rust Rocket does use Rust nightly, so perhaps that's relevant. And when I installed cargo-docset, it installed via Rust nightly.
The same error message is happening with my private Rocket repos as well.
When I try the workaround of rename (as above) then cargo docset
succeeds.
from cargo-docset.
Related Issues (20)
- Unwrap error when running hyphenated cargo-docset HOT 1
- Generated Docset doesn't "load" when running on stable HOT 9
- Properly detect the base directory
- Mention sqlite3 dependency, and link to rusqlite docs HOT 1
- Support changing target dir location. HOT 4
- cargo-docset does not support virtual manifest workspaces HOT 2
- Every module has a spurious ::index suffix HOT 1
- Generate a docset from the cargo build cache
- General refactor HOT 1
- Support specifying the docset name
- Docset index contains relocated symbols that only result in a redirection HOT 2
- 'cargo-docset' installed via 'cargo install' fails to run HOT 5
- `dashIndexFilePath` is garbage for virtual manifests HOT 1
- Look into `RUSTDOCFLAGS='-Z unstable-options --enable-index-page'`
- Provide a way to install the generated docset HOT 8
- Broken CI ? HOT 1
- Test test_validate_docset_params_1_into_args is failing HOT 2
- Read generation options from toml file HOT 1
- Improve error output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-docset.