-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Installing with cargo install fails due to semver breakage in onig_sys #65
Comments
FYI @trishume -- would it be possible to cut a syntect release? |
@dtolnay done, published as |
Thanks! Looks like that did the trick, |
Hi, rust newbie here, not sure if this is related, but on Centos 7, cargo can't install v0.4.13 as it fails to compile onig_sys
Output of cargo install cargo-expand
Like @barskern I managed to install expand 0.4.12 from source since its onig_sys is pinned on v69.1.0. Install steps
However I could not for 0.4.13 as its pinned on v69.2.0, nor 0.4.12 from crates.io as I can't find a way to pin the version of onig_sys (might be related to rust-lang/cargo#2263). |
I still get this error:
|
@LauH1987 could you try installing cargo-expand 0.4.14? I ended up pinning some deps to avoid that problematic version of onig_sys. The real fix for this would be trishume/syntect#12. 🙏 |
Success. Thanks you for fixing this so quickly! |
Problem
When using
cargo install cargo-expand
the compilation fails due to a semver-breaking release ofonig_sys
. This does not happen when building the repo usingcargo build
. This is due toCargo.lock
being pinned to a non-breaking version ofonig_sys
.cargo install
doesn't seem to take the lock-file into account when installing it directly from crates.io.Error message on compilation
Solution
syntec
(the dependency which depends ononig
) needs to:5.0.0
versionprettyprint
needs to:syntect
cargo-expand
needs to:prettyprint
Workaround
As mentionned in the introduction, one can still install this directly from the repo because then the
Cargo.lock
file is honored. However one has to usecargo build --release
and then copy the resulting binary into a folder in the$PATH
.The text was updated successfully, but these errors were encountered: