Navigation Menu

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

cargo install rage fails #194

Closed
gwpl opened this issue Jan 20, 2021 · 10 comments
Closed

cargo install rage fails #194

gwpl opened this issue Jan 20, 2021 · 10 comments

Comments

@gwpl
Copy link

gwpl commented Jan 20, 2021

Environment

  • OS: Linux
  • rage version: v0.5.0

What were you trying to do

What happened

Using:
   stable-x86_64-unknown-linux-gnu unchanged - rustc 1.49.0 (e1884a8e3 2020-12-29)
   
 $ cargo install rage
     Updating crates.io index
  Installing rage v0.5.0
 (...)
 error[E0599]: no method named `insert_and_get` found for struct `DOMAINS` in the current scope
   --> /home/gw/.cargo/registry/src/github.com-1ecc6299db9ec823/i18n-embed-fl-0.2.0/src/lib.rs:360:17
    |
136 | / lazy_static::lazy_static! {
137 | |     /// Cached data specific to each localization domain, to improve
138 | |     /// performance of subsequent macro invokations.
139 | |     static ref DOMAINS: dashmap::DashMap<String, DomainSpecificData> =
140 | |         dashmap::DashMap::new();
141 | | }
    | |_- method `insert_and_get` not found for this
...
360 |           DOMAINS.insert_and_get(domain.clone(), data)
    |                   ^^^^^^^^^^^^^^ method not found in `DOMAINS`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `i18n-embed-fl`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rage v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-installJwMnWy`

Caused by:
  build failed

@str4d
Copy link
Owner

str4d commented Jan 20, 2021

This will be fixed by the next release, which should be this weekend.

@tommythorn
Copy link

Which month? :) (it still fails, but building from git works)

@jbclements
Copy link

bump

@cole-h
Copy link

cole-h commented Feb 3, 2021

Don't mean to beat a dead horse, but this (maybe obviously) also prevents using age as a library.

@errhammr
Copy link

errhammr commented Feb 8, 2021

I get exactly the same error for target x86_64-unknown-openbsd running OpenBSD-stable 6.8 amd64

@errhammr
Copy link

errhammr commented Feb 9, 2021

Interestingly I can cargo build --release the latest commit (v0.5.0-105-ge4bbc00) after cloning the repo. Also the v0.5.0 tagged commit builds without issues. I don't know what cargo install rage is trying to do differently.

@oconnor663
Copy link

I think the difference is that cargo install doesn't respect Cargo.lock. When I check out v0.5.0 and delete Cargo.lock, then cargo build repros the failure.

@oconnor663
Copy link

Just messing around, it seems like a quick patch like this might be enough to make v0.5.0 build again. Maybe something like this could be released as a bugfix branch, if the rest of main isn't ready? (I don't actually understand the dependency issue that's breaking the build, just that this version bump seems to have fixed it.)

diff --git a/age/Cargo.toml b/age/Cargo.toml
index b6d0add..4b81fb7 100644
--- a/age/Cargo.toml
+++ b/age/Cargo.toml
@@ -71,7 +71,7 @@ pin-project = "1"
 
 # Localization
 i18n-embed = { version = "0.9", features = ["fluent-system"] }
-i18n-embed-fl = "0.2"
+i18n-embed-fl = "0.3"
 lazy_static = "1"
 rust-embed = "5"
 
diff --git a/rage/Cargo.toml b/rage/Cargo.toml
index ca79a2e..b63dc7e 100644
--- a/rage/Cargo.toml
+++ b/rage/Cargo.toml
@@ -49,7 +49,7 @@ console = "0.13"
 env_logger = "0.8"
 gumdrop = "0.8"
 i18n-embed = { version = "0.9", features = ["desktop-requester", "fluent-system"] }
-i18n-embed-fl = "0.2"
+i18n-embed-fl = "0.3"
 lazy_static = "1"
 log = "0.4"
 minreq = { version = "2", features = ["https"] }

@str4d
Copy link
Owner

str4d commented Feb 13, 2021

Yeah, that's close to the necessary change. The PR that fixed this is #187, which I made from and merged into master before learning that this affected cargo install rage. Had this issue been opened before that PR, I'd have directly fixed it as a 0.5.1 point release. However, it was already fixed in master, and I thought I'd be making a release that weekend. That turned out to not be the case (as we decided to make a change to the plugin protocol that I'd just stabilised, so I couldn't cut a release from master).

I've back-ported the fix onto 0.5.0 and published 0.5.1. Sorry for the delay!

Also, I should have noted earlier that you could avoid this issue by using cargo install --locked rage, to force cargo to use the provided Cargo.lock as-published (which contained a resolved dependency tree that did not have this issue).

@str4d str4d closed this as completed Feb 13, 2021
@gwpl
Copy link
Author

gwpl commented May 17, 2021

$ cargo install rage
<...>
   Installed package `rage v0.6.0` (executables `rage`, `rage-keygen`)

Perfect! Thank you!

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

7 participants