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

bug: failed to build on macOS 13.4 #44

Closed
MartinBernstorff opened this issue Jun 11, 2023 · 4 comments
Closed

bug: failed to build on macOS 13.4 #44

MartinBernstorff opened this issue Jun 11, 2023 · 4 comments

Comments

@MartinBernstorff
Copy link

MartinBernstorff commented Jun 11, 2023

Super excited about a rust-based LSP and type checker! Blazing fast, here we go!

Was unfortunately unable to build due to type errors.

macOS 13.4
M1 MBP
Rust 1.70.0

Error output
cargo install pylyzer                                         
    Updating crates.io index
  Downloaded pylyzer v0.0.31
  Downloaded 1 crate (1.2 MB) in 0.97s
  Installing pylyzer v0.0.31
    Updating crates.io index
  Downloaded fake-simd v0.1.2
  Downloaded erg_parser v0.6.14
  Downloaded lsp-types v0.93.2
  Downloaded num-bigint v0.2.6
  Downloaded ordermap v0.3.5
  Downloaded petgraph v0.4.13
  Downloaded py2erg v0.0.31
  Downloaded sha2 v0.8.2
  Downloaded string_cache v0.7.5
  Downloaded rustpython-parser v0.1.2
  Downloaded term v0.5.2
  Downloaded unicode-xid v0.1.0
  Downloaded unic-ucd-ident v0.9.0
  Downloaded unicode_names2 v0.4.0
  Downloaded fixedbitset v0.1.9
  Downloaded precomputed-hash v0.1.1
  Downloaded new_debug_unreachable v1.0.4
  Downloaded string_cache_shared v0.3.0
  Downloaded string_cache_codegen v0.4.4
  Downloaded lalrpop-util v0.17.2
  Downloaded byte-tools v0.3.1
  Downloaded block-padding v0.1.5
  Downloaded diff v0.1.13
  Downloaded dirs v1.0.5
  Downloaded docopt v1.1.1
  Downloaded els v0.1.26
  Downloaded ena v0.13.1
  Downloaded block-buffer v0.7.3
  Downloaded erg_common v0.6.14
  Downloaded ascii-canvas v2.0.0
  Downloaded itertools v0.8.2
  Downloaded generic-array v0.12.4
  Downloaded digest v0.8.1
  Downloaded opaque-debug v0.2.3
  Downloaded lalrpop v0.17.2
  Downloaded rand_hc v0.1.0
  Downloaded bitflags v1.3.2
  Downloaded aho-corasick v1.0.2
  Downloaded serde v1.0.164
  Downloaded bit-set v0.5.3
  Downloaded bit-vec v0.6.3
  Downloaded rand_chacha v0.1.1
  Downloaded rand_core v0.4.2
  Downloaded rand_jitter v0.1.4
  Downloaded rand_pcg v0.1.2
  Downloaded rand_xorshift v0.1.1
  Downloaded rand_isaac v0.1.1
  Downloaded rand_core v0.3.1
  Downloaded phf_shared v0.7.24
  Downloaded phf_generator v0.7.24
  Downloaded lazy_static v1.4.0
  Downloaded either v1.8.1
  Downloaded autocfg v0.1.8
  Downloaded atty v0.2.14
  Downloaded log v0.4.19
  Downloaded regex v1.8.4
  Downloaded serde_derive v1.0.164
  Downloaded unic-char-property v0.9.0
  Downloaded num-traits v0.2.15
  Downloaded strsim v0.10.0
  Downloaded siphasher v0.2.3
  Downloaded proc-macro2 v1.0.60
  Downloaded unic-emoji-char v0.9.0
  Downloaded rand v0.6.5
  Downloaded unicode-xid v0.2.4
  Downloaded quote v1.0.28
  Downloaded memchr v2.5.0
  Downloaded serde_json v1.0.96
  Downloaded num-integer v0.1.45
  Downloaded unic-char-range v0.9.0
  Downloaded unic-common v0.9.0
  Downloaded tinyvec v1.6.0
  Downloaded tinyvec_macros v0.1.1
  Downloaded form_urlencoded v1.2.0
  Downloaded rand_os v0.1.3
  Downloaded byteorder v1.4.3
  Downloaded unicode-bidi v0.3.13
  Downloaded url v2.4.0
  Downloaded serde_repr v0.1.12
  Downloaded percent-encoding v2.3.0
  Downloaded typenum v1.16.0
  Downloaded unicode-ident v1.0.9
  Downloaded unicode-normalization v0.1.22
  Downloaded itoa v1.0.6
  Downloaded syn v2.0.18
  Downloaded unic-ucd-version v0.9.0
  Downloaded ryu v1.0.13
  Downloaded idna v0.4.0
  Downloaded regex-syntax v0.7.2
  Downloaded erg_compiler v0.6.14
  Downloaded regex-syntax v0.6.29
  Downloaded libc v0.2.146
  Downloaded autocfg v1.1.0
  Downloaded 93 crates (5.6 MB) in 1.49s
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.60
   Compiling quote v1.0.28
   Compiling unicode-ident v1.0.9
   Compiling rand_core v0.4.2
   Compiling libc v0.2.146
   Compiling serde v1.0.164
   Compiling siphasher v0.2.3
   Compiling rand_core v0.3.1
   Compiling autocfg v0.1.8
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling typenum v1.16.0
   Compiling phf_shared v0.7.24
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling erg_common v0.6.14
   Compiling memchr v2.5.0
   Compiling string_cache_shared v0.3.0
   Compiling rand_jitter v0.1.4
   Compiling rand_os v0.1.3
   Compiling byteorder v1.4.3
   Compiling byte-tools v0.3.1
   Compiling syn v2.0.18
   Compiling block-padding v0.1.5
   Compiling dirs v1.0.5
   Compiling regex-syntax v0.7.2
   Compiling lazy_static v1.4.0
   Compiling aho-corasick v1.0.2
   Compiling term v0.5.2
   Compiling num-traits v0.2.15
   Compiling opaque-debug v0.2.3
   Compiling new_debug_unreachable v1.0.4
   Compiling log v0.4.19
   Compiling fake-simd v0.1.2
   Compiling phf_generator v0.7.24
   Compiling generic-array v0.12.4
   Compiling string_cache_codegen v0.4.4
   Compiling precomputed-hash v0.1.1
   Compiling tinyvec_macros v0.1.1
   Compiling block-buffer v0.7.3
   Compiling digest v0.8.1
   Compiling ordermap v0.3.5
   Compiling strsim v0.10.0
   Compiling either v1.8.1
   Compiling bit-vec v0.6.3
   Compiling fixedbitset v0.1.9
   Compiling string_cache v0.7.5
   Compiling bit-set v0.5.3
   Compiling petgraph v0.4.13
   Compiling itertools v0.8.2
   Compiling sha2 v0.8.2
   Compiling tinyvec v1.6.0
   Compiling ena v0.13.1
   Compiling ascii-canvas v2.0.0
   Compiling atty v0.2.14
   Compiling regex v1.8.4
   Compiling num-integer v0.1.45
   Compiling unic-common v0.9.0
   Compiling serde_derive v1.0.164
   Compiling unicode-xid v0.1.0
   Compiling unic-char-range v0.9.0
   Compiling regex-syntax v0.6.29
   Compiling lalrpop-util v0.17.2
   Compiling diff v0.1.13
   Compiling unic-char-property v0.9.0
   Compiling unic-ucd-version v0.9.0
   Compiling unicode-normalization v0.1.22
   Compiling num-bigint v0.2.6
   Compiling unicode-xid v0.2.4
   Compiling erg_compiler v0.6.14
   Compiling percent-encoding v2.3.0
   Compiling unicode-bidi v0.3.13
   Compiling serde_json v1.0.96
   Compiling form_urlencoded v1.2.0
   Compiling idna v0.4.0
   Compiling erg_parser v0.6.14
   Compiling ryu v1.0.13
   Compiling itoa v1.0.6
   Compiling unic-ucd-ident v0.9.0
   Compiling unic-emoji-char v0.9.0
   Compiling serde_repr v0.1.12
   Compiling bitflags v1.3.2
   Compiling unicode_names2 v0.4.0
   Compiling docopt v1.1.1
   Compiling url v2.4.0
   Compiling lalrpop v0.17.2
   Compiling lsp-types v0.93.2
   Compiling rustpython-parser v0.1.2
   Compiling els v0.1.26
   Compiling py2erg v0.0.31
