-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Don't loose moduleDeps
from super traits in PublishModule
#2083
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.
I'm not fully convinced by the extends NoStackTrace
exception. It's maybe because I never used it before, but also, as it is loosing valuable information and it might not be obvious to users why this information is missing. I wouldn't expect that all users will find the issue easily, and certainly not tools.
Also, I think we should instead handle proper error message formatting some levels above (we currently don't). Loosing the stack trace without any needs (performance) smells like an too-early optimization.
IMHO, we should simply throw an exception with stack trace here. The error case is rare enough.
If you have more convincing arguments, I'm happy to hear about. But we should consider to log these information anyways in debug mode then.
Ideally what I wanted was to return a |
Thanks. I typically handle exception in the application entry point where we can distinguish between known error (which we can format properly) and unexpected ones. |
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.
The change itself looks good to me. But we have failing MiMa checks. Any idea? Also, the PR summary is no longer correct.
I saw we already ignored some other Updated the PR description ✅ |
moduleDeps
from super traits in PublishModule
Thank you! |
Instead of overriding
moduleDeps
to bePublishModule
s we iterate over the existingmoduleDeps
and we cast toPublishModule
s if they are of that type, otherwise we throw an exception with an error message to fix the problem.PublishModule
deletesmoduleDeps
created by other traits #2082Outdated docs
The first version of this PR was using a
NoStackTrace
exception. Now the following doesn't apply anymoreThis is with the
NoStackTrace
custom exception:Since the Exception is create in the
PublishModule
class it's easy to locate where the error comes from.This is with a normal
Exception