The Project class in mkc.ts will not re-read mkc.json after it loads the first time. Even if the targetwebsite changes, it'll still build with the old version.
Repro
To repro do the following:
In an empty folder run mkc init arcade
Change targetWebsite iin mkc.json to https://arcade.makecode.com/v1.12.22
Run mkc build -j -w to build and start a watch
Notice the build runs with v1.12.22
Change the patch version in mkc.json to 23
Notice the build runs with v1.12.22 again
You can keep changing the version and it will never change.
Problem
The
Project
class inmkc.ts
will not re-read mkc.json after it loads the first time. Even if the targetwebsite changes, it'll still build with the old version.Repro
To repro do the following:
mkc init arcade
https://arcade.makecode.com/v1.12.22
mkc build -j -w
to build and start a watchYou can keep changing the version and it will never change.
Notes
Start looking at
loadPkgAsync
for a possible solution. https://github.com/microsoft/pxt-mkc/blob/b20c17007f560471134e91076c71bf380746d5d1/packages/makecode-core/src/mkc.ts#L201-L204