Avoid recursive inlining (for products)#575
Draft
MartinHH wants to merge 3 commits intosoftwaremill:scala3from
Draft
Avoid recursive inlining (for products)#575MartinHH wants to merge 3 commits intosoftwaremill:scala3from
MartinHH wants to merge 3 commits intosoftwaremill:scala3from
Conversation
Leverage summonAll instead of recursion.
Author
Turns out that one doesn't fail when changing the project's scala version to 3.4.0 (and the unexpected error messages from the other failing tests are also much closer to the expected ones). Maybe it would make sense to postpone this change until the next LTS version (3.7.0) is out and Magnolia is migrated to that (?). |
MartinHH
commented
Feb 16, 2025
| } { params => product.fromProduct(Tuple.fromArray(params)) } | ||
| } | ||
|
|
||
| private trait ParamFactory[TC[_], P]: |
Author
There was a problem hiding this comment.
This is where one would need to add an @implicitNotFound annotation in order to fix the failing tests related to (compilation) error messages.
Something along the lines of:
@implicitNotFound("No given instance of type ${TC} (for type ${P}) was found")
Leverage summonAll instead of recursion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leverage summonAll to avoid recursive inlining as proposed in #574
So far, this is just a proof of concept.
Various tests are still failing - most of them are related to error messages of compilation errors not being as expected, but
one ("derive instances for types with refined types if implicit provided") seems a bit more serious (compilation fails when it shouldn't).