fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

0.12 does not compile with current nightly version #65

Closed keltia closed 7 months ago

keltia commented 9 months ago

Hello,

Despite using +nightly, build fails with the unstable macro error:

fetiche-rs/opensky-history on  develop [$?] is 📦 v0.2.0 via 🦀 v1.76.0-nightly
❯ cargo +nightly check
    Checking zstd-sys v2.0.8+zstd.1.5.5
    Checking lz4-sys v1.9.4
    Checking bzip2-sys v0.1.11+1.0.8
   Compiling inline-python-macros v0.12.0
   Compiling parquet_derive v49.0.0
    Checking seek_bufread v1.2.2
    Checking home v0.5.5
    Checking progress v0.2.0
    Checking bzip2 v0.4.4
    Checking lz4 v1.24.0
error: expected identifier, found `,`
 --> /Users/roberto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-macros-0.12.0/src/lib.rs:3:12
  |
3 | #![feature(,kproc_macro_span)]
  |            ^
  |            |
  |            expected identifier
  |            help: remove this comma

    Checking zstd-safe v6.0.6
    Checking zstd-safe v7.0.0
error[E0658]: use of unstable library feature 'proc_macro_span'
  --> /Users/roberto/.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())?;
   |                                            ^^^^
   |
   = note: see issue #54725 <https://github.com/rust-lang/rust/issues/54725> for more information
   = help: add `#![feature(proc_macro_span)]` to the crate attributes to enable
m-ou-se commented 7 months ago

3 | #![feature(,kproc_macro_span)]

The extra ,k shown in your error doesn't actually appear in the source file. Did you accidentally edit ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-macros-0.12.0/src/lib.rs?

If you remove the ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-macros-0.12.0 directory, cargo will extract the original sources again.

keltia commented 6 months ago

I didn't edit the file (that I could remember). I removed the directory, remove and rebuilt all my Python environment and now it builds. Thanks.