error[E0308]: mismatched types
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/py2erg-0.0.31/convert.rs:1272:18
     |
1272 |             Some(class_spec),
     |             ---- ^^^^^^^^^^ expected `TypeSpecWithOp`, found `TypeSpec`
     |             |
     |             arguments to this enum variant are incorrect
     |
help: the type constructed contains `TypeSpec` due to the type of the argument passed
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/py2erg-0.0.31/convert.rs:1272:13
     |
1272 |             Some(class_spec),
     |             ^^^^^----------^
     |                  |
     |                  this argument influences the type of `Some`
note: tuple variant defined here
    --> /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/option.rs:572:5

error[E0308]: mismatched types
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/py2erg-0.0.31/convert.rs:1296:18
     |
1296 |             Some(class_spec),
     |             ---- ^^^^^^^^^^ expected `TypeSpecWithOp`, found `TypeSpec`
     |             |
     |             arguments to this enum variant are incorrect
     |
help: the type constructed contains `TypeSpec` due to the type of the argument passed
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/py2erg-0.0.31/convert.rs:1296:13
     |
1296 |             Some(class_spec),
     |             ^^^^^----------^
     |                  |
     |                  this argument influences the type of `Some`
note: tuple variant defined here
    --> /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/option.rs:572:5

error[E0308]: mismatched types
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/py2erg-0.0.31/convert.rs:1442:17
     |
