-
Notifications
You must be signed in to change notification settings - Fork 156
Ignore non snake case types that can exist in SVD files #397
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @therealprof (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
The dreaded |
SGTM, I'll update this PR to instead deny a (hopefully safe) list of warnings. |
If you would be so kind to update the CHANGELOG.md and rebase I'd give this a CI run... |
@therealprof I've updated to only deny a subset of warning adopted from the patterns repo (the warnings referenced there are a little out of date, I'll fix that up later). I think the set of denied warnings should not affect users, but I could be wrong. |
Hrm, taking a closer look at this, there are some rustc lints denied in this change that are explicitly allowed (
I believe that by denying these, we could potentially break future PAC builds. What do you think @therealprof ? |
No idea to be honest. Can you rebase, then we can give it a spin? I'm totally expecting that we will need to tweak those... |
Cool, that sounds good. This branch should be up to date with master. I think we can run CI? |
bors try |
It's still separate commits. ;) Maybe I should have said rebase and squash. It looks a weird to merge a PR that does one thing in a commit and reverses course in the next. |
Ah yes, that makes more sense. :) I'll rebase and squash! |
85e0184
to
cb5d147
Compare
bors try |
tryAlready running a review |
tryTimed out |
bors try |
I think it got confused by the rebase in the middle of the try run. ;) |
As expected tons of errors here: Not sure whether this is the only one but it's certainly the most common one: |
tryBuild failed |
@mvertescher Can you have a look at the logs and adjust the PR accordingly? |
This change decreases the chance of Rust build failures when SVD files have strange formatting for types. The changelog has also been updated.
cb5d147
to
73cfa74
Compare
So, I've removed any deprecated ( |
🔒 Permission denied Existing reviewers: click here to make mvertescher a reviewer |
@therealprof can you give CI a run? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
397: Ignore non snake case types that can exist in SVD files r=therealprof a=mvertescher Hi! 👋 Thanks for this awesome project! I've run into a build error generating bindings for the [psoc6-pac](https://github.com/psoc-rs/psoc6-pac). Here's a example of one of the many build failures: ``` error: structure field `data_list_sent_update__status` should have a snake case name --> src/ble.rs:187:9 | 187 | pub data_list_sent_update__status: self::blell::DATA_LIST_SENT_UPDATE__STATUS, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `data_list_sent_update_status` ``` This issue is caused by `#![deny(warnings)]` and should be fixed by adding the `#![allow(non_snake_case)]` exception. There may be alternative fixes, I'm open to suggestions! Co-authored-by: Matt Vertescher <[email protected]>
bors d+ |
✌️ mvertescher can now approve this pull request. To approve and merge a pull request, simply reply with |
Just in case something fails. |
Build succeeded |
Hi! 👋 Thanks for this awesome project!
I've run into a build error generating bindings for the psoc6-pac. Here's a example of one of the many build failures:
This issue is caused by
#![deny(warnings)]
and should be fixed by adding the#![allow(non_snake_case)]
exception. There may be alternative fixes, I'm open to suggestions!