-
Notifications
You must be signed in to change notification settings - Fork 70
Fix compute build rendered output
#842
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
Conversation
e2779bb to
97f6173
Compare
Integralist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor comments for future travellers to understand the changes in this PR.
| } | ||
|
|
||
| if !c.overrideHost.WasSet && !c.sslCertHostname.WasSet && !c.sslSNIHostname.WasSet { | ||
| if input.Address != nil && !c.overrideHost.WasSet && !c.sslCertHostname.WasSet && !c.sslSNIHostname.WasSet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing a nil pointer dereference bug
| } | ||
|
|
||
| language, err := language(toolchain, c, out) | ||
| language, err := language(toolchain, c, in, out, spinner) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was related to simplifying the Toolchain interface's Build method (as we already pass a bunch of things into each language constructor, and some of the data was overlapping).
| return err | ||
| } | ||
|
|
||
| postBuildCallback := func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the order of rendering I needed to move this logic (and associated prompt functionality) inside the toolchain implementation.
| wantOutput: []string{ | ||
| "echo doing a post build", | ||
| "Are you sure you want to continue with the post build step?", | ||
| "Stopping the post build process", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed a redundant message that was duplicating the final error message displayed.
| [scripts] | ||
| build = "touch ./bin/main.wasm" | ||
| post_build = "echo doing a post build with no confirmation prompt"`, | ||
| post_build = "echo doing a post build with no confirmation prompt && exit 1"`, // force an error so post_build is displayed to validate it was run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now only show build/post_build output when there is an error (no need to show it if the project compiles successfully) and so we needed to fix the test to force an error so we could validate the post_build script was run.
Noticed some issues with how content was being rendered under specific scenarios.