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

fix field derive in same register #628

Closed
wants to merge 5 commits into from
Closed

fix field derive in same register #628

wants to merge 5 commits into from

Conversation

burrbull
Copy link
Member

Fixes #625

@burrbull burrbull requested a review from a team as a code owner July 11, 2022 20:20
@rust-highfive
Copy link

r? @therealprof

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Jul 11, 2022
@burrbull
Copy link
Member Author

сс @qwandor Can you make fixed link to SVDs to add them to CI?

@qwandor
Copy link

qwandor commented Jul 11, 2022

I'm not quite sure what you mean by that, what exactly do you want me to do? The SVD files in https://github.com/gd32-rust/gd32-rs are extensively patched with svdtools before running them through svd2rust. The file I linked in #625 is with the patches applied.

@burrbull
Copy link
Member Author

what exactly do you want me to do

Just don't delete this file.

@Emilgardis
Copy link
Member

if it's troublesome to host it, we can upload it as a gist if we're allowed

@qwandor
Copy link

qwandor commented Jul 11, 2022

Okay, I'll keep it up there for now, and let you know if anything changes.

Emilgardis
Emilgardis previously approved these changes Jul 12, 2022
@burrbull burrbull marked this pull request as draft July 12, 2022 10:26
@burrbull
Copy link
Member Author

@qwandor There is still remains 16 broken fields with too complicate derive paths. I'm not sure I'm able to solve this without full rewrite of derive path resolving (#623).
There is 2 fast ways for you: downgrade to 0.23.1 which generates separate structs for each field or make derive paths of those fields shorter without cross-peripheral dependencies.

@qwandor
Copy link

qwandor commented Jul 12, 2022

Is there an advantage of 0.23.1 over 0.24.0 here?

@burrbull
Copy link
Member Author

Is there an advantage of 0.23.1 over 0.24.0 here?

No advantage, but 0.24.0 is broken and generates incorrect code in some cases.

@burrbull
Copy link
Member Author

Close in favor of #631

@burrbull burrbull closed this Jul 19, 2022
@burrbull burrbull deleted the fix-derive branch July 27, 2022 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

svd2rust 0.24.1 generates duplicate definitions which don't compile
5 participants