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

Hiding errors on release 0.16.1 #194

Closed
michelzanini opened this issue Feb 23, 2023 · 1 comment
Closed

Hiding errors on release 0.16.1 #194

michelzanini opened this issue Feb 23, 2023 · 1 comment

Comments

@michelzanini
Copy link

Hi,

On release 0.16.1 this change was introduced ad133e8.

I understand this is trying to workaround initialisation issues. However, it creates larger problems.
Because the catch block hides the exceptions, this becomes a real mess when the error is not actually because of initialisation order.

For example, I had multiple times where the failure was "Can't release a repo without being clean" or "Can't re-release the same tag again" etc.... (errors that were my mistake and real errors) where the exception was caught and ignored and instead of my build failing, it went fine with "unspecified" version up to when it was actually finishing the release build (deploying and everything).

I don't think you should catch all exceptions and assume they are because the initialisation isn't correct. Most cases it will be other errors that should not be caught. Even the error message is completely misleading.

"Project version evaluated before reckon was configured. Run with --info to see cause."

The error was something completely different and the message does not make sense at all. If you want to keep this logic, you should understand which error to catch and let the others errors throw correctly.

I am going to keep using 0.16.0 instead until this issue is sorted.

Thanks.

ajoberstar added a commit that referenced this issue Apr 22, 2023
While we don't want to soft-fail at all in the settings plugin, we still
want to provide this as a workaround for misbehaving plugins that might
interfere with your version before it's configured.

However, as #194 made clear, we want to be more careful about which
exceptions we catch. We'd really like to catch cases of failing to build
the reckoner configuration. We do need to inspect the throwable cause
chain though given the layers Gradle adds on top.

Fixes #194
@ajoberstar
Copy link
Owner

This fix will be released as 0.17.0. In the new behavior, the settings plugin will never soft-fail (bury exceptions). In the "legacy" project plugin, it will only soft-fail on config errors (during Reckoner.Builder.build()) but not during version inference.

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

No branches or pull requests

2 participants