1437 |             let sig = Signature::Subr(SubrSignature::new(
     |                                       ------------------ arguments to this function are incorrect
...
1442 |                 return_t,
     |                 ^^^^^^^^ expected `Option<TypeSpecWithOp>`, found `Option<TypeSpec>`
     |
     = note: expected enum `Option<erg_compiler::erg_parser::ast::TypeSpecWithOp>`
                found enum `Option<TypeSpec>`
note: associated function defined here
    --> /Users/Leisure/.cargo/registry/src/index.crates.io-6f17d22bba15001f/erg_parser-0.6.14/ast.rs:3907:18
     |
3907 |     pub const fn new(
     |                  ^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `py2erg` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `pylyzer v0.0.31`, intermediate artifacts can be found at `/var/folders/tx/6pp47_bj75z6xtv1jmt7rpk00000gq/T/cargo-installE807Bp`

Anything else I can do to help? :-)

@mtshiba
Copy link
Owner

mtshiba commented Jun 11, 2023

The pylyzer release is automated, but I now find that the process is failing.

https://github.com/mtshiba/pylyzer/actions/runs/5230489178/jobs/9444062584

The cause is that the parser was updated with v0.0.32. We are using https://github.com/RustPython/Parser as our parser, but this crate is not published on crates.io, so it was failing to publish. This problem seems to have already been reported.

RustPython/Parser#67
astral-sh/ruff#43

As a temporary solution, you can clone this repository and install with cargo install --path ..

@MartinBernstorff
Copy link
Author

Excellent, thanks a lot!

Again, super excited about this project! Can't wait for it to reach maturity.

@jdhao
Copy link

jdhao commented Jul 28, 2023

I am also seeing this error when doing cargo install pylyzer.

@mtshiba
Copy link
Owner

mtshiba commented Jul 28, 2023

fixed with v0.0.39.

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