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

em compilation fails, traits not implemented, and some missing imports? #49

Open
twirrim opened this issue Jul 11, 2021 · 2 comments
Open

Comments

@twirrim
Copy link

twirrim commented Jul 11, 2021

rustc 1.53.0 (53cb7b09b 2021-06-17)
cargo 1.53.0 (4369396ce 2021-04-27)

Same happens under Windows and Linux (given the errors, I doubted it was an OS level issue)

Steps to recreate:

cargo new emdemo
cd emdemo
echo 'em = "0.3.0"' >> Cargo.toml
cargo build

There's a few errors being reported,
Errors messages follow. The first 4 are similar, all in accelerating.rs:

error[E0433]: failed to resolve: could not find `__rt` in `quote`
   --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/accelerating.rs:123:72
    |
123 | ...                   .is_ident(&Ident::new("load", quote::__rt::Span::call_site()))
    |                                                                  ^^^^ not found in `quote::__rt`
    |
help: consider importing one of these items
    |
3   | use crate::Span;
    |
3   | use crate::__private::Span;
    |
3   | use proc_macro2::Span;
    |
3   | use proc_macro::Span;
    |
      and 3 other candidates
error[E0433]: failed to resolve: could not find `__rt` in `quote`
   --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/accelerating.rs:169:72
    |
169 | ...                   .is_ident(&Ident::new("read", quote::__rt::Span::call_site()))
    |                                                                  ^^^^ not found in `quote::__rt`
    |
help: consider importing one of these items
    |
3   | use crate::Span;
    |
3   | use crate::__private::Span;
    |
3   | use proc_macro2::Span;
    |
3   | use proc_macro::Span;
    |
      and 3 other candidates
error[E0433]: failed to resolve: could not find `__rt` in `quote`
   --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/accelerating.rs:193:74
    |
193 | ...                   .is_ident(&Ident::new("launch", quote::__rt::Span::call_site()))
    |                                                                    ^^^^ not found in `quote::__rt`
    |
help: consider importing one of these items
    |
3   | use crate::Span;
    |
3   | use crate::__private::Span;
    |
3   | use proc_macro2::Span;
    |
3   | use proc_macro::Span;
    |
      and 3 other candidates
error[E0433]: failed to resolve: could not find `__rt` in `quote`
   --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/accelerating.rs:259:70
    |
259 |                     let ident = Ident::new(&param.name, quote::__rt::Span::call_site());
    |                                                                      ^^^^ not found in `quote::__rt`
    |
help: consider importing one of these items
    |
3   | use crate::Span;
    |
3   | use crate::__private::Span;
    |
3   | use proc_macro2::Span;
    |
3   | use proc_macro::Span;
    |
      and 3 other candidates

   Compiling num-bigint v0.1.44

Then the 5th is quite different:

error[E0277]: the trait bound `syn::Expr: From<TokenStream2>` is not satisfied
   --> /home/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/emu_macro-0.1.0/src/passing.rs:337:50
    |
337 |                     let gpu_ident = quote! {gpu}.into();
    |                                                  ^^^^ the trait `From<TokenStream2>` is not implemented for `syn::Expr`
    |
    = help: the following implementations were found:
              <syn::Expr as From<ExprArray>>
              <syn::Expr as From<ExprAssign>>
              <syn::Expr as From<ExprAssignOp>>
              <syn::Expr as From<ExprAsync>>
            and 35 others
    = note: required because of the requirements on the impl of `Into<syn::Expr>` for `TokenStream2`
@calebwin
Copy link
Owner

Hello,

I'm deeply sorry about these issues. I have unfortunately not found the time to tend to these regressions recently. Thank you for reporting this issue though and I sincerely hope that either myself or someone interested in the project can develop fixes for these.

From eyeballing them, they seem like minor issues stemming from API changes in libraries that Emu depends on.

@haixuanTao
Copy link

Hey there, if you use the current version in git the error vanishes meaning that it is probably only on the published crate.

To fix it change echo 'em = "0.3.0"' >> Cargo.toml:

echo 'em = {git = "https://github.com/calebwin/emu.git"}' >> Cargo.toml

The git is very big, however, making the compilation really slow...

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

3 participants