-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
tools/mpremote: Add mip download and mpy version handling. #18712
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
base: master
Are you sure you want to change the base?
Conversation
|
the build failures seem to be unrelated to this PR and are failing on github internal errors while cloning git dependencies. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18712 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 171 171
Lines 22298 22298
=======================================
Hits 21937 21937
Misses 361 361 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Code size report: |
|
I think this is a useful feature, Thanks for the contribution. Would it be possible to add a test for this to the mpremote tests? I'll review in more detail in the next few days. |
|
@Josverl I've added a test. I'm still not sure whether running the python files with host upd: force pushed with rebase on top of latest master, fixed signoff. |
Add local filesystem download mode for mip with shared install logic, add --mpy-version and per-command defaults for --mpy/--target, and avoid probing inside _install_package to allow download without device. Fixes micropython#18711. Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
|
Also I have been ponderign on the cmdline options. to me the most obvious thing would be to use MCU default install: MCU specific install: host local install: |
|
I think the docs should clarify that --mpy, --no-mpy flags are only valid for the micropython index , or a warning should be given, when I request for example : |
I thought about it, but that would break backwards compatibility for the |
|
Then that is something to mention in the PRs |
Summary
Adds a new sub-command for mpremote mip:
mpremote mip download, inspired bypip download, which accept same packages and uses same logic asmip install, but downloads files to local filesystem instead of remote micropython board.Fixes #18711.
A use case: run
mip downloadfor all the dependencies, and add./libtopython.analysis.extraPathsor whatever your ide/setup uses -- and now you have a proper code completion and go to definition working with same code obtained by same command as the code running on the board.An issue on Raspberry Pi forums by someone else on this with more details: https://forums.raspberrypi.com/viewtopic.php?t=377948
Testing
--mpyis set to download mpy files.