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

Propagate error to avoid downstream execution #347

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

jvican
Copy link
Contributor

@jvican jvican commented Mar 14, 2018

As the compilation task does not throw an exception, but rather we model
failures in the DAG, we need to propagate the error down the task
dependency chain so that tasks that depend on compilation do not continue
if compilation has failed.

In this vein, this commit aligns the codebase to behave like this, and then
avoid testing a project that has not correctly compiled.

excludeRoot: Boolean
)(next: State => Task[State]): Task[State] = {
Tasks.compile(state, project, reporterConfig, excludeRoot).flatMap { compiled =>
if (compiled.status != ExitStatus.CompilationError) next(compiled)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we only continue if the status is Ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a little bit afraid of doing that now because of #195 and other errors we've had in this area (which is probably the less tested overall in bloop), so I'd prefer to keep it this way for now.

@Duhemm
Copy link
Collaborator

Duhemm commented Mar 14, 2018

Drone didn't run...

As the compilation task does not throw an exception, but rather we model
failures in the DAG, we need to propagate the error down the task
dependency chain so that tasks that depend on compilation do not
continue if compilation has failed.

In this vein, this commit aligns the codebase to behave like this, and
then avoid testing a project that has not correctly compiled.
@jvican jvican force-pushed the topic/propagate-compilation-error branch from e9771fb to e168ca9 Compare March 14, 2018 16:40
@Duhemm Duhemm merged commit 19fcba1 into master Mar 14, 2018
@jvican jvican deleted the topic/propagate-compilation-error branch September 28, 2018 18:37
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.

2 participants