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

Improve compute build rust compilation error messaging #60

Merged
merged 2 commits into from May 11, 2020

Conversation

phamann
Copy link
Member

@phamann phamann commented May 8, 2020

TL;DR

Improves the error messaging when Rust compilation fails during fastly compute build.

Why?

We've had lots of user feedback that the current implementation is confusing as it just returns an error code and no remediation message or help text. It was also not apparent that you could run the command with the --verbose flag to get the full output from the child cargo process which contains the real cause of the failure.

What

We now return the full buffered stderr output from cargo build if the process fails which hopefully gives the user much more information to solve their problem. We also pass the --verbose flag to the child process if supplied giving even more information if required.

@phamann phamann added the enhancement New feature or request label May 8, 2020
Copy link
Member

@thommahoney thommahoney left a comment

Choose a reason for hiding this comment

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

I think this looks good!

Comment on lines +175 to +176
"--color",
"always",
Copy link
Member

Choose a reason for hiding this comment

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

Not necessary for this PR, but if people start using this tool in CI, they may not want colors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup I thought about this too. I think we need to do a sweep on the commands in another PR to ensure we don't assume TTY, ANSI etc support.

@phamann phamann merged commit aed8b68 into master May 11, 2020
@phamann phamann deleted the phamann/build-error-help branch May 11, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants