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] unable to use 2024 edition because tauri-build reads Cargo.toml with old cargo_toml crate #10412

Open
anatawa12 opened this issue Jul 29, 2024 · 3 comments
Labels
priority: 1 high status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@anatawa12
Copy link
Contributor

Describe the bug

unable to use 2024 edition

error: failed to run custom build command for `app v0.1.0 (/Users/anatawa12/tauri-2024/src-tauri)`

Caused by:
  process didn't exit successfully: `/Users/anatawa12/tauri-2024/src-tauri/target/release/build/app-2cd9b7cd989b4b2b/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=TAURI_CONFIG
  cargo:rerun-if-changed=tauri.conf.json
  cargo:rustc-cfg=desktop
  TOML parse error at line 11, column 11
     |
  11 | edition = "2024"
     |           ^^^^^^
  data did not match any variant of untagged enum Inheritable
  : TOML parse error at line 11, column 11
     |
  11 | edition = "2024"
     |           ^^^^^^
  data did not match any variant of untagged enum Inheritable

warning: build failed, waiting for other jobs to finish...
       Error failed to build app: failed to build app

Reproduction

Create project with tauri cli and bump to 2024 edition

Expected behavior

it should work

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.81.0-beta.2 (08328a323 2024-07-25)
    ✔ cargo: 1.81.0-beta.2 (a2b58c3da 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: beta-aarch64-apple-darwin (default)
    - node: 20.12.2
    - pnpm: 8.15.4
    - yarn: 1.22.19
    - npm: 10.8.1

[-] Packages
    - tauri [RUST]: 1.7.1 (no lockfile)
    - tauri-build [RUST]: no manifest (no lockfile)
    - wry [RUST]: no manifest (no lockfile)
    - tao [RUST]: no manifest (no lockfile)
    - tauri-cli [RUST]: 1.5.14
    - @tauri-apps/api [NPM]: 1.6.0
    - @tauri-apps/cli [NPM]: 1.6.0

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: out
    - devPath: http://localhost:3030/
    - framework: React (Next.js)
    - bundler: Webpack

Stack trace

No response

Additional context

It looks parsing Cargo.toml is only for several checks so option to skip such a checks is one possible solution I think.

Rust 2024 is planned to be stabilized in rust 1.82.0 which will be released on October 17th so I tried them with nightly toolchain.

@anatawa12 anatawa12 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jul 29, 2024
@chippers
Copy link
Member

chippers commented Jul 29, 2024

@anatawa12 can you test the feat/1.x-edition-2024 branch from #10414 and see if it works for your project?

@anatawa12
Copy link
Contributor Author

I tried a915361 and it works for my project. thank you

@FabianLars FabianLars changed the title [bug v1] unable to use 2024 edition because tauri-build reads Cargo.toml with old cargo_toml crate [bug] unable to use 2024 edition because tauri-build reads Cargo.toml with old cargo_toml crate Nov 29, 2024
@FabianLars
Copy link
Member

Reopening for v1

@FabianLars FabianLars reopened this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: 1 high status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants