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

Error 0658 during compilation #18

Closed
pedipanol opened this issue Nov 9, 2024 · 5 comments
Closed

Error 0658 during compilation #18

pedipanol opened this issue Nov 9, 2024 · 5 comments

Comments

@pedipanol
Copy link

Hi! Thanks for your work on terrific audio driver! It's a pretty fun program to use!

I started getting the following error when trying to compile tad versions 0.0.12 and 0.0.13 on PopOS! (Ubuntu 22.04). 0.0.11 still compiles fine.

   Compiling relative-path v1.9.3
error[E0658]: exclusive range pattern syntax is experimental
   --> crates/compiler/src/mml/bc_generator.rs:197:17
    |
197 |                 MIN_TWO_INSTRUCTIONS..MIN_THREE_INSTRUCTIONS => {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
    = help: use an inclusive range pattern, like N..=M

For more information about this error, try `rustc --explain E0658`.
error: could not compile `compiler` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@KungFuFurby
Copy link
Contributor

KungFuFurby commented Nov 9, 2024

What is your rust version, just out of curiosity? Type in rustc --version. It compiles fine on rustc 1.81.0.

Yes, I've gotten the same error, but I also fixed it by simply updating rust.

@undisbeliever
Copy link
Owner

undisbeliever commented Nov 9, 2024

I did not realise exclusive range pattern syntax was a recent feature. That was stabilised in rust 1.80.0 (released July 2024).

Looks like Ubuntu 24.04LTS's default rust compiler is 1.75.0. There is a cargo-1.80 in the package list that should compile TAD.

I would like to support older versions of rust so it works out-of-the-box on Ubuntu.

Give me a few hours to download multiple versions of rust on my laptop and run cargo-msrv to find what's needed to get TAD compiling on an older version of rust.

undisbeliever added a commit that referenced this issue Nov 10, 2024
    > rustup run 1.79.0 cargo build
       Compiling compiler v0.0.0 (C:\Users\undis\repo\terrific-audio-driver\crates\compiler)
    error[E0658]: exclusive range pattern syntax is experimental
       --> crates\compiler\src\channel_bc_generator.rs:427:17
        |
    427 |                 MIN_TWO_INSTRUCTIONS..MIN_THREE_INSTRUCTIONS => {
        |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: see issue #37854 <rust-lang/rust#37854> for more information
        = help: use an inclusive range pattern, like N..=M

Reported by pedipanol

#18
@undisbeliever
Copy link
Owner

The Terrific Audio Driver now compiles on Windows x64 with rust 1.75.0

@pedipanol can please you let me know if you can compile TAD using the main branch.

@pedipanol
Copy link
Author

Just saw the replies but in good time. The fix works and I could compile it with rust 1.79.0, everything works!

Thank you so much!

@undisbeliever
Copy link
Owner

No worries. Thank you for reporting the compile error.

I'm glad you like my audio driver.

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