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

inline-python-macros does not compile with certain nightly Rust versions #62

Closed
m-ou-se opened this issue Jul 6, 2023 · 5 comments
Closed

Comments

@m-ou-se
Copy link
Owner

m-ou-se commented Jul 6, 2023

The unstable Rust feature proc_macro_span that inline-python uses was changed, causing breakage. This is expected when using unstable Rust features. :)

inline-python-macros 0.11 only compiles with nightly-2023-06-27 or earlier.

inline-python-macros 0.12 only compiles with nightly-2023-06-28 or later.

@m-ou-se m-ou-se pinned this issue Jul 6, 2023
@gauteh
Copy link

gauteh commented Jul 31, 2023

Hi,

I am currently getting an error:

error[E0463]: can't find crate for `inline_python_macros`
   --> /home/gauteh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-0.12.0/src/lib.rs:138:9
    |
138 | pub use inline_python_macros::python;
    |         ^^^^^^^^^^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `inline-python` (lib) due to previous error

with the latest three nightly versions (back to and including 2023-07-22). With 2023-06-28 I am getting a bunch of:

   Compiling inline-python-macros v0.12.0
error[E0599]: no method named `line` found for struct `proc_macro::Span` in the current scope
  --> /home/gauteh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-macros-0.12.0/src/embed_python.rs:57:35
   |
57 |             self.add_whitespace(span, span.line(), span.column())?;
   |                                            ^^^^ method not found in `Span`


@m-ou-se
Copy link
Owner Author

m-ou-se commented Aug 1, 2023

I can't seem to reproduce that issue. It works fine here with both the latest nightly and with 2023-07-22.

@gauteh
Copy link

gauteh commented Aug 1, 2023

Thank you for checking. Could it be some cargo bug? Or platform? I'm on linux unknown gnu 64 bit.

❯ cargo -V
cargo 1.73.0-nightly (7ac9416d8 2023-07-24)

@gauteh
Copy link

gauteh commented Aug 2, 2023

It does work for me as well on a different computer:

wince on  main via 🦀 v1.73.0-nightly
 10% ❯ cargo -V
cargo 1.73.0-nightly (1b1555676 2023-07-18)
wince on  main via 🦀 v1.73.0-nightly
 10% ❯ rustup toolchain list
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
wince on  main via 🦀 v1.73.0-nightly
❯ rustc -vV
rustc 1.73.0-nightly (1d56e3a6d 2023-07-22)
binary: rustc
commit-hash: 1d56e3a6d943062e41165bf07fea5ea8324ae011
commit-date: 2023-07-22
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

also after running rustup update:

wince on  main via 🦀 v1.73.0-nightly via 🅒 sfy took 7s
❯ cargo -V
cargo 1.73.0-nightly (c91a693e7 2023-07-31)
wince on  main via 🦀 v1.73.0-nightly via 🅒 sfy
❯ rustc -vV
rustc 1.73.0-nightly (d12c6e947 2023-08-01)
binary: rustc
commit-hash: d12c6e947ceacf3b22c154caf9532b390d8dc88a
commit-date: 2023-08-01
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

@keltia

This comment was marked as resolved.

@m-ou-se m-ou-se closed this as completed Feb 18, 2024
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