-
Notifications
You must be signed in to change notification settings - Fork 204
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
Throw error from bloopGenerate task #1973
Conversation
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.
Thanks for the great contribution! I have one question and it seems the jobs are failing due to explicit usage of bloopGenerate := None
in some places. You should be able to change those occurrences to the new format.
@@ -1139,6 +1135,12 @@ object BloopDefaults { | |||
BloopKeys.bloopGenerate | |||
.all(filter) | |||
.map(_.toSet) | |||
.map(_.map { | |||
case Inc(th) => | |||
logger.error(s"Couldn't run bloopGenerate. Cause:\n$th") |
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.
So this should still allow the behaviour introduced in #1663 ? Meaning, fail, but still run bloop generate for all the projects it could.
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.
Hmm, nope, that behaviour wont work after. Should we introduce some flag to bloopInstall to allow #1663 behaviour, cause it's look like failing import is preferred action?
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.
maybe we should introduce some new task which should be run manually for #1663 behaviour
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.
Guess we can do some changes to keep both behaviours, I'll try
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.
Thanks!
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.
I'm not sure about how tasks evaluate, I've read some time ago that there's no order guarantees. If at this point of evaluation all bloopGenerate tasks finished then #1663 is satisfied
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.
Could we maybe just flatten the result first? Or do a fold on it? And once we get the final result we can throw the exception.
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 jumping in here to say that I agree with @tgodzik. I think it's importing to keep the behavior to complete as much as possible and to continue to the end. Once we have the collection of results of all the blooGenerate
s we should then be able to still determine if there was a single Inc
and if so report on it.
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.
I made some changes, need your approve on that
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.
Done! Sorry for the delay!
b54a7ff
to
3df69e8
Compare
b125490
to
9d7d839
Compare
@tgodzik some checks failed with timeouts, is it some problem with my changes? or restart until it goes away? |
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 a nit on naming. As for the CI, don't worry about it the tests that failed have been very flaky recently.
Thanks a lot for working on this!
integrations/sbt-bloop/src/main/scala/bloop/integrations/sbt/SbtBloop.scala
Outdated
Show resolved
Hide resolved
…res during build import
9d7d839
to
1d52064
Compare
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.
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.
LGTM! Thanks for the great work!
Sbt task bloopGenerate should throw occurred errors to indicate failures during build import