Pxt build with metadata

I’m trying to build the binary.js that is used on GitHub pages with the pxt tool. In the GitHub repo, (I’m just using one of my games as an example) assets/js/binary.js has this little metadata at the top of the JS file:

// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.8.30/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.3.0","target":"arcade","targetVersion":"1.8.30","repo":"unsignedarduino/racers"}
// total=3116124 new=17.65% cached=78.00% other=4.35%
(function (ectx) {
'use strict';
// ...more code

But when I use pxt build --cloud on my machine, the built/debug/binary.js I get doesn’t have this metadata:

// total=3298379 new=95.74% cached=0.00% other=4.26%
(function (ectx) {
'use strict';
// ...more code

How can I make the pxt tool add this metadata so the correct simulator is used? I’ve tried looking at the differences between the GitHub Action and what commands I’m running but there seems to be no difference, is it an environment thing?

Also, it appears like I’m building a debug binary, is there a way to build a “production ready” binary?

1 Like

Apparently I’ve already asked about this before @richard lol
(I understand if you can’t say anything since it’s closed source)


For stream today (math spoiler)

You’re supposed to use the inverse of the rotation matrix. Since I’m bad at linear algebra I used Wolfram Alpha to find the inverse and then simplified it, which I checked with AI. I got the x part eventually I guess… :sweat_smile:

2 Likes

Guess who finally connected the dots

F:\TestingPXT\Racers>pxt build
Using target arcade with build engine codal
  target: v2.0.48 F:\TestingPXT\node_modules\pxt-arcade
  pxt-core: v11.3.51 F:\TestingPXT\node_modules\pxt-core
building F:\TestingPXT\Racers
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> m
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> i
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> n
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> :
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> v
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> 0
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> .
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> 0
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> .
invalid upgrade rule: github:microsoft/arcade-sprite-data#v0.1.0 -> 6

F:\TestingPXT\Racers>
// meta={"simUrl":"https://trg-arcade.userpxt.io/v2.0.48/---simulator","cdnUrl":"https://cdn.makecode.com","version":"1.3.2","target":"arcade","targetVersion":"2.0.48","repo":"unsignedarduino/racers"}

It literally says the target version in the output of the command :person_facepalming: :person_facepalming: :person_facepalming:

2 Likes