-
Notifications
You must be signed in to change notification settings - Fork 802
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
WIP RFC FS-1092: Anonymous Type-tagged Union types #10896
Closed
Closed
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
b180af3
WIP: Set project to not error on warnings.
Swoorup 7c194dc
WIP: Implement parsing, F# erased type creation/IL generation and pre…
Swoorup 2944c4f
Testing constraint solver rules. (Still lot of fails)
Swoorup 0f5140b
[WIP] Don't subsume on typeEqui instead only test when explicitly coe…
Swoorup 53c25d3
Remove ugly methods no longer required.
Swoorup 9ee97f9
Allow downcast to a erased union one or more subtypes
Swoorup f73fbcb
Use ListSet instead for equality check in union types. Maintain sourc…
Swoorup 38fef9e
Add erased union type pickling
Swoorup 0701797
Symbols hashcode
Swoorup a331e21
Implements checks in TypeFeasiblySubsumes and WIP fix TType_erased_un…
Swoorup c8257cb
Renable warnings as errors. Logic is no longer required in Constraint…
Swoorup a558dc0
merge main
7013efc
merge feature/auto-widen
f096896
use new subsumption for erased union types
4707072
update baseline
776b5e1
add preview flag
4d1ca9c
update xlf
31b08a6
integrate branch
144e72b
Merge branch 'feature/auto-widen' into feature/erased-unions
974715d
Merge pull request #10978 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom 68562b5
Merge pull request #11001 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom 758c3a7
Merge pull request #11007 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom d97f72f
merge feature/auto-widen
ffe9c50
Merge branch 'feature/erased-unions' of https://github.com/dotnet/fsh…
4b54c25
Merge pull request #11018 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom c101db9
Merge pull request #11096 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom d3bd89b
Merge pull request #11107 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom 3095980
Merge branch 'feature/auto-widen' of https://github.com/dotnet/fsharp…
8ad28ae
Merge branch 'feature/erased-unions' of https://github.com/dotnet/fsh…
7f3370f
merge main
d539744
update baselines
12403cf
merge feature/auto-widen
1b4d2fa
merge
c1a1f47
Merge branch 'feature/auto-widen' of https://github.com/dotnet/fsharp…
6ce5e24
Merge branch 'feature/auto-widen' of https://github.com/dotnet/fsharp…
dsyme 0e2bba7
Merge branch 'main' of https://github.com/dotnet/fsharp into feature/…
390522a
Merge branch 'feature/auto-widen' into feature/erased-unions
fdb95b9
Merge branch 'feature/auto-widen' into feature/erased-unions
b5d07ef
Merge pull request #11786 from dotnet/merges/feature/auto-widen-to-fe…
brettfo 7a635f3
Merge pull request #11823 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom 4616e82
update baseline
2f6bea9
Merge branch 'feature/erased-unions' into merges/feature/auto-widen-t…
vzarytovskii c3e3dfb
Merge pull request #11840 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom b009c5d
Merge pull request #11843 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom f8752b9
merge feature/auto-widen
b688339
Merge branch 'feature/erased-unions' into merges/feature/auto-widen-t…
KevinRansom 2814b2f
Merge pull request #11884 from dotnet/merges/feature/auto-widen-to-fe…
KevinRansom bbe7982
Merge branch 'feature/auto-widen' into feature/erased-unions
vzarytovskii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates a compatibility consideration for libraries that publish erased union types. It might not be a concern, but I think it's important to be aware of:
Library1
Library2 (references Library1)
Due to this conditional, the
Bar
part ofProblematic
will be discarded, keeping onlyobj
aliased throughFoo
. But if Library1 is later updated to change the type ofFoo
, any code compiled against the updated Library1 and old Library2 will find that theProblematic
type no longer acceptsBar
s.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't that be same issue as the following:
Library1
Library2 (references Library1)
Later Library1 is updated to so that
Foo
is aliased toString
?handle
doesn't handle string. I don't know enough about how .net handles transitive dependencies in depth.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you'd definitely expect that sort of breakage with the
Foo
type. But I wouldn't expect that usingProblematic
withBar
would also be broken in that case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you would just recompile the code no in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, if you could. But it might be a dependency you don't have the source for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see, how this is different to other issues that arise out of dependency version mismatch. You'd only have the issue if you publish a package using a version and then republish it using the same version, causing the breakage.