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

Regression in nametable_codegen-0.1.2, Rust 1.17 #40960

Closed
brson opened this issue Mar 31, 2017 · 14 comments
Closed

Regression in nametable_codegen-0.1.2, Rust 1.17 #40960

brson opened this issue Mar 31, 2017 · 14 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@brson
Copy link
Contributor

brson commented Mar 31, 2017

https://github.com/crlf0710/nametable

101 brian@ip-10-145-43-250:~/dev/nametable/nametable_codegen⟫ git log -1
commit 975458ae3780278128eac92e712a8ca8ab05fe05
Author: CrLF0710 <crlf0710@gmail.com>
Date:   Wed Apr 27 19:16:19 2016 +0800

    Bump versions.

brian@ip-10-145-43-250:/mnt2/dev⟫ rustc +beta -Vv
rustc 1.17.0-beta.1 (408d49e60 2017-03-14)
binary: rustc
commit-hash: 408d49e6087f87371e96277c5ff428fa22cb84e6
commit-date: 2017-03-14
host: x86_64-unknown-linux-gnu
release: 1.17.0-beta.1
LLVM version: 3.9

brian@ip-10-145-43-250:~/dev/nametable/nametable_codegen⟫ cargo +beta test
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading nametable v0.1.1
 Downloading syntex_syntax v0.31.0
 Downloading syntex v0.31.0
 Downloading quasi v0.9.0
 Downloading quasi_codegen v0.9.0
 Downloading aster v0.15.0
   Compiling nametable v0.1.1
   Compiling winapi-build v0.1.1
   Compiling rustc-serialize v0.3.23
   Compiling unicode-xid v0.0.3
   Compiling winapi v0.2.8
   Compiling kernel32-sys v0.2.2
   Compiling bitflags v0.5.0
   Compiling log v0.3.7
   Compiling libc v0.2.21
   Compiling term v0.2.14
   Compiling syntex_syntax v0.31.0
error[E0308]: mismatched types
   --> /home/brian/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/syntex_syntax-0.31.0/src/ext/base.rs:487:33
    |
487 |                                 ext::quote::expand_quote_item));
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'cx
    |
    = note: expected type `fn(&'cx mut ext::base::ExtCtxt<'_>, codemap::Span, &[ast::TokenTree]) -> std::boxed::Box<ext::base::MacResult + 'cx>`
               found type `fn(&mut ext::base::ExtCtxt<'_>, codemap::Span, &[ast::TokenTree]) -> std::boxed::Box<ext::base::MacResult> {ext::quote::expand_quote_item::<'_>}`
    = note: lifetime parameter `'cx` declared on fn `ext::quote::expand_quote_item` appears only in the return type, but here is required to be higher-ranked, which means that `'cx` must appear in both argument and return types
    = note: this error is the result of a recent bug fix; for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>

error: aborting due to previous error

error: Could not compile `syntex_syntax`.

To learn more, run the command again with --verbose.

cc @crlf0710

@brson brson added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Mar 31, 2017
@alexcrichton
Copy link
Member

This also affects presto

cc @ernestrc

@brson
Copy link
Contributor Author

brson commented Mar 31, 2017

Also affects pgrustxn-sys cc @posix4e

@alexcrichton
Copy link
Member

Er sorry @ernestrc it's actually quasi-codegen

cc @erickt

@erickt
Copy link
Contributor

erickt commented Mar 31, 2017

Those are some super old versions of syntex and quasi. Is this being run with rust nightly? We could try to release a minor version bump to syntex 0.31 and quasi 0.9 that fixes this if you'd like.

@alexcrichton
Copy link
Member

The full report is online with versions and everything.

@posix4e
Copy link
Contributor

posix4e commented Mar 31, 2017 via email

@arielb1
Copy link
Contributor

arielb1 commented Mar 31, 2017

Relevant function:

pub fn expand_quote_item<'cx>(cx: &mut ExtCtxt,
                              sp: Span,
                              tts: &[TokenTree])
                              -> Box<base::MacResult+'cx> {
    let expanded = expand_parse_call(cx, sp, "parse_item_panic", vec!(), tts);
    base::MacEager::expr(expanded)
}

note: this error is the result of a recent bug fix; for more information, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>. That is indeed correct. The fixed function signature starts with

pub fn expand_quote_item<'cx>(cx: &'cx mut ExtCtxt,

@erickt
Copy link
Contributor

erickt commented Mar 31, 2017

I thought I saw this bug before. I believe I fixed this same bug in https://github.com/serde-rs/syntex/tree/v0.29.x. I think we need a statute of limitations on these bugs, since I don't necessarily want to keep updating these old branches :)

We can cut a branch for 0.31.x but do we know if there are other old versions of syntex out there that also have this bug? We've done 64 releases so far, so we're not too excited about having to fix this in all the other releases.

@brson
Copy link
Contributor Author

brson commented Apr 1, 2017

@arielb1 Is #33685 resolved? Do you know which Pr resolved it? Is it tagged with 'relnotes'?

@crlf0710
Copy link
Member

crlf0710 commented Apr 1, 2017

Hi, thanks for mentioning this, but actually i found that the implementation of the crate nametable is much inferior to what phf does. And it is not using macros 1.1 anyway. I think i'm gonna yank these crates nametable and nametable-codegen. I don't really know how...

@crlf0710
Copy link
Member

crlf0710 commented Apr 2, 2017

I just uploaded a new version to get it working again. @brson

@arielb1
Copy link
Contributor

arielb1 commented Apr 2, 2017

Resolved in #38897. That is indeed relnotes.

@brson
Copy link
Contributor Author

brson commented Apr 2, 2017

Thanks @arielb1!

@brson
Copy link
Contributor Author

brson commented Apr 2, 2017

Thanks @crlf0710!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

6 participants