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

Always log stack traces for Error objects #3586

Merged
merged 2 commits into from
Dec 16, 2023
Merged

Always log stack traces for Error objects #3586

merged 2 commits into from
Dec 16, 2023

Conversation

natebosch
Copy link
Member

Closes #3585

The default logging omits stack traces by default and prints them only
in verbose mode. This is intended to allow builder implementations to
cease execution and log a user friendly message by throwing a single
Exception with a custom toString(). When a builder or utility
library has an implementation bug leading to an Error the stack trace
is much more likely to be useful information for debugging, and worth
including by default.

Closes #3585

The default logging omits stack traces by default and prints them only
in verbose mode. This is intended to allow builder implementations to
cease execution and log a user friendly message by throwing a single
`Exception` with a custom `toString()`. When a builder or utility
library has an implementation bug leading to an `Error` the stack trace
is much more likely to be useful information for debugging, and worth
including by default.
@natebosch natebosch requested a review from jakemac53 September 28, 2023 19:36
@natebosch
Copy link
Member Author

I'm going to wait until we have agreement and I can land dart-lang/source_gen#687 before landing this. Ideally I'd like to have source_gen published before the new build_runner with this change.

@kevmoo
Copy link
Member

kevmoo commented Dec 12, 2023

Unblocked?

@natebosch
Copy link
Member Author

We haven't published source_gen yet, I don't recall if there was a blocker or if I just forgot to publish.

@natebosch
Copy link
Member Author

Hmm, do we have a good way to ignore the markdown link check for a (hopefully transient) external problem? Or should I merge on red?

@kevmoo
Copy link
Member

kevmoo commented Dec 13, 2023

Hmm, do we have a good way to ignore the markdown link check for a (hopefully transient) external problem? Or should I merge on red?

merge on red!!!

@natebosch natebosch merged commit ca7f881 into master Dec 16, 2023
69 of 70 checks passed
@natebosch natebosch deleted the log-error-stack branch December 16, 2023 00:26
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.

Could build_runner provide a stacktrace when builders throw an exception?
3 participants