Skip to content

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

Description

@m-ou-se

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.

Activity

  1. pinned this issue on Jul 6, 2023
  2. gauteh commented on Jul 31, 2023

    @gauteh

    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`
    
    
    
  3. m-ou-se commented on Aug 1, 2023

    @m-ou-se
    OwnerAuthor

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

  4. gauteh commented on Aug 1, 2023

    @gauteh

    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)
    
  5. gauteh commented on Aug 2, 2023

    @gauteh

    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
    
  6. keltia commented on Feb 17, 2024

    @keltia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions