-
Notifications
You must be signed in to change notification settings - Fork 28
Complete esp32h2 support, simplify linker args, create snippets #141
Conversation
bb3eaad
to
bb88e26
Compare
Hmm I guess without cargo-generate/cargo-generate#884 it makes this quite a bit more difficult, because I means trying to keep rustfmt valid code in snippets :/ |
I think I like the idea of snippets. We could even check the condition when populating the snippet and wouldn't need the While waiting for |
It was causing errors on user who didn't have |
I like the snippets idea, it definitely makes the template more clean, specially if we avoid adding includes! |
I wonder if there is a way to ignore such an error or to check if |
So what's the consenus, do we wait/try to implement cargo generates rustfmt builtin, or do we add back the post creation formatting? If we go with the latter, could someone point me to the PR that removed it as a reference 🙏. |
I found at least the PR which originally added Probably having it as a built-in feature for |
I think we need to pass |
3bfc0cb
to
03bc1a7
Compare
So the last thing is around the h2, which will probably require changes in esp-wifi. For some reason |
I need to compile with "no-default-features" - having "dhcpv4" a default feature there is probably not ideal 🤔 |
If we add back the |
c9b05ca
to
7218292
Compare
PR is green 😎, it requires a new release of the esp-wifi, but no rush there. Overall, are we happy with this approach? |
I think this approach simplifies the template maintenance! So it's worth giving it a try, if we see that it still hard to maintain in the future we can always reassess. We just have to take into account that after merging we need to update the books/repos that have the Edit: We should also update the readme with the |
I like the approach |
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
Frustratingly cargo generate can't currently do what I want to do for the next step: cargo-generate/cargo-generate#1054 (comment). I was planning on reusing .github etc for each sub template, but it looks like we might have to duplicate them, at least for now :(. Maybe that's not so bad? We either do that, or maybe we could try and symlinks stuff but that sounds like a recipe for hell on windows. |
Oops, completely forgot about this. What do we think about merging this in its current form? At the very least we will get optional formatting on the project at the end which is an improvement. I can rebase this, and if no one is working on a port to the new release I could also do that too? |
It's definitely an improvement so I guess it's worth to merge it |
7659448
to
3a385fe
Compare
84bd110
to
49101d9
Compare
49101d9
to
167adab
Compare
This should be ready to go now I think :) |
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
This PR:
On its own this PR might seem a little pointless, but by having snippets we can easily make the generator less monolithic and easier to maintain. Instead of one template with a million options, we could now easily create more templates with less options which should reduce the cognitive load of making changes. I will do this in a follow up PR because it might be a bit controversial, but I think the changes here are okay on their own.