Skip to content

implement both owning and const generic field array writers #503

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

Merged
merged 2 commits into from
Apr 17, 2021

Conversation

burrbull
Copy link
Member

No description provided.

@burrbull burrbull requested a review from a team as a code owner April 14, 2021 07:12
@rust-highfive
Copy link

r? @adamgreig

(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 Apr 14, 2021
@burrbull
Copy link
Member Author

Now we can see something like this:
image

@@ -25,7 +25,7 @@ jobs:

include:
# Test MSRV
- rust: 1.40.0
- rust: 1.51.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me requiring 1.51 at this point in time is not ideal. Other opinions, @adamgreig maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to generate crates or to use the generated crates? 1.51 is way too new for building PACs, but I wouldn't mind requiring it to generate them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated crates. It's providing a const generic writer. I would not terribly object if this was hidden behind a feature gate but I fully agree that enabled for all is a non-starter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

behind a feature gate

It's idea

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this PR doesn't change anything if you don't use const-generic feature.

@burrbull
Copy link
Member Author

rebased

@burrbull burrbull mentioned this pull request Apr 17, 2021
@therealprof
Copy link
Contributor

@adamgreig Any objections to the approach?

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still test this in CI with 1.51.

@burrbull burrbull force-pushed the cg-fa-writer branch 3 times, most recently from b0bfba2 to 024196f Compare April 17, 2021 11:41
@burrbull
Copy link
Member Author

@therealprof
I've added test with rust 1.51 and enabled strict and const-generic features. RISC-V k210 uses field arrays

adamgreig
adamgreig previously approved these changes Apr 17, 2021
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

therealprof
therealprof previously approved these changes Apr 17, 2021
Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@therealprof
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 17, 2021

Merge conflict.

@burrbull burrbull dismissed stale reviews from therealprof and adamgreig via 54a44ff April 17, 2021 16:03
@burrbull
Copy link
Member Author

rebased

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@bors bors bot merged commit 5a762c1 into master Apr 17, 2021
@bors bors bot deleted the cg-fa-writer branch April 17, 2021 16:55
bors bot added a commit to rust-embedded/svdtools that referenced this pull request May 28, 2021
54: field array collect r=adamgreig a=burrbull

Need to test
Preferably using
rust-embedded/svd2rust#503

Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
@burrbull burrbull mentioned this pull request Dec 14, 2021
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.

4 participants