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

[RFC FS-1060] Nullness checking (applied to codebase) #15310

Merged
merged 303 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
303 commits
Select commit Hold shift + click to select a range
ef15719
fantomas
T-Gro Nov 29, 2023
f230a6f
fix tests
T-Gro Nov 30, 2023
7ea37af
Merge branch 'main' into feature/nullness
T-Gro Nov 30, 2023
97a9c31
trim test
T-Gro Dec 1, 2023
51044a7
trimming test
T-Gro Dec 1, 2023
7182913
trim check
T-Gro Dec 1, 2023
26de6fe
now?
T-Gro Dec 1, 2023
8f48a32
IL tests
T-Gro Dec 4, 2023
3f763a5
il tests
T-Gro Dec 4, 2023
cbfe777
trim test
T-Gro Dec 4, 2023
5e296b9
trim
T-Gro Dec 4, 2023
dec61d6
one more time
T-Gro Dec 4, 2023
91429b4
Merge main to feature/nullness (#16366)
dotnet-bot Dec 4, 2023
3f55d8d
Merge branch 'main' into feature/nullness
T-Gro Dec 4, 2023
73d670d
syntax tree layout
T-Gro Dec 4, 2023
4a19eb4
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Dec 5, 2023
4ef4815
Merge pull request #16383 from dotnet/merges/main-to-feature/nullness
T-Gro Dec 5, 2023
80efaa2
Nullness-related aggressive trimming of FSharp.Core (#16387)
T-Gro Dec 5, 2023
fe42158
Merge branch 'main' into feature/nullness
T-Gro Dec 5, 2023
3de7178
Merge branch 'main' into feature/nullness
T-Gro Dec 5, 2023
bf45dee
Merge main to feature/nullness (#16397)
dotnet-bot Dec 8, 2023
ed7854b
Merge branch 'main' into feature/nullness
T-Gro Dec 8, 2023
2bca3d8
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 15, 2024
d697c63
Nullness interop - import of C#-emitted metadata (#16423)
T-Gro Jan 17, 2024
00a591c
Nullness - include in QuickInfo and in general in "typeEnc" (string r…
T-Gro Jan 23, 2024
38532af
Merge main to feature/nullness (#16539)
dotnet-bot Jan 24, 2024
ba6b0f2
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 24, 2024
c022d5a
applying nullness to the codebase, part 1
T-Gro Jan 24, 2024
9caf7bc
Adjusting codebase
T-Gro Jan 25, 2024
10aa5a2
DelayInitArrayMap nullness
T-Gro Jan 25, 2024
e7f4f1f
conflicts resolved
T-Gro Jan 25, 2024
3c53e3b
release notes
T-Gro Jan 25, 2024
dfada6a
Merge branch 'main' into feature/nullness
T-Gro Jan 25, 2024
dac9c76
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 25, 2024
5b792a0
fix NO_CHECKNULLS build
T-Gro Jan 25, 2024
71e209e
Update illib.fsi
T-Gro Jan 25, 2024
3250b7e
Fix ILType.Array import (#16585)
T-Gro Jan 25, 2024
cf735db
Merge branch 'main' into feature/nullness
T-Gro Jan 25, 2024
f73a1ff
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 25, 2024
e0f1634
Nullness - reading+writing metadata for 'inherits' and interface imp…
T-Gro Jan 30, 2024
33e5e27
Merge branch 'main' into feature/nullness
T-Gro Jan 30, 2024
ca3366b
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 30, 2024
d70d1fe
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Jan 31, 2024
a2df473
Merge pull request #16620 from dotnet/merges/main-to-feature/nullness
KevinRansom Jan 31, 2024
60c4fb0
ILGenerator test case
T-Gro Jan 31, 2024
ca7e0b4
Merge branch 'feature/nullness' of https://github.com/dotnet/fsharp i…
T-Gro Jan 31, 2024
476d7ba
workaround a bug in ns20 API
T-Gro Jan 31, 2024
e3bfa71
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jan 31, 2024
29462f2
Merge pull request #16635 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 1, 2024
f30c6a0
Merge branch 'main' into feature/nullness
T-Gro Feb 1, 2024
1d86093
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 1, 2024
d1035f1
applying nullness
T-Gro Feb 5, 2024
2c29f52
Merge branch 'revert-15309-revert-15265-feature/nullness-enabled' of …
T-Gro Feb 6, 2024
5811d88
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 6, 2024
cd662eb
Merge pull request #16648 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 6, 2024
2a43e53
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 6, 2024
bca1c53
Nullness :: Format string %s should allow nullable string (#16656)
T-Gro Feb 6, 2024
836e2c9
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 7, 2024
a35c0e2
Merge pull request #16660 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 7, 2024
17f0ced
Nullness:: Unchecked.nonNull for FSharp.Core (#16654)
T-Gro Feb 7, 2024
a0cb6b4
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 7, 2024
d4dd6a8
Merge branch 'main' into feature/nullness
T-Gro Feb 8, 2024
15b9962
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 8, 2024
552ea0a
Merge branch 'main' into feature/nullness
T-Gro Feb 8, 2024
050c8a0
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 8, 2024
fc5c6c4
Merge pull request #16679 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 9, 2024
c5ecfb4
Merge branch 'main' into feature/nullness
T-Gro Feb 9, 2024
53f5e8c
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Feb 9, 2024
3775088
Merge pull request #16685 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 10, 2024
17a5ca9
Nullness :: Pattern matching with null should mark input for subseque…
T-Gro Feb 12, 2024
9bc3f81
Merge branch 'main' into feature/nullness
T-Gro Feb 12, 2024
ec2d4a8
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 13, 2024
b6b737f
Merge pull request #16694 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 13, 2024
3754c86
Merge pull request #16705 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 14, 2024
bfd8520
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Feb 16, 2024
ab8a943
Merge pull request #16722 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 16, 2024
d487006
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Feb 17, 2024
0e3f43f
Merge pull request #16727 from dotnet/merges/main-to-feature/nullness
T-Gro Feb 17, 2024
49e0d7c
Merge pull request #16728 from dotnet/merges/main-to-feature/nullness
KevinRansom Feb 20, 2024
97d9437
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
KevinRansom Feb 23, 2024
6827b1c
Feature nullness - support overrides of nullness annotation in the im…
T-Gro Mar 4, 2024
552c843
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 4, 2024
ba69485
Improve type inference w.r.t. nullness in printing (#16681)
T-Gro Mar 4, 2024
9ae3768
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
vzarytovskii Mar 4, 2024
e8f2b97
Update tests/AheadOfTime/Trimming/check.ps1
T-Gro Mar 4, 2024
1f2b43b
Merge pull request #16752 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 4, 2024
5eb9fea
Merge branch 'main' into feature/nullness
T-Gro Mar 4, 2024
055c772
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 5, 2024
654c27f
Merge pull request #16808 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 5, 2024
806c58e
Merge branch 'main' into feature/nullness
T-Gro Mar 6, 2024
743996a
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 11, 2024
171b69e
Merge branch 'main' into feature/nullness
T-Gro Mar 11, 2024
04b93e1
Fix merge errors
T-Gro Mar 11, 2024
b5b14b6
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 11, 2024
cbaffad
Merge pull request #16840 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 11, 2024
2071594
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 13, 2024
3c5605c
il tests reflecting visibility change
T-Gro Mar 18, 2024
cb696d5
Merge pull request #16866 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 18, 2024
14efaa4
Merge branch 'main' into feature/nullness
T-Gro Mar 18, 2024
72b7494
Nullness feature :: New warning for functions insisting on a (WithNul…
T-Gro Mar 19, 2024
74d1da2
Merge branch 'main' into feature/nullness
T-Gro Mar 19, 2024
ccc35ba
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Mar 21, 2024
8ff2ed1
Merge pull request #16915 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 21, 2024
5d89ba3
Merge pull request #16930 from dotnet/merges/main-to-feature/nullness
KevinRansom Mar 22, 2024
b84d754
Merge pull request #16939 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 25, 2024
7f502b7
Merge pull request #16949 from dotnet/merges/main-to-feature/nullness
T-Gro Mar 26, 2024
65c7b8b
Merge branch 'main' into feature/nullness
T-Gro Mar 26, 2024
55cd42f
Feature nullness - propper guards against ` | null ` on unsupported t…
T-Gro Mar 28, 2024
b34e568
Merge pull request #16960 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 2, 2024
8801707
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Apr 2, 2024
0be7fb4
fantomas
T-Gro Apr 3, 2024
9e4a413
Null-safe activity module
T-Gro Apr 3, 2024
a638f34
assemblyresolvehandler - reflection APIs
T-Gro Apr 3, 2024
e022636
Decorating generic not null type parameters
T-Gro Apr 3, 2024
28eb39c
Conditionally adding net8.0 tfm to get better null annotations
T-Gro Apr 3, 2024
9cf47f4
asyncmemoize,cancellable
T-Gro Apr 3, 2024
faba56d
Merge pull request #16980 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 4, 2024
a2fb9dd
Compiler location
T-Gro Apr 5, 2024
0d7068c
Option.ofString
T-Gro Apr 5, 2024
a6be10c
Merge pull request #16989 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 5, 2024
a871929
getting rid of explicit type annotations
T-Gro Apr 5, 2024
7090129
(!!) introduced, applied for `typeof<..>.FullName`
T-Gro Apr 5, 2024
25dd379
.ToString() can return null, `string` function handles this
T-Gro Apr 5, 2024
bb6ae59
e.InnerException safe handling
T-Gro Apr 5, 2024
3a1a352
compiler imports - !! on file system ops that are `NotNullIfNotNull`
T-Gro Apr 5, 2024
b8feeac
Merge pull request #16996 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 6, 2024
920cae8
compilerlocation
T-Gro Apr 8, 2024
d522550
some more
T-Gro Apr 8, 2024
4b9ff3d
nullArgCheck -> (!!) to match existing assumption
T-Gro Apr 8, 2024
dc8b9fd
dependency provider
T-Gro Apr 8, 2024
597e9d6
next batch
T-Gro Apr 8, 2024
3675157
next batch
T-Gro Apr 8, 2024
0e350af
Working around .ToString() overrides in F# side
T-Gro Apr 9, 2024
dc6dd0b
ilreflect
T-Gro Apr 9, 2024
9067ad6
Merge pull request #17007 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 10, 2024
647d797
Merge pull request #17023 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 11, 2024
387acf8
next batch, adding `defaultIfNull `
T-Gro Apr 11, 2024
bc8a27e
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 12, 2024
4b955cd
nullSafeEquality added, bunch of files reworked
T-Gro Apr 12, 2024
58f8cac
Merge pull request #17037 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 16, 2024
76d28e5
transparent compiler - apply !! to filepath ops
T-Gro Apr 16, 2024
a9f23ca
typedtree
T-Gro Apr 16, 2024
d3cf221
typeproviders,infos
T-Gro Apr 17, 2024
f25d792
infos,,ilwritepdb
T-Gro Apr 17, 2024
1f9d5e9
some more
T-Gro Apr 17, 2024
b5b3f0d
Merge pull request #17058 from dotnet/merges/main-to-feature/nullness
KevinRansom Apr 17, 2024
c1b53bc
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 18, 2024
dc0eaea
next batch, compareBy added
T-Gro Apr 18, 2024
42c6afd
Merge pull request #17065 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 18, 2024
d78f5aa
Feature nullness :: warn also for 'obj' type (since it can be infered…
T-Gro Apr 19, 2024
a2823f3
typedtreeops, IComparer and IEqualityComparer impls
T-Gro Apr 19, 2024
6f0875d
sformat
T-Gro Apr 19, 2024
a0a7d82
Merge branch 'main' into feature/nullness
T-Gro Apr 19, 2024
13e8af2
Nullness feature :: various bugfixes (#17080)
T-Gro Apr 26, 2024
3bcf33d
Merge pull request #17083 from dotnet/merges/main-to-feature/nullness
T-Gro Apr 26, 2024
71c6b58
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Apr 26, 2024
14d666e
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Apr 29, 2024
fed2bdb
Merge branch 'main' into merges/main-to-feature/nullness
T-Gro May 16, 2024
ebdeebc
updating IL tests
T-Gro May 16, 2024
f161691
One more try
T-Gro May 16, 2024
6cf326c
surface area
T-Gro May 17, 2024
e154438
Merge branch 'main' into merges/main-to-feature/nullness
T-Gro May 17, 2024
0b65db9
trimmed size
T-Gro May 17, 2024
176275f
Merge pull request #17097 from dotnet/merges/main-to-feature/nullness
T-Gro May 17, 2024
a6373c9
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro May 20, 2024
817ee1e
trimmed size
T-Gro May 20, 2024
61f5777
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 20, 2024
03e294f
Merge pull request #17175 from dotnet/merges/main-to-feature/nullness
T-Gro May 20, 2024
7da45b5
fix issues for plain 'dotnet build Fsharp.Compiler.Service.sln`
T-Gro May 20, 2024
c28b21a
update FSharpCoreShippedPackageVersionValue
T-Gro May 20, 2024
3570b2f
Wkraround attributetargets issue by using 'obj'. This removes 3x box …
T-Gro May 20, 2024
13e50b4
Merge pull request #17185 from dotnet/feature-nullness-fix-plain-builds
T-Gro May 21, 2024
3d375d2
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 21, 2024
e2e698d
Feature nullness :: Bugfixes (#17102)
T-Gro May 21, 2024
165f664
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro May 21, 2024
3603443
Merge pull request #17192 from dotnet/merges/main-to-feature/nullness
T-Gro May 21, 2024
101ae03
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 11, 2024
aa62eef
Automated command ran: fantomas
github-actions[bot] Jun 11, 2024
a72457e
Feature nullness :: Try infer without null even when function/method…
T-Gro Jun 11, 2024
d4ad891
Feature nullness :: apply nullness annotations to usages of 'obj' in …
T-Gro Jun 11, 2024
382a327
Merge pull request #17213 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 11, 2024
f9b1ccc
Merge branch 'main' into feature/nullness
T-Gro Jun 12, 2024
d84326b
resolve build error from auto-merge
T-Gro Jun 12, 2024
64033b9
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 17, 2024
d2d7bd3
Merge pull request #17304 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 17, 2024
1b29d70
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jun 17, 2024
7bde93c
Merge branch 'main' into feature/nullness
T-Gro Jun 17, 2024
5ab472e
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jun 17, 2024
679f605
Merge pull request #17320 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 18, 2024
4fbbf32
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jun 19, 2024
5488a35
Feature nullness :: Cleanups, Test reorg, fix incrementalbuild cache …
T-Gro Jun 19, 2024
091da12
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jun 19, 2024
23f9990
Got rid of errors, now only warnings remain - hopefully
T-Gro Jun 19, 2024
0bba083
Relaxing LKG definition of MaybeNull to make it work for List ( List …
T-Gro Jun 19, 2024
98458d0
applying to codebase
T-Gro Jun 22, 2024
da4cdd3
applying nullness
T-Gro Jun 24, 2024
c044f20
protobuild passing now
T-Gro Jun 24, 2024
e41ad14
Update fsc.fsproj
T-Gro Jun 24, 2024
a9e52a3
fantomas
T-Gro Jun 25, 2024
9abf120
fix build
T-Gro Jun 25, 2024
888995c
try skipping R2R
T-Gro Jun 25, 2024
0aa633f
Bootstraping for resource builds
T-Gro Jun 25, 2024
595412f
Fix plain build
T-Gro Jun 26, 2024
2cb5387
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jun 26, 2024
107ee5c
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jun 26, 2024
30b2a02
fix tests build
T-Gro Jun 26, 2024
dc92a0c
Merge pull request #17337 from dotnet/merges/main-to-feature/nullness
T-Gro Jun 26, 2024
1108c0d
fantomas
T-Gro Jun 26, 2024
0a8ee68
Moving changes off from Micosoft.FSharp.targets to local Directory bu…
T-Gro Jun 27, 2024
469899b
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro Jul 1, 2024
24f923c
Merge branch 'feature/nullness' into merges/main-to-feature/nullness
T-Gro Jul 1, 2024
c8cfda2
fix build issues
T-Gro Jul 1, 2024
653507c
Merge branch 'merges/main-to-feature/nullness' of https://github.com/…
T-Gro Jul 1, 2024
fedc901
Merge pull request #17354 from dotnet/merges/main-to-feature/nullness
T-Gro Jul 3, 2024
7ec905d
Merge branch 'main' into feature/nullness
T-Gro Jul 3, 2024
64c7e18
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jul 3, 2024
1f2e0c4
resolve semantic merge error
T-Gro Jul 3, 2024
af3f704
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jul 3, 2024
ddd666d
merge
KevinRansom Jul 9, 2024
59938f4
Merge pull request #17395 from KevinRansom/nullness
T-Gro Jul 9, 2024
a7984af
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jul 9, 2024
49bec1c
Nullness subsumption when used for contravariant typars
T-Gro Jul 9, 2024
6a65374
Merge branch 'feature/nullness' into feature-nullness-variance
T-Gro Jul 9, 2024
30c3432
fix nullness plain build (#17404)
T-Gro Jul 11, 2024
0773645
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jul 11, 2024
5f6b7da
Merge branch 'feature/nullness' into feature-nullness-variance
T-Gro Jul 11, 2024
3752733
Merge branch 'main' into feature/nullness
vzarytovskii Jul 11, 2024
57026b8
Merge pull request #17398 from dotnet/feature-nullness-variance
T-Gro Jul 11, 2024
5dcad11
Merge branch 'feature/nullness' into revert-15309-revert-15265-featur…
T-Gro Jul 11, 2024
770f98e
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jul 19, 2024
e6f93a7
fix build issues after merge conflicts
T-Gro Jul 19, 2024
3a1b9ab
Fix release notes
psfinaki Jul 23, 2024
ee10bb3
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jul 26, 2024
3e108fe
Change TargetFrameworks conditioning
T-Gro Jul 26, 2024
a72a20f
Resolving some TODOs, address fsharp.build artifacts and their nullne…
T-Gro Jul 26, 2024
48239d1
resolve TODOs in inforeader
T-Gro Jul 26, 2024
509e515
Our Range must shadow the System.Range which exists for ns2.1 and above
T-Gro Jul 26, 2024
bc6a20d
fantomas
T-Gro Jul 26, 2024
9c2e5e8
fantomas, readmes
T-Gro Jul 26, 2024
67667ce
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jul 26, 2024
1b90861
F.C.S surface tests must use ns2.0 to make sure assembly references a…
T-Gro Jul 26, 2024
0284740
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jul 29, 2024
1c08cd0
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Jul 31, 2024
3aa57a2
Skip NetCurrent on OSX CI
T-Gro Jul 31, 2024
677ce2f
Skip NetCurrent Linux as well, I think machine provisioning makes it …
T-Gro Jul 31, 2024
8717723
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Aug 12, 2024
5020a50
Re-enable PublishReadyToRun for fsc
T-Gro Aug 13, 2024
0b5cf85
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Aug 13, 2024
1efd639
put fsc.fscproj back
T-Gro Aug 13, 2024
02d9d23
Merge branch 'main' into revert-15309-revert-15265-feature/nullness-e…
T-Gro Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .fantomasignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vsintegration/*
!vsintegration/tests/FSharp.Editor.Tests
artifacts/

# For some reason, it tries to format files from remotes (Processing .\.git\refs\remotes\<remote>\FSComp.fsi)
# For some reason, it tries to format files from remotes (Processing ./.git/refs/remotes/<remote>/FSComp.fsi)
.git/

# Explicitly unformatted implementation
Expand Down Expand Up @@ -101,10 +101,22 @@ src/FSharp.Core/option.fsi
src/FSharp.Core/option.fs
src/fsi/console.fs
src/FSharp.Build/FSharpCommandLineBuilder.fs

src/Compiler/Utilities/Activity.fs
src/Compiler/Utilities/sformat.fs
src/Compiler/Utilities/illib.fsi
src/Compiler/Utilities/illib.fs


src/Compiler/Utilities/NullnessShims.fs
src/Compiler/Utilities/LruCache.fsi
src/Compiler/Utilities/LruCache.fs
src/Compiler/Utilities/HashMultiMap.fsi
src/Compiler/Utilities/HashMultiMap.fs
src/Compiler/Facilities/AsyncMemoize.fsi
src/Compiler/Facilities/AsyncMemoize.fs
src/Compiler/AbstractIL/il.fs

# Fantomas limitations on implementation files (to investigate)

src/Compiler/AbstractIL/ilwrite.fs
Expand Down
8 changes: 8 additions & 0 deletions FSharpBuild.Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
</ItemGroup>
</Target>

<!-- SDK targets override -->
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true' AND Exists('$(ProtoOutputPath)')">
<FSharpBuildAssemblyFileOverride>$(ProtoOutputPath)\fsc\FSharp.Build.dll</FSharpBuildAssemblyFileOverride>
</PropertyGroup>
<UsingTask TaskName="FSharpEmbedResourceText" AssemblyFile="$(FSharpBuildAssemblyFileOverride)" Override="true" Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true' AND Exists('$(ProtoOutputPath)')" />
<UsingTask TaskName="FSharpEmbedResXSource" AssemblyFile="$(FSharpBuildAssemblyFileOverride)" Override="true" Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true' AND Exists('$(ProtoOutputPath)')" />

psfinaki marked this conversation as resolved.
Show resolved Hide resolved

<Target Name="BeforeResGen"
Inputs="@(EmbeddedResource->'$(IntermediateOutputPath)%(Filename)%(Extension)')"
Outputs="@(EmbeddedResource->'$(IntermediateOutputPath)resources\%(Filename)%(Extension)')"
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ stages:
- checkout: self
clean: true
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
env:
SKIP_NETCURRENT_FSC_BUILD: true
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
Expand Down Expand Up @@ -517,6 +519,7 @@ stages:
- script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr
env:
COMPlus_DefaultStackSize: 1000000
SKIP_NETCURRENT_FSC_BUILD: true
displayName: Build / Test
- task: PublishTestResults@2
displayName: Publish Test Results
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Treat `{ new Foo() }` as `SynExpr.ObjExpr` ([PR #17388](https://github.com/dotnet/fsharp/pull/17388))
* Optimize metadata reading for type members and custom attributes. ([PR #17364](https://github.com/dotnet/fsharp/pull/17364))
* Enforce `AttributeTargets` on unions. ([PR #17389](https://github.com/dotnet/fsharp/pull/17389))
* Applied nullable reference types to FSharp.Compiler.Service itself ([PR #15310](https://github.com/dotnet/fsharp/pull/15310))
* Ensure that isinteractive multi-emit backing fields are not public. ([Issue #17439](https://github.com/dotnet/fsharp/issues/17438)), ([PR #17439](https://github.com/dotnet/fsharp/pull/17439))

### Breaking Changes
26 changes: 16 additions & 10 deletions src/Compiler/AbstractIL/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ let splitTypeNameRight nm =
// --------------------------------------------------------------------

/// This is used to store event, property and field maps.
type LazyOrderedMultiMap<'Key, 'Data when 'Key: equality>(keyf: 'Data -> 'Key, lazyItems: InterruptibleLazy<'Data list>) =
type LazyOrderedMultiMap<'Key, 'Data when 'Key: equality
#if !NO_CHECKNULLS
and 'Key:not null
#endif
>(keyf: 'Data -> 'Key, lazyItems: InterruptibleLazy<'Data list>) =

let quickMap =
lazyItems
Expand Down Expand Up @@ -515,7 +519,8 @@ type ILAssemblyRef(data) =

let retargetable = aname.Flags = AssemblyNameFlags.Retargetable

ILAssemblyRef.Create(aname.Name, None, publicKey, retargetable, version, locale)
let name = match aname.Name with | null -> aname.FullName | name -> name
ILAssemblyRef.Create(name, None, publicKey, retargetable, version, locale)

member aref.QualifiedName =
let b = StringBuilder(100)
Expand Down Expand Up @@ -823,7 +828,7 @@ type ILTypeRef =
member x.DebugText = x.ToString()

/// For debugging
override x.ToString() = x.FullName
override x.ToString() : string = x.FullName

and [<StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugText}")>] ILTypeSpec =
{
Expand Down Expand Up @@ -875,7 +880,7 @@ and [<StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugT
&& (x.GenericArgs = y.GenericArgs)

override x.ToString() =
x.TypeRef.ToString() + if isNil x.GenericArgs then "" else "<...>"
x.TypeRef.FullName + if isNil x.GenericArgs then "" else "<...>"

and [<RequireQualifiedAccess; StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugText}")>] ILType =
| Void
Expand Down Expand Up @@ -1017,8 +1022,9 @@ type ILMethodRef =
[<DebuggerBrowsable(DebuggerBrowsableState.Never)>]
member x.DebugText = x.ToString()

override x.ToString() =
x.DeclaringTypeRef.ToString() + "::" + x.Name + "(...)"
member x.FullName = x.DeclaringTypeRef.FullName + "::" + x.Name + "(...)"

override x.ToString() = x.FullName

[<StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugText}")>]
type ILFieldRef =
Expand All @@ -1033,7 +1039,7 @@ type ILFieldRef =
member x.DebugText = x.ToString()

override x.ToString() =
x.DeclaringTypeRef.ToString() + "::" + x.Name
x.DeclaringTypeRef.FullName + "::" + x.Name

[<StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugText}")>]
type ILMethodSpec =
Expand Down Expand Up @@ -1072,7 +1078,7 @@ type ILMethodSpec =
[<DebuggerBrowsable(DebuggerBrowsableState.Never)>]
member x.DebugText = x.ToString()

override x.ToString() = x.MethodRef.ToString() + "(...)"
override x.ToString() = x.MethodRef.FullName + "(...)"

[<StructuralEquality; StructuralComparison; StructuredFormatDisplay("{DebugText}")>]
type ILFieldSpec =
Expand Down Expand Up @@ -1213,7 +1219,7 @@ type ILAttribute =
[<DebuggerBrowsable(DebuggerBrowsableState.Never)>]
member x.DebugText = x.ToString()

override x.ToString() = x.Method.ToString() + "(...)"
override x.ToString() = x.Method.MethodRef.FullName

[<NoEquality; NoComparison; Struct>]
type ILAttributes(array: ILAttribute[]) =
Expand Down Expand Up @@ -1571,7 +1577,7 @@ type ILFieldInit =
| ILFieldInit.UInt64 u64 -> box u64
| ILFieldInit.Single ieee32 -> box ieee32
| ILFieldInit.Double ieee64 -> box ieee64
| ILFieldInit.Null -> (null :> Object)
| ILFieldInit.Null -> (null :> objnull)

// --------------------------------------------------------------------
// Native Types, for marshalling to the native C interface.
Expand Down
4 changes: 3 additions & 1 deletion src/Compiler/AbstractIL/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ type ILTypeRef =

member internal EqualsWithPrimaryScopeRef: ILScopeRef * obj -> bool

override ToString: unit -> string

interface System.IComparable

/// Type specs and types.
Expand Down Expand Up @@ -664,7 +666,7 @@ type ILFieldInit =
| Double of double
| Null

member AsObject: unit -> obj
member AsObject: unit -> objnull

[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
type internal ILNativeVariant =
Expand Down
9 changes: 7 additions & 2 deletions src/Compiler/AbstractIL/ilnativeres.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ type Directory(name, id) =
member val ID = id
member val NumberOfNamedEntries = Unchecked.defaultof<uint16> with get, set
member val NumberOfIdEntries = Unchecked.defaultof<uint16> with get, set
member val Entries = List<obj>()
member val Entries = List<objnull>()

type NativeResourceWriter() =
static member private CompareResources (left: Win32Resource) (right: Win32Resource) =
Expand Down Expand Up @@ -1149,7 +1149,12 @@ type NativeResourceWriter() =
dataWriter.WriteByte 0uy

false
| e -> failwithf "Unknown entry %s" (if isNull e then "<NULL>" else e.GetType().FullName)
| e ->
failwithf
"Unknown entry %s"
(match e with
| null -> "<NULL>"
| e -> e.GetType().FullName)

if id >= 0 then
writer.WriteInt32 id
Expand Down
1 change: 1 addition & 0 deletions src/Compiler/AbstractIL/ilpars.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
%{

#nowarn "1182" // the generated code often has unused variable "parseState"
#nowarn "3261" // the generated code would need to properly annotate nulls, e.g. changing System.Object to `obj|null`

open Internal.Utilities.Library

Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,11 @@ let mkCacheGeneric lowMem _inbase _nm (sz: int) =
fun f (idx: 'T) ->
let cache =
match cache with
| Null ->
| null ->
let v = ConcurrentDictionary<_, _>(Environment.ProcessorCount, sz)
cache <- v
v
| NonNull v -> v
| v -> v

match cache.TryGetValue idx with
| true, v ->
Expand Down
Loading
Loading