Open xobs opened 5 years ago
@darzu can you take a look at this issue?
@pelikhan , @mmoskal , could I get some help understanding what the right steps for local building are?
What's the right sequence of commands to run? What are the prerequisites? Can you confirm any of the assumptions on my documentation cleanup ToDo list below?
I've also had trouble getting local cpp builds working in the past, although today pxt serve --local
seems to do everything I need. I can edit a .cpp file, see the rebuild, see the update in pxt-microbit.
ToDo:
Different targets have different building instructions. For example minecraft. I prefer keeping them in the target even if they are duplicates.
I would much rather have something like: "If target has no C++ skip these steps." and then possibly minecraft have something like "Follow usual instructions at pxt-core and then XYZ". This will be way easier to maintain...
The CLI arguments have changed over time. The docs should be in "common-docs" so that they get versioned properly -- and you don't end up with newer flags for an older pxt version.
The CLI arguments have changed over time. The docs should be in "common-docs" so that they get versioned properly -- and you don't end up with newer flags for an older pxt version.
How would that work? Should the target readme.md reference a specific version of doc in common-docs?
The readme could just be very short and link to say https://arcade.makecode.com/building
(we have quite involved procedure for generating docs in editors, they derive from the base docs in pxt-core and pxt-common-packages and can override sections)
As per #5286, cloud building is not the preferred method for doing C++ development. However, the documentation does not reflect this anywhere.
For example, documentation for the
pxt
command only mentions the--cloud
command, and indicates that this forces builds to happen "in the cloud". This implies that the default is to not do that.Indeed, projects (such as https://github.com/microsoft/pxt-chibitronics#setup) indicate that a local toolchain is required to build, and other projects mention the invalid
-yt
flag (https://github.com/Microsoft/pxt-calliope#running).There are a few issues here:
--localbuild
flag should be documented--cloud
is default and implied-yt
should be removed from documentation