Hello,I have been submitting changes for the Wno-conversion issue which I found on the getting started guide:I wanted to ask if there is a build command that will build everything.I have currently done:
fx set workstation.qemu-x64I tried to automate the removal of the unneeded Wno-conversions.I wrote a script that checks each BUILD.gn file, deletes the config line with Wno-conversion, runs "fx build" and if it fails restores the file.However, sometimes the build will succeed even if the target shouldn't build. I tried running "fx clean-build", but that also passes, even though individual targets fail.An example of such a target is the `garnet/bin/insntrace:bin`. Removing the Wno-conversion for it and running `fx clean-build` passes, but compiling the specific target with `fx build garnet/bin/insntrace:bin` fails. I guess this means that the target itself isn't built when running the `fx clean-build` command and that's why it passes.I wanted to ask if there is a build command that will rebuild all affected targets, as that would make the automated replacing a lot simpler. Another idea I had was to parse the files and see which targets change (probably using some of the tools in the gn build system for inspiration).Thank you for your help.Kind regards,Andrey
Hi Andrey,Thank you for your work! Adding +discuss in case more folks have ideas.I wish there was a way to build everything. As it stands, GN takes arguments (indirectly via `fx set`, or directly via `fx args`), then applies them, then generates ninja files which is what decides what work is done on `fx build`. Building everything requires regenerating and running ninja for all viable combinations of arguments. Plus, for instance you can't build any Mac host binaries unless you have a Mac, because the Mac toolchain is not hermetic yet (uses your local xcode install, not limited exclusively to Fuchsia toolchain prebuilts that are downloaded on `jiri update`).
What I do instead is use this as a first approximation:fx set core.x64 --with //bundles/buildbot:coreFor large-scale changes I run any sort of cleanup on my machine with this configuration. Then I upload the change to gerrit and trigger the commit queue to identify any issues that only happen on other configurations. Then I work out what is the `fx set` command to run to reproduce any failures on CQ bots using `fx repro`.The fact that there's no simple way is the reason why we haven't automated this cleanup of stale -Wno-conversion's yet. I'm hoping you could come up with a creative solution, or at least identify a way to clean up just code that's in the scope of a particular build configuration that captures most of the sources. That would be very valuable too!If you have more changes then I'm happy to continue reviewing and committing them. Or we can figure out how to give you committer status.On Tue, Jan 18, 2022 at 3:40 AM Andrey Andreev <a.d.an...@gmail.com> wrote:Hello,I have been submitting changes for the Wno-conversion issue which I found on the getting started guide:I wanted to ask if there is a build command that will build everything.I have currently done:
fx set workstation.qemu-x64I tried to automate the removal of the unneeded Wno-conversions.I wrote a script that checks each BUILD.gn file, deletes the config line with Wno-conversion, runs "fx build" and if it fails restores the file.However, sometimes the build will succeed even if the target shouldn't build. I tried running "fx clean-build", but that also passes, even though individual targets fail.An example of such a target is the `garnet/bin/insntrace:bin`. Removing the Wno-conversion for it and running `fx clean-build` passes, but compiling the specific target with `fx build garnet/bin/insntrace:bin` fails. I guess this means that the target itself isn't built when running the `fx clean-build` command and that's why it passes.I wanted to ask if there is a build command that will rebuild all affected targets, as that would make the automated replacing a lot simpler. Another idea I had was to parse the files and see which targets change (probably using some of the tools in the gn build system for inspiration).Thank you for your help.Kind regards,Andrey
--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/discuss/CAK0PkCEy8p%3D2m5zyE5%2Bk_1LU5r1Ux-QdmjiK-x81rrS%2BxVbPRg%40mail.gmail.com.