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 MT separate compilation bug (bis) #18461

Closed

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Aug 26, 2023

Like I said in #18398, there are several factors involved, and I'd be happy to fix one or more of those causes, in alternative to hot-fixing specific tasty trees.

@dwijnand dwijnand linked an issue Aug 26, 2023 that may be closed by this pull request
@dwijnand
Copy link
Member Author

dwijnand commented Aug 28, 2023

Looking at pos/i15183. It's a test using separate compilation. With my change it stopped compiling, but with or without my change it doesn't compile in joint compilation either. So my change made it consistently not compile.

The failure is in whether Decoder.summonTuple is eligible. When its result type isn't normalized then Tuple.Map[H *: T, Decoder] is compatible with the desired Tuple.Map[(Local.type, Prod.type), Decoder]. But if it is normalized and I also normalize the desired type, then Decoder[H] *: Tuple.Map[T, Decoder] is still not compatible with (Decoder[Local.type], Decoder[Prod.type]), despite it being so if T is Tuple1[Prod.type].. 😕

should use? Tuple.Map[H *: T, Decoder]
to find: Tuple.Map[(Local.type, Prod.type), Decoder]

should use? Decoder[H] *: Tuple.Map[T, Decoder]
to find: (Decoder[Local.type], Decoder[Prod.type])


should use? Tuple.Map[T, Decoder]
to find: (Decoder[Prod.type])

@soronpo
Copy link
Contributor

soronpo commented Oct 20, 2023

@dwijnand is there a solution in sight?

@dwijnand
Copy link
Member Author

I went down the road for a long time (weeks) trying to address the general problem of making Typer and Unpickler simplify and replace types in exactly the same way - and that got very complicated. I'm taking a break on this PR, but I haven't given up on fixing this issue yet.

@soronpo
Copy link
Contributor

soronpo commented Oct 21, 2023

Is this fixed under the new match type implementation? If so, I think it is best to revert back to what worked for 3.3.0 and leave that as is for 3.3.x.

@dwijnand
Copy link
Member Author

The "new match type implementation" is only about match types reduction, in terms of whether they reduce or not and to what, in a more constrained fashion than we currently do (meaning, things that one would hope are reduced stop reducing). But it says nothing about whether those reductions should be further simplified or normalised (which was what the original #18073 was about), or whether typer and/or unpickler should simplify and overwrite their tree types (which was what the previous #18398 and this PR are about). I don't think we can revert back to what worked in 3.3.0 as we'd be causing a regression in #16596, for example.

@soronpo
Copy link
Contributor

soronpo commented Oct 23, 2023

I don't think we can revert back to what worked in 3.3.0 as we'd be causing a regression in #16596, for example.

3.2.x was not an LTS release.

@dwijnand
Copy link
Member Author

Replaced with #18786.

@dwijnand dwijnand closed this Oct 29, 2023
@dwijnand dwijnand deleted the mt-separate-compilation-bug-bis branch October 29, 2023 15:17
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.

Multi-module match type regression in 3.3.2
2 participants