microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 26 forks source link

Build issues with jacdac extension #1246

Closed ross-inksmith closed 1 year ago

ross-inksmith commented 1 year ago

Started as a discussion but moved to issue after messaging Tom.

Normally for testing an extension, in the extension folder I can run pxt target microbit; pxt build --install (for the first time, pxt build afterwards) to generate a .hex to import to makecode, or share internally.

For a new project: makecode init microbit jacdac; pxt target microbit; pxt build --install fails with the following error: TS2339: Property 'allocateEventSource' does not exist on type 'typeof control', the issue is on routing.ts:1031

Building with mkc build makes a file that fails to import.

Thanks in advance

pelikhan commented 1 year ago

If you are using the 'makecode' tool, you do not need to use pxt as they are separate toolchains. You use mkc build to create a .hex file, which in fact, does not contain any sources.

In order to test blocs, push your changes to a branch and open this branch in the makecode editor using the github integration.

ross-inksmith commented 1 year ago

Thanks for the quick reply, I see the issue now. I had previously been using the import button on the home page, which disables the block editor when you import from github unlike when I put the URL into the extension menu.