feat: add verbose and extra-args to dfx build#347
feat: add verbose and extra-args to dfx build#347chenyan-dfinity wants to merge 1 commit intomasterfrom
Conversation
| .help(UserMessage::BuildArgs.to_str()), | ||
| ) | ||
| .arg( | ||
| Arg::with_name("verbose") |
There was a problem hiding this comment.
Verbosity should be a global flag. Also, this code is most likely to be wiped out when we start using slog, so why not do a PR now to do that instead?
There was a problem hiding this comment.
Verbosity should be a global flag.
I agree. Do you prefer to put the flag to the global scope with only build supporting it, or promote it to global after we have verbose mode for most commands?
There was a problem hiding this comment.
Also, this code is most likely to be wiped out when we start using slog, so why not do a PR now to do that instead?
This again seems to be a global change, which should be done in a dedicated PR. I don't see an urgency to switch to slog, but I do see the urgency to enable verbose mode on build.
There was a problem hiding this comment.
I think we can start using slog here honestly. It doesn't have to be global. @chenyan-dfinity let's sync on this.
| .help(UserMessage::SkipFrontend.to_str()), | ||
| ) | ||
| .arg( | ||
| Arg::with_name("extra-args") |
There was a problem hiding this comment.
We should separate those between where they're used. extra-args has no semantic meaning (moc-args? compiler-args?). We're also building more and more of a Motoko-specific build system here, and I don't agree with that direction. We can chat offline.
There was a problem hiding this comment.
As discussed on slack, the proper way is to add flag into a config file like dfx.json. Before we have the design, it would be nice to have an CLI flag to pass in extra flags. I'm fine rename it to moc-args, but the intension is to provide a way to pass in extra arguments to any compilers. We can also add a comment in the user message warning that this flag is experimental and will go away.
There was a problem hiding this comment.
Any update on this? Let's place discussions/more details online.
I agree with the compiler arguments flag. I don't like the verbosity change -- or maybe I am missing something. I think we can use slog just in build instead, and then fully integrate it piece by piece.
## Changelog for advisory-db: Branch: Commits: [rustsec/advisory-db@ca4219e1...ee840d4a](rustsec/advisory-db@ca4219e...ee840d4) * [`a7b90acd`](rustsec/advisory-db@a7b90ac) Add alias for GHSA ([RustSec/advisory-db#346](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/346)) * [`ee840d4a`](rustsec/advisory-db@ee840d4) Add some minimal guideline about GHSA ([RustSec/advisory-db#347](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/347))
## Changelog for advisory-db: Branch: Commits: [rustsec/advisory-db@ca4219e1...ee840d4a](rustsec/advisory-db@ca4219e...ee840d4) * [`a7b90acd`](rustsec/advisory-db@a7b90ac) Add alias for GHSA ([RustSec/advisory-db#346](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/346)) * [`ee840d4a`](rustsec/advisory-db@ee840d4) Add some minimal guideline about GHSA ([RustSec/advisory-db#347](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/347))
## Changelog for common: Branch: master Commits: [dfinity-lab/common@98c8626c...d67d80ca](https://github.com/dfinity-lab/common/compare/98c8626c25554fb962f2d0e65d703ad0947ad097...d67d80cacf382804dab0e8682b1e554dde9023bc) * [`d67d80ca`](https://github.com/dfinity-lab/common/commit/d67d80cacf382804dab0e8682b1e554dde9023bc) Add ssh Andrew Lee's key to accounts.nix ([dfinity-lab/common#347](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity-lab/common/issues/347))
## Changelog for common: Branch: master Commits: [dfinity-lab/common@98c8626c...d67d80ca](https://github.com/dfinity-lab/common/compare/98c8626c25554fb962f2d0e65d703ad0947ad097...d67d80cacf382804dab0e8682b1e554dde9023bc) * [`d67d80ca`](https://github.com/dfinity-lab/common/commit/d67d80cacf382804dab0e8682b1e554dde9023bc) Add ssh Andrew Lee's key to accounts.nix ([dfinity-lab/common#347](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity-lab/common/issues/347))
No description provided.