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

Fix tapir on scala 3.4.0: an incorrect form of a tuple type being generated #3643

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Mar 28, 2024

The issue was found by the scala 3 open community build, and caused the macro expansion of the tests to fail compilation on scala 3.4.0. The previous implementation generated types which then later could not be "inline matched" by the newer compiler (generating new compile time errors), but somehow managed to go through the cracks of the older compiler. Those types would have shape like:

scala.*:[_ >: scala.Nothing <: scala.Any, _ >: scala.Nothing <: scala.Any][scala.Some[scala.Any], scala.Tuple$package.EmptyTuple]

(a type applied with wildcards, and also applied with correct types).

This PR fixes the implementation, so that the macro expansion will be successful for users using tapir on scala 3.4.0.
Underlying issue and fix found by @nicolasstucki

More information: scala/scala3#19458

This was found by the Scala 3 open CommunityBuild, and caused the
macro expansion of the tests to fail compilation on scala 3.4.0.
The previous implementation generated types which then could not be
"inline matched" by the newer compiler, but somehow managaed to go
through the cracks of the older compiler.
Copy link
Member

@kciesielski kciesielski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jchyb!

@adamw adamw merged commit 5aec689 into softwaremill:master Mar 28, 2024
23 checks passed
@adamw
Copy link
Member

adamw commented Mar 28, 2024

Thanks :) Not sure why these are in core anyway ... hence #3644

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

Successfully merging this pull request may close these issues.

None yet

3 participants