Skip to content

refactor: dfx build#328

Merged
hansl merged 11 commits intomasterfrom
build
Jan 24, 2020
Merged

refactor: dfx build#328
hansl merged 11 commits intomasterfrom
build

Conversation

@chenyan-dfinity
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity commented Jan 18, 2020

  • Trace local imports for dependency analysis
  • Show warning from moc
  • Show real error message (stdout) from npm
  • Remove duplicate code, consolidate build error messages, show specific cmd when we get an error.
  • Cargo-like build UI

@chenyan-dfinity chenyan-dfinity marked this pull request as ready for review January 21, 2020 18:44
@chenyan-dfinity chenyan-dfinity requested a review from a team as a code owner January 21, 2020 18:44
@hansl
Copy link
Contributor

hansl commented Jan 23, 2020

I've been trying to build a CanisterBuild structure that would hold most of the build information of a canister. Is this something we could do in this PR?

Ok(())
if !surpress_warning && !output.stderr.is_empty() {
// Cannot use eprintln, because it would interfere with the progress bar.
println!("{}", String::from_utf8_lossy(&output.stderr));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't redirect STDERR into STDOUT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As commented in the code, output to stderr will interfere with the progress bar UI. What's your suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. Our STDOUT should probably be errors / warnings anyway as these are the only information from a build we care about.

@chenyan-dfinity
Copy link
Contributor Author

I've been trying to build a CanisterBuild structure that would hold most of the build information of a canister. Is this something we could do in this PR?

Not in this PR. We have CanisterInfo and MotokoParams that kind of does this. But I think there are design issues we need to discuss before finalizing on the Builder structure, e.g. Do we want dfx to build modules/packages as well? How to support other languages?

@hansl hansl merged commit efae02b into master Jan 24, 2020
@hansl hansl deleted the build branch January 24, 2020 19:06
dfinity-bot added a commit that referenced this pull request Jan 5, 2021
mergify bot pushed a commit that referenced this pull request Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants