Closed martinwork closed 1 year ago
I can reproduce this.
The duplication of the extensions is happening because the extensions repo's READMEs include a package list which includes the extension itself or a duplicate with a different package name. When we parse the README, we import all the packages that are listed, hence the duplication. I will file bugs on those repos.
Arising from https://support.microbit.org/helpdesk/tickets/63962 (private)
@kimprice @abchatra
Although snippets in the Learn more page display blocks properly with the package list removed, it does not work when the README is viewed from MakeCode's Javascript Explorer.
Based on other examples, I think the README snippets display properly when the package list includes the extension's repo.
Could the self-reference be filtered out in the Learn more case?
I don't know how this applies to tutorials or other documentation files inside or outside the extension repo.
See https://github.com/microsoft/pxt-bluetooth-max6675
Learn more
README
Describe the bug
The Edit buttons on some extensions' Learn more pages, fail to create a working project.
There's a dialogue offering to fix the problem, which doesn't work. The JavaScript mode Explorer shows multiple errors
The errors are often due to duplication of the extension with different package names. Once this has happened, adding the extension to the original project fails: it appears in the Explorer, but not on the blocks categories panel. This seems to be quite persistent. I ended up resetting MakeCode and using F12/Application/Storage/Clear site data.
Example extensions: kitronik-servo-lite, iot-environment kit, Environment-and-Science-IoT, bluetooth-max6675
NB: USE AN INCOGNITO WINDOW TO TEST THIS. Close all incognito windows for a fresh start. The error occurs in normal windows, but I'm not sure it's recoverable without resetting MakeCode.
To Reproduce Steps to reproduce the behavior:
Expected behavior A valid project is created.
micro:bit version (please complete the following information):
You can find this information in the lower right hand corner of the back of micro:bit (the side that says BBC micro:bit).
Desktop (please complete the following information):