Comments (13)
So i downloaded and tested each version:
Fails : cargo install cargo-modules --version 0.12.0
Succeeds : cargo install cargo-modules --version 0.13.0
Building from source succeeds for both versions.
Work as expected:
cd cargo-modules-0.12.0/
cargo run --release generate tree --lib
cd cargo-modules-0.13.0
cargo run --release structure --lib
It seems that the issue is resolved. Thanks @regexident.
from cargo-modules.
Exact same error here. I just run it on two linux machines, ubuntu 22.04 as well as 23.04 and it is the same error. One machine has rust stable, while the other has rust nightly, but it makes no difference.
from cargo-modules.
Thanks for the report, @dainbrump and @pramatias for the confirmation!
Weirdly enough I haven't come across these errors on my macOS machine (which is currently running Rust 1.74.1). Nor have any of the project's Linux Github action workers (which are also currently running Rust 1.74.1).
I usually run cargo minimal-versions
to make sure things are working fine during cargo install
(and it has caught a couple of semver issues in the past!), but forcing the 1.72.1
toolchain is working just fine for me, too:
$ RUSTUP_TOOLCHAIN="1.72.1" cargo --version
cargo 1.72.1 (103a7ff2e 2023-08-15)
$ RUSTUP_TOOLCHAIN="1.72.1" cargo minimal-versions build --workspace --all-features --ignore-private -v
info: running `rustup run nightly cargo update -Z minimal-versions`
Updating crates.io index
...
info: running `~/.rustup/toolchains/1.72.1-x86_64-apple-darwin/bin/cargo hack build --workspace --all-features`
info: running `cargo build --all-features` on cargo-modules (1/1)
...
Compiling cargo-modules v0.12.0 (.../cargo-modules)
Finished dev [unoptimized + debuginfo] target(s) in 56.84s
info: restoring .../cargo-modules/Cargo.toml
info: restoring .../cargo-modules/Cargo.lock
Diffing the source of ra_ap_hir_ty
at versions 0.0.187
and 0.0.188
I however also couldn't find any changes that seem to indicate being connected to the type-mismatch reported above.
Running cargo install cargo-modules --force
I do get the same error though! 🤔
from cargo-modules.
Hello @regexident, i ran
$ RUSTUP_TOOLCHAIN="1.72.1" cargo --version
cargo 1.72.1 (103a7ff2e 2023-08-15)
$ RUSTUP_TOOLCHAIN="1.72.1" cargo minimal-versions build --workspace --all-features --ignore-private -v
info: modifying from /home/emporas/cargo-modules/Cargo.toml
info: running rustup run nightly cargo update -Z minimal-versions
Updating crates.io index
Removing anstyle v0.3.0
Removing assert_cmd v2.0.12
Downgrading bitflags v1.3.2 -> v1.3.1
Removing bstr v1.0.1
Removing byteorder v1.2.7
Removing console v0.15.4
Removing difflib v0.4.0
Removing doc-comment v0.3.0
Removing encode_unicode v0.3.0
Removing insta v1.34.0
Removing itertools v0.10.0
Removing linked-hash-map v0.5.6
Downgrading memoffset v0.6.5 -> v0.6.1
Removing predicates v3.0.1
Removing predicates-core v1.0.6
Removing predicates-tree v1.0.1
Downgrading regex v1.3.9 -> v1.3.0
Removing regex-automata v0.1.5
Downgrading regex-syntax v0.6.18 -> v0.6.12
Removing shellwords v1.1.0
Removing similar v2.1.0
Adding thread_local v0.3.6
Removing treeline v0.1.0
Downgrading triomphe v0.1.11 -> v0.1.10
Downgrading unicode-width v0.1.11 -> v0.1.5
Removing wait-timeout v0.2.0
Removing yaml-rust v0.4.5
info: running /home/emporas/.rustup/toolchains/1.72.1-x86_64-unknown-linux-gnu/bin/cargo hack build --workspace --all-features
error: no such command: hack
Did you mean `check`?
View all installed commands with `cargo --list`
info: restoring /home/emporas/cargo-modules/Cargo.toml
info: restoring /home/emporas/cargo-modules/Cargo.lock
error: process didn't exit successfully: /home/emporas/.rustup/toolchains/1.72.1-x86_64-unknown-linux-gnu/bin/cargo hack build --workspace --all-features
(exit status: 101)
My cargo minimal versions:
$ cargo install cargo-minimal-versions
Updating crates.io index
Ignored package cargo-minimal-versions v0.1.22
is already installed, use --force to override
and my rustup toolchain:
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/emporas/.rustup
installed toolchains
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.72.1-x86_64-unknown-linux-gnu
active toolchain
stable-x86_64-unknown-linux-gnu (default)
rustc 1.74.1 (a28077b28 2023-12-04)
Oh, and by cloning the repo and building it, everything compiles correctly, with
$ cargo build --release
Is there a way to run the target/release/cargo-modules by itself?
from cargo-modules.
same problem in Debian 12.4 in WSL with rustc 1.74.1
from cargo-modules.
Is there a way to run the target/release/cargo-modules by itself?
You can always run the binary from within its cargo project via …
cargo run --release -- <ARGS>
… where <ARGS>
gets replaced with whatever you'd otherwise pass to cargo modules <ARGS>
(or cargo-modules <ARGS>
, if calling the tool directly).
(You definitely want --release
here, as otherwise the execution will be slow as a snail, especially for commands that load the sysroot.)
from cargo-modules.
Oh, i forgot about cargo run, thanks for the tip @regexident . I will test if it runs correctly the following days when i have time. If cargo install doesn't work for debian based systems, but git clone and cargo build works correctly, that's fine with me. If not, i will report the problem. Cheers!
from cargo-modules.
That would be great!
That said you may want to try installing the just-released v0.13.0
, which updated to rust-analyzer v0.0.189
, among a bunch of other changes.
from cargo-modules.
Compiling cargo-modules from source, using git clone and cargo build --release works fine. It was only when using cargo to install the package that it didn't build correctly.
I encountered some problems trying to install other Rust packages as well, that the build failed, but i didn't try to build from source. Maybe it is a bug in cargo. It was my first time building cargo-modules and i didn't think that a buggy cargo would be a possibility, but maybe it is. I will research it more, and i will report the error to the cargo repo, if that's the case.
Anyway, good job creating cargo-modules @regexident. Cheers!
from cargo-modules.
Compiling cargo-modules from source, using git clone and cargo build --release works fine. It was only when using cargo to install the package that it didn't build correctly.
For both, 0.12.0, as well as 0.13.0?
I encountered some problems trying to install other Rust packages as well, that the build failed, but i didn't try to build from source. Maybe it is a bug in cargo. It was my first time building cargo-modules and i didn't think that a buggy cargo would be a possibility, but maybe it is. I will research it more, and i will report the error to the cargo repo, if that's the case.
Yeah. I unfortunately was only able to reproduce it temporarily on my local machine (or CI), which makes it sorta hard to investigate.
Anyway, good job creating cargo-modules @regexident. Cheers!
Thanks, glad you find it useful!
from cargo-modules.
cargo install cargo-modules
works for 0.13.0
in Debian 12.4 in WSL with rustc 1.74.1
from cargo-modules.
Ran into the same original errors with 0.12.0. Trying 0.13.0 installed fine. No errors. Thanks all.
from cargo-modules.
Thanks for checking @pramatias!
from cargo-modules.
Related Issues (20)
- Option to remove external nodes? HOT 11
- Typo? HOT 1
- Add `--use-parents` option? HOT 1
- feat: dependency graph between files
- Does not build with latest `lsp-types` (0.94.1) HOT 4
- fails to install on windows HOT 3
- NetBSD package merged HOT 2
- Typo HOT 3
- feat: Sort by visibility HOT 3
- Analyze and forbid dependency from one mod to another? HOT 6
- "Error: Multiple packages present in workspace" but package is not a workspace HOT 1
- Fails to build for Alpine Linux (0.13.0) HOT 8
- cargo-modules structure --types --traits --fns --tests ==> error: unexpected argument '--types' found HOT 1
- dependencies command panicked: impl type node HOT 5
- feat: add '--uses' ie: cargo modules structure --no-fns --no-traits --no-types --uses HOT 2
- Can cargo-modules still generate a dot-file with the module structure? HOT 3
- Feature request: dependencies --no-owns HOT 1
- Incorrectly reported orphan module HOT 1
- False positive for circularity HOT 2
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-modules.