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

[feat] Old version of Cargo fails silently #3930

Closed
TomByrne opened this issue Apr 21, 2022 · 3 comments
Closed

[feat] Old version of Cargo fails silently #3930

TomByrne opened this issue Apr 21, 2022 · 3 comments
Assignees

Comments

@TomByrne
Copy link

Describe the problem

I'm new to Tauri and was attempting to run the template (yarn + react).
Because I was running an older version of Cargo, the build failed, but because the rust build output gets replaced by the yarn build, the issue wasn't easy to work out.

Describe the solution you'd like

Ideally, if the 'edition' in Cargo.toml is too new, the yarn build wouldn't get run, so that you could see the error in the output.

Alternatives considered

No response

Additional context

No response

@lucasfernog
Copy link
Member

What do you mean with gets replaced by the yarn build? Can you give us an example?

@TomByrne
Copy link
Author

I'm on Windows, in vscode (so a Powershell console), and immediately after this issue happens, the yarn/react build starts, which clears the cargo build output, including the error message. If I kill the build at just the right time I can read the message, but it's like a 0.3s window or something.

So this is the important output that gets cleared:

error: failed to parse manifest at `C:\_projects\Lab\storage-view\src-tauri\Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.

And this is what replaces it:

Compiled successfully!

You can now view storage-view in the browser.    

  http://localhost:3000

Note that the development build is not optimized.
To create a production build, use yarn build.    

webpack compiled successfully
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.

@lucasfernog
Copy link
Member

Thanks for the report. Also you should update your Rust :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants