-
Notifications
You must be signed in to change notification settings - Fork 14
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
Document how to generate stubs for a branch or fork of MicroPython? #441
Comments
Ok, fixed a bug with using get-frozen with version=latest #442 |
Update: I seem to be successfully using the
|
My understanding of the workflow right now:
|
The above doesn't work - seems that the frozen stubs overwrite the merged stubs - I thiunk I need to work out how to get the micropython repo to update the frozen bits |
Sam, thanks for your perseverance This project started very small years ago - and has grown over time. documentation that I once wrote - has been surpassed by the reality of tools and micropython evolving. writing this from memory in the train:
|
Thanks for this and sorry for my previous impatience - felt so close to getting things working! I think your instructions work but only for a specific tagged version. I'm testing a branch of micropython (micropython/micropython#10704) so I need to check out an arbitrary commit and generate stubs... I notice you didn't mention using get-frozen or get-docstubs specifically but I think I will need those? |
I never considered a specific COMMIT, only versions to be honest. Also if you do not specify a version, I think most commands just leave the repost on the commit they are. Or at least that is something that can be added with little change |
After looking at that PR I think I understand better what you are trying to do. Perhaps
comparing to main there are only 2 .rst files changed, however the files |
Have you considered not checking in anything that is generated by the build? that might have made things clearer for me personally. |
|
It already does that, if you just do not specify a version All output that is not a specific tag, is considered 'latest', as that's exactly what I need, and keeps me from needing to do quite complex version resolution, I see that if you are working on a year old PR that that is confusing, but it still works if you mentally time travel back to that PR. It may be useful for your scenario if you remove all -latest- folders Naming convention. I may consider adding the pre-release build nr, now that that is adopted by micropython. |
Yea, I'm not sure that's working for me, OR I'm getting confused!
Latest also seems to be the default for those commands:
That might be a good idea
Sorry I meant the stubs library - are the outputs, of e.g. 'generate docstubs' not checked in there? Could these be viewed as intermediate-generate files?
Sorry I mean something like: I have seen it as quite common practice to include a non-human-readable portion to version numbers (e.g. SHAs or build numbers) even for releases - this allows developer traceability back to a specific commit and build (as version numbers can be a little 'blurry' sometimes). It would help my scenario of debug-devolpment because I could produce builds that I can produce stub builds that would let me easily identify where they came from... It's been a week or so since I needed to touch this issue so some of this is from memory so sorry if this is a bit of a nonsensical reply :D |
Describe the bug
I've tried 2 or 3 times to work out how to use this to generate stubs for a custom micropython build for the RPi Pico W but I'm really struggling!
Here's what I've tried/gleaned so far:
get-frozen
but despite apparent success, no folders seem to be createdget-core
doesn't seem to create a micropython-core directory.My guess for what I should do:
pip install micropython-stubber
micropython-latest-rp2-RPI_PICO_W
stubber get-frozen --black --version=latest
stubber get-docstubs
stubber merge --version latest --board RPI_PICO_W
stubber build --version latest --port rp2 --board RPI_PICO_W
This just isn't working for me - I'm getting failures about missing frozen stubs and all sorts - I must be doing something fundamentally wrong here or misunderstanding what's already checked in and what needs to be generated
The text was updated successfully, but these errors were encountered: