dtolnay / quote

Rust quasi-quoting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request to yank quote `v1.0.11`from crates.io

alamb opened this issue Β· comments

What

Request you yank quote v1.0.11from crates.io πŸ™

I think you can do so from this page: https://crates.io/crates/quote/1.0.11

Why

1.0.11 is broken (fixed in later versions but we can't update to later version at this time)

In apache/datafusion#1498 we hit this error in v1.0.11

error[E0599]: no function or associated item named `from_str_unchecked` found for struct `proc_macro2::Literal` in the current scope
   --> /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.11/src/runtime.rs:301:41
    |
301 |         let literal = unsafe { Literal::from_str_unchecked(repr) };
    |                                         ^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro2::Literal`

error[E0599]: no function or associated item named `from_str_unchecked` found for struct `proc_macro2::Literal` in the current scope
   --> /Users/alamb/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.11/src/runtime.rs:310:45
    |
310 |         let mut literal = unsafe { Literal::from_str_unchecked(repr) };
    |                                             ^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro2::Literal`

Sadly, we can't upgrade to quote 1.0.12 due to a proc-macro2 pin (which we are are working on separately)

While we have a potential workaround to pin quote apache/datafusion#1499 if you could yank the broken 1.0.11 quote crate from crates.io we would appreciate it.

@dtolnay

+1
I'm having the same problem, please yank the broken 1.0.11 quote crate from crates.io πŸ™

Among other things, this is also blocking releasing arrow-flight 6.5.0 -- see https://lists.apache.org/thread/pgw1o6jc91pjk968bfrobrxsx1b9ws4p

@alamb Maybe we can ping his twitter. 😿

I would prefer not to yank this. The release itself is fine and usable. It sounds like the folks asking for a yank are because of their pinned proc-macro2 dep. In general pinning arbitrary dependencies is not a circumstance that my crates support. All pinned dependencies are a liability and this is the kind of outcome you should expect to get from them.

Can this cause problems even without pinned deps? It seems like:

  • quote version 1.0.11 relies on the existence of Literal::from_str_unchecked
  • Literal::from_str_unchecked is only present in version 1.0.36 of proc-macro2
  • However, the Cargo.toml for quote 1.0.11 doesn't specify that proc-macro2 1.0.36 is required, only ^1.0.20

Can this cause problems even without pinned deps?

Yes, @daviddrysdale I believe you have precisely summed up the bug (incorrect version specification) in quote 1.0.11 -- thank you

Yeah, the cargo update -Z minimal-versions check in CI should have caught this, except for this patch section in Cargo.toml that got used in CI but stripped when 1.0.11 was published. CI indeed failed when the patch was removed, which illustrates how 1.0.11 is broken.

commented

Is there a proper solution to this? Only fix I could think of was manually specifying a different version (e.g. quote = "=1.0.10").

Is there a proper solution to this? Only fix I could think of was manually specifying a different version (e.g. quote = "=1.0.10").

@mibmo sadly, there is no "proper" solution to this problem because quote v1.0.11 that is currently on crates.io incorrectly defines its dependencies in its Cargo.toml

You can work around the problem by either:

  1. forcing your library to use a version without the defect, such as you suggest quote = '1.0.10' as we did in apache/datafusion#1499

  2. update the rest of your project's dependencies to allow a version of proc-macro2 to be used that is 1.0.36 or later

commented

quote v1.0.11 that is currently on crates.io incorrectly defines its dependencies in its Cargo.toml

@alamb: Why not yank it then? Would doing so risk breaking any projects currently specifying quote = "1.0.11"?

Could a quote v1.0.12 be published, where it's just quote v1.0.11 with dependency issues resolved?

@alamb: Why not yank it then? Would doing so risk breaking any projects currently specifying quote = "1.0.11"?

@mibmo I made this ticket exactly for exactly that request :). Since @dtolnay owns the crate and the code and decided he did not want to yank it -- see #204 (comment) -- there is nothing else I know to do 🀷