Skip to content

feat(core): improve config deserialization error messages#4607

Merged
lucasfernog merged 1 commit intodevfrom
feat/improve-config-error-message
Jul 6, 2022
Merged

feat(core): improve config deserialization error messages#4607
lucasfernog merged 1 commit intodevfrom
feat/improve-config-error-message

Conversation

@lucasfernog
Copy link
Member

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@lucasfernog lucasfernog requested a review from a team as a code owner July 6, 2022 12:55
@lucasfernog
Copy link
Member Author

The error message now looks like this:

error: failed to run custom build command for `api v0.1.0 (/home/lucas/projects/tauri/tauri/examples/api/src-tauri)`

Caused by:
  process didn't exit successfully: `/home/lucas/projects/tauri/tauri/examples/api/src-tauri/target/debug/build/api-ff9354c88ae6ad14/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=TAURI_CONFIG
  cargo:rerun-if-changed=tauri.conf.json
  unknown field `$schemas`, expected one of `$schema`, `package`, `tauri`, `build`, `plugins`
  found an unknown configuration field. This usually means that you are using a CLI version that is newer than `tauri-build` and is incompatible. Please try updating the Rust crates by running `cargo update` in the Tauri app folder.
       Error failed to build app: failed to build app
error Command failed with exit code 1.

It is not a panic anymore and it prints the entire stdout/stderr.

@lucasfernog lucasfernog requested a review from FabianLars July 6, 2022 12:59
@lucasfernog lucasfernog merged commit 9170c92 into dev Jul 6, 2022
@lucasfernog lucasfernog deleted the feat/improve-config-error-message branch July 6, 2022 13:33
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

Successfully merging this pull request may close these issues.

2 participants