You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which creates a very strange behaviour when a base trait manipulates the moduleDeps. If you add with PublishModule the dependencies added previously by other traits disappear.
Proposed solution
If it's important that all the moduleDeps are PublishModules, it should instead iterate over the moduleDeps and make sure that all the moduleDeps are proper PublishModules, and then cast the result if the requirement passes, but it shouldn't delete any existing moduleDeps otherwise.
The text was updated successfully, but these errors were encountered:
which creates a very strange behaviour when a base trait manipulates the moduleDeps. If you add with PublishModule the dependencies added previously by other traits disappear.
Proposed solution
If it's important that all the moduleDeps are PublishModules, it should instead iterate over the moduleDeps and make sure that all the moduleDeps are proper PublishModules, and then cast the result if the requirement passes, but it shouldn't delete any existing moduleDeps otherwise.
I agree. We should call super.moduleDeps and fail with a sensible error message if any of them is not a PublishModule
Instead of overriding `moduleDeps` to be `PublishModule`s we iterate
over the existing `moduleDeps` and we cast to `PublishModule`s if they
are of that type, otherwise we throw an exception with an error message
to fix the problem.
Fixes#2082
Pull request: #2083
PublshModule
has the following code:mill/scalalib/src/PublishModule.scala
Line 16 in c985ef8
which creates a very strange behaviour when a base trait manipulates the
moduleDeps
. If you addwith PublishModule
the dependencies added previously by other traits disappear.Proposed solution
If it's important that all the
moduleDeps
arePublishModule
s, it should instead iterate over themoduleDeps
and make sure that all themoduleDeps
are properPublishModule
s, and then cast the result if the requirement passes, but it shouldn't delete any existingmoduleDeps
otherwise.The text was updated successfully, but these errors were encountered: