microsoft / pxt-arcade

Arcade game editor based on Microsoft MakeCode
https://arcade.makecode.com
MIT License
477 stars 206 forks source link

extension caching: slash in ext name breaks #4922

Closed jwunderl closed 1 year ago

jwunderl commented 2 years ago

Describe the bug

re: https://github.com/kiwiphoenix364/pxt-mini-tilemaps/pull/1 / https://forum.makecode.com/t/mini-tilemaps-bug/14984; if you load this game https://arcade.makecode.com/#pub:_3xC5H7Dj93vJ and then refresh the minitilemaps category will disappear

To Reproduce Steps to reproduce the behavior:

  1. Go to https://arcade.makecode.com/#pub:_3xC5H7Dj93vJ
  2. refresh
  3. see missing extension

Expected behavior

it looks like it's based on the pxt.json name have a / in it as removing that made it work (https://github.com/jwunderl/pxt-mini-tilemaps), and that tracks with my recollection of the compiled code -> extension block caching logic in the first place (as it's comparing with the beginning of the file path from the output of ts

thsparks commented 1 year ago

Supporting a "/" in extension names ends up being a non-trivial fix, and it turns out we already have some (barely) documented requirements around extension names in pxt-json.md which disallow the "/" character.

With this in mind, the "fix" is just to update our docs to make this requirement clearer.