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
feat: allow user implemented mappings to be marked as default #1071
Conversation
81c0dda
to
6615553
Compare
2e2df29
to
9e95e38
Compare
9e95e38
to
2080a7f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1071 +/- ##
==========================================
- Coverage 91.35% 91.32% -0.04%
==========================================
Files 222 224 +2
Lines 7312 7447 +135
Branches 940 952 +12
==========================================
+ Hits 6680 6801 +121
- Misses 410 420 +10
- Partials 222 226 +4 ☔ View full report in Codecov by Sentry. |
I'm not sure whether or not we should consider the first user implemented mapping as default if |
Do we really need this? Let's take this as an example:
Is there any scenario where But maybe there are some scenarios (generic mapping method?) where multiple user methods could apply? If that is the case, then this new feature makes sense, but those scenarios should be used in the tests instead of mapping from Instead of using a
For a partial method "MyMethod1", all three methods are suitable, so Method 3 is picked. For another partial method "MyMethod2", only Method1 and Method2 are suitable, so Method2 is picked. This wouldn't work if only Regardless of implementation, IMO the behavior should be:
I don't think there is an advantage to making |
Using default for now instead of priority as we do it in other parts (eg. |
🎉 This PR is included in version 3.5.0-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fixes #1008
RMG060
default severity is info for now, since otherwise this would result in lots of warnings for before-/aftermap. This should be changed with the next breaking change (see Proposed breaking changes for Mapperly 4.0 #1131).