circup icon indicating copy to clipboard operation
circup copied to clipboard

Fail to remove build-in bundle (to bypass infra issue)

Open dglaude opened this issue 2 years ago • 3 comments

On Windows 10, with Python 3.10.11, I try to use circup to migrate to CP 9.0.

To avoid errors, I wanted to remove a bundle, but I cannot remove it.

Not sure if that is normal.

C:\Project>python --version
Python 3.10.11

C:\Project>circup --version
CircUp, A CircuitPython module updater. Version 1.4.0

C:\Project>circup bundle-show
Downloading latest bundles for circuitpython/CircuitPython_Org_Bundle (20231029).
py:
There was a problem downloading that platform bundle. Skipping and using existing download if available.
adafruit/Adafruit_CircuitPython_Bundle
    https://github.com/adafruit/Adafruit_CircuitPython_Bundle
    version = 20231031
adafruit/CircuitPython_Community_Bundle
    https://github.com/adafruit/CircuitPython_Community_Bundle
    version = 20231030
circuitpython/CircuitPython_Org_Bundle
    https://github.com/circuitpython/CircuitPython_Org_Bundle
    version = 0.0.3

C:\Project>circup bundle-remove circuitpython/CircuitPython_Org_Bundle
Cannot remove built-in module:
    circuitpython/CircuitPython_Org_Bundle

dglaude avatar Oct 31 '23 16:10 dglaude

My understanding was that bundle-remove is intended to be used with local bundles which are ones that were added with bundle-add command.

I can see rationale behind removing the one that is currently emitting warnings. But I worry that altering circup to allow removing the built-in "real" bundles instead of only local ones could wind up with people who have accidentally removed the main bundle and then subsequently cannot get circup to work any more.

If we do want to allow the removal of the built-in "real" bundles I think we'd also need to add a command to add them back in since the existing bundle-add command is expecting to be used with local bundles, not the ones that it downloads.

FoamyGuy avatar Oct 31 '23 17:10 FoamyGuy

Maybe we should change Cannot remove built-in module: to Not allowed to remove built-in module or Removing built-in module not permitted.

dhalbert avatar Oct 31 '23 17:10 dhalbert

Maybe add a circup bundle-restore to bring back the default in case someone want to repair. And the message can be: You are removing a default bundle, you can use "bundle-restore" if you change your mind or that was a mistake.

dglaude avatar Oct 31 '23 18:10 dglaude