Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document local build process #5319

Open
xobs opened this issue Mar 8, 2019 · 9 comments
Open

Document local build process #5319

xobs opened this issue Mar 8, 2019 · 9 comments

Comments

@xobs
Copy link

xobs commented Mar 8, 2019

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:

  1. The --localbuild flag should be documented
  2. It should be mentioned that --cloud is default and implied
  3. Nonexistent flags such as -yt should be removed from documentation
  4. It should be mentioned that, when doing C++ development, a local build environment is preferred.
@abchatra
Copy link
Collaborator

@darzu can you take a look at this issue?

@darzu
Copy link
Contributor

darzu commented Mar 18, 2019

@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.

@darzu
Copy link
Contributor

darzu commented Mar 18, 2019

ToDo:

  • remove "--cloud" because I think it's the default (need to confirm)
  • standardize documentation to mention "--local" for local builds, and remove mention of "--localbuild" because I think these are aliases (need to confirm)
  • remove "-yt" from documentation
  • move all local building documentation into pxt so it isn't duplicated between every target. This assumes different targets don't need different steps, need to confirm this
  • explain that "--local" should be used when doing C++ development

@abchatra
Copy link
Collaborator

Different targets have different building instructions. For example minecraft. I prefer keeping them in the target even if they are duplicates.

@mmoskal
Copy link
Member

mmoskal commented Mar 18, 2019

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...

@pelikhan
Copy link
Member

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.

@darzu
Copy link
Contributor

darzu commented Mar 18, 2019

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?

@mmoskal
Copy link
Member

mmoskal commented Mar 18, 2019

The readme could just be very short and link to say https://arcade.makecode.com/building

@mmoskal
Copy link
Member

mmoskal commented Mar 18, 2019

(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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants