Skip to content

[native_assets_builder] Stop throwing from BuildRunner #108

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

Merged
merged 6 commits into from
Aug 7, 2023

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Aug 1, 2023

Closes #106.

  • Streams errors to the logger.
  • Returns a success boolean.

Closes #111.

  • Deletes build_output.yaml to prevent caching on build failures. (See issue for alternative solutions.)

@coveralls
Copy link

coveralls commented Aug 1, 2023

Coverage Status

coverage: 98.04% (-0.6%) from 98.649%
when pulling 6bced48 on build-result-errors
into 3f26f20 on main.

@dcharkes dcharkes changed the title Build-result-errors [native_assets_builder] Build-result-errors Aug 1, 2023
@mkustermann
Copy link
Member

@dcharkes given you want to rely on logging as side-channel for any build related info (what is being build, whether it was successful or not, reproduction instructions, timings, ...) it seems this PR isn't needed, is it?

@dcharkes dcharkes force-pushed the build-result-errors branch from 069662c to f9a4e35 Compare August 3, 2023 13:25
@dcharkes
Copy link
Collaborator Author

dcharkes commented Aug 3, 2023

@dcharkes given you want to rely on logging as side-channel for any build related info (what is being build, whether it was successful or not, reproduction instructions, timings, ...) it seems this PR isn't needed, is it?

I still think it's a good idea to return a success boolean rather than throwing and having call sites catch or write onError on the futures. (That's way it's less likely that launchers will forget to handle errors and throw a stack trace at the user.)

I'll rework the PR to do that instead.

@dcharkes dcharkes requested a review from mkustermann August 3, 2023 15:10
@dcharkes dcharkes changed the title [native_assets_builder] Build-result-errors [native_assets_builder] Stop throwing from BuildRunner Aug 3, 2023
@dcharkes
Copy link
Collaborator Author

dcharkes commented Aug 3, 2023

@mkustermann I've reworked the PR so that it doesn't throw any errors anymore and streams all errors to the logger.

@dcharkes
Copy link
Collaborator Author

dcharkes commented Aug 7, 2023

Thanks @mkustermann !

@auto-submit
Copy link

auto-submit bot commented Aug 7, 2023

auto label is removed for dart-lang/native/108, due to - The status or check suite build (windows, stable, native_toolchain_c) has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit label Aug 7, 2023
@dcharkes dcharkes merged commit b2b26db into main Aug 7, 2023
@dcharkes dcharkes deleted the build-result-errors branch August 7, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native_assets_builder] Caching logic on build failures [native_assets_builder] Output a success bool and don't throw
3 participants