microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
726 stars 638 forks source link

MakeCode V5 seems to ignore dv:mbcodal setting that enables V4 to build some extensions to build for micro:bit V1 #4926

Closed martinwork closed 1 year ago

martinwork commented 1 year ago

Arising from support tickets (private) https://support.microbit.org/helpdesk/tickets/60032 https://support.microbit.org/helpdesk/tickets/60470

Describe the bug

Projects using the bluetooth-midi extension fail to build, though they build on the previous MakeCode. https://makecode.microbit.org/pkg/microsoft/pxt-bluetooth-midi

v4.0.24 builds the project for V1 only, and shows in console:

auto-disable mbcodal due to targetconfig entry for microsoft/pxt-bluetooth-midi#v2.0.13
auto-disable mbcodal due to targetconfig entry for github:microsoft/pxt-bluetooth-midi#v2.0.13

v5.0.12 attempts and fails to build for V2 and displays error Cannot read properties of undefined (reading 'toString')

Both versions have targetconfig entries for pxt-bluetooth-midi in sections approvedRepos and upgrades (dv:mbcodal)

v5.0.12 has an additional targetconfig entry in section approvedRepoLib https://github.com/microsoft/pxt-microbit/blob/97491d6832cccab6b5bdc05b58e4c6b5dcc18cdd/targetconfig.json#L356

To Reproduce Steps to reproduce the behavior:

  1. Create a project using the extension
  2. Try to build
  3. See error

Expected behavior Extension builds as it did on the previous version.

micro:bit version (please complete the following information): not hardware related

Desktop (please complete the following information):

martinwork commented 1 year ago

@abchatra This issue has been raised again. They are trying to use the Bluetooth midi extension with micro:bit V1. Support ticket https://support.microbit.org/helpdesk/tickets/60470 (private)

abchatra commented 1 year ago

I can reproduce this issue. I will mark for this release.

abchatra commented 1 year ago

However, I should say we have found various issues with all bluetooth extensions and recommend not using them at all.

martinwork commented 1 year ago

@abchatra Could it be simply that MakeCode no longer looks at the "upgrades" section of targetconfig and the "dv:mbcodal" tag has been missed in "approvedRepoLib"?

jwunderl commented 1 year ago

That should be the case, yes

abchatra commented 1 year ago

Yes old section is deprecated.

martinwork commented 1 year ago

Thanks @abchatra @jwunderl The good news is I think there are only 30 "dv:mbcodal" in the file, of which 14 are in approvedRepoLib. I'll figure out what the other missing one is and make a PR.