Skip to content

Better error messages - revisited #376

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

Closed
nickray opened this issue Aug 14, 2019 · 2 comments
Closed

Better error messages - revisited #376

nickray opened this issue Aug 14, 2019 · 2 comments

Comments

@nickray
Copy link
Contributor

nickray commented Aug 14, 2019

In some cases, upgrading from 0.14.0 to 0.16.0 seems to reduce the error message quality. I'm trying to svd2rust the ARM Musca-B1 SVD (from ARM.Musca_B1_BSP.1.1.0.pack), which has bugs. Not quite sure the license or I would attach the SVD.

Would it be possible to output the SVD line number that causes the error?

Case 1

0.14.0:
thread 'main' panicked at 'unknown access variant: read', /home/nicolas/.cargo/registry/src/github.com-1ecc6299db9ec823/svd-parser-0.6.0/src/lib.rs:426:18

0.16.0:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SVDError { inner: SVDError { inner: SVDError { inner: 
unknown access variant found }
In register `SPIISR` }
In peripheral `SPI0` }', src/libcore/result.rs:999:5

Case 2

0.14.0: thread 'main' panicked at '/home/nicolas/.cargo/registry/src/github.com-1ecc6299db9ec823/svd-parser-0.6.0/src/lib.rs:354 tree.get_child_text("description")', src/libcore/option.rs:1008:5

0.16.0: (with -l trace): thread 'main' panicked at 'called Option::unwrap()on aNone value', src/libcore/option.rs:347:21

@therealprof
Copy link
Contributor

Case 2 sounds like it might be addressed by #369.

Indeed the error messages could be much better; hopefully we'll be able to address those things in the future with the upgrade to the latest syn/quote versions and a better preprocessing of the SVD trees.

@nickray
Copy link
Contributor Author

nickray commented Aug 14, 2019

Oh, perfect, thanks for the pointer @therealprof! For case 1 I put together rust-embedded/svd#75.

@nickray nickray closed this as completed Aug 14, 2019
bors bot added a commit to rust-embedded/svd that referenced this issue Sep 2, 2019
75: Show unknown access variant r=ryankurte a=nickray

The ARM Musca-B1 SVD has access "read", cf. rust-embedded/svd2rust#376

Co-authored-by: Nicolas Stalder <[email protected]>
bors bot added a commit to rust-embedded/svd that referenced this issue Sep 2, 2019
75: Show unknown access variant r=ryankurte a=nickray

The ARM Musca-B1 SVD has access "read", cf. rust-embedded/svd2rust#376

Co-authored-by: Nicolas Stalder <[email protected]>
bors bot added a commit to rust-embedded/svd that referenced this issue Sep 3, 2019
75: Show unknown access variant r=ryankurte a=nickray

The ARM Musca-B1 SVD has access "read", cf. rust-embedded/svd2rust#376

Co-authored-by: Nicolas Stalder <[email protected]>
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

2 participants