-
Notifications
You must be signed in to change notification settings - Fork 831
Don't find witnesses for typars with conditional constraints #19123
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
Merged
+386
−7
Conversation
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
Contributor
|
Contributor
Author
|
I think this change doesn't need release notes; it's a pure bugfix. |
Smaug123
commented
Dec 2, 2025
Smaug123
commented
Dec 2, 2025
Smaug123
commented
Dec 2, 2025
Smaug123
commented
Dec 2, 2025
T-Gro
reviewed
Dec 2, 2025
Smaug123
commented
Dec 3, 2025
tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs
Show resolved
Hide resolved
T-Gro
approved these changes
Dec 4, 2025
Contributor
Author
|
@T-Gro Thanks! I may just be incompetent with GitHub, but I can't find how to add the label that gets the release notes check to pass? |
This was referenced Dec 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NO_RELEASE_NOTES
Label for pull requests which signals, that user opted-out of providing release notes
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.
Description
Cope with conditional constraints in witness passing. See extensive inline comments for the reasoning.
The initial three commits were created by Claude Opus 4.5. I then reviewed it, in the process adding some fairly extensive docstrings (all docstrings and comments in this PR come from me, except the big one in the test file). My understanding of the witness generation code is still fairly limited, and I was relying on Opus to point me to the right places to understand it; I believe my mental model is coherent, but I'm still not completely sure that it's accurate.
If you would like to simply close this without review on grounds of LLM generation by a non-domain-expert then go for it, although I don't think I could do any better with my human brain.
Fixes #19118
For reference, additional context I gave Claude as well as the text of #19118
Here is the stack trace at the point where we set the "supports comparison" constraint on the type, which we eventually try to find a witness for (and apparently fail), if that helps; but I don't know where the bug actually comes from.🔴 TypedTree.Typar.SetConstraints() in FSharp.Compiler, FSharp.Compiler.Service.dll
◻ [email protected]() in FSharp.Compiler, FSharp.Compiler.Service.dll
◻ ListModule.loop@248-3<FSharp.Compiler.TypedTree.Typar, FSharp.Compiler.TypedTree.Typar>() in Microsoft.FShar...
◻ ListModule.Iterate2<FSharp.Compiler.TypedTree.Typar, FSharp.Compiler.TypedTree.Typar>() in Microsoft.FShar...
◻ TypeHierarchy.FixupNewTypars() in FSharp.Compiler, FSharp.Compiler.Service.dll
◻ ConstraintSolver.FreshenAndFixupTypars() in FSharp.Compiler, FSharp.Compiler.Service.dll
◻ ConstraintSolver.FreshenTypeInst() in FSharp.Compiler, FSharp.Compiler.Service.dll
◻ ConstraintSolver.CodegenWitnessesForTyparInst() in FSharp.Compiler, FSharp.Compiler.Service.dll
🔴 FSharpExprConvert.GetWitnessArgs() in FSharp.Compiler.Symbols, FSharp.Compiler.Service.dll
◻ FSharpExprConvert.ConvModuleValueOrMemberUseLinear() in FSharp.Compiler.Symbols, FSharp.Compiler.Service.dll
◻ [email protected]() in FSharp.Compiler.Symbols, FSharp.Compiler.Service.dll
◻ FSharpExpr.get_E() in FSharp.Compiler.Symbols, FSharp.Compiler.Service.dll
◻ FSharpExpr.get_ImmediateSubExpressions() in FSharp.Compiler.Symbols, FSharp.Compiler.Service.dll
◻ [email protected]() in CompilerDirectives, FSharp.Compiler.ComponentTests.dll [2]
◻ [email protected]() in CompilerDirectives, FSharp.Compiler.ComponentTests.dll [1]
◻ Line.demo of [email protected]() in CompilerDirectives, FSharp.Compiler.ComponentTests.dll
Checklist
I believe release notes aren't necessary for this change, since it's purely a bugfix. I don't seem to be able to add labels, though?