Граф коммитов

26 Коммитов

Автор SHA1 Сообщение Дата
Vlad Zarytovskii aea757f2cb
Update to .NET 9 rc1 (#17698)
* Update to .NET 9 rc1

* Update to .NET 9 rc1

* Remove some leftovers

* Workaround for msbuild 17.11 issue + realsig off

* Trimming tests

* Trimming tests

* revert realsig
2024-09-12 23:06:55 +02:00
Vlad Zarytovskii bc40f6aaaa
Update to .NET9p7 SDK (#17537)
* Update to .NET9p7 SDK

* Add dotnet9 feed

* Update trimming

* update trimming #2
2024-08-22 16:41:20 +02:00
Josh Soref 23e91e1322 Spelling 2024-08-21 17:05:53 +02:00
Vlad Zarytovskii 08f8476b05
Default to .NET9 (#17426) 2024-07-23 12:40:03 +02:00
Don Syme b73be1584c
[RFC FS-1060] Nullness checking (#15181)
* squash

* squash

* move adhoc tests and clean errors

* fix up constraint solving and adhoc testing

* remove tests

* fantomas

* skip fails

* fix tests

* fix up test baselines for change in order in checking

* update tests

* don't overwrite baselines

* fix some test failures

* skip warnings

* skip warnings

* fix warning logic

* fix tests

* fix sizes

* fix build

* fantomas and validation update

* corrections to self-use

* [WIP] [RFC FS-1060] Nullness checking (applied to codebase) (#15265)

* enablement

* enablement

* fix build

* fix build

* fantomas

* selective adoption

* Revert "[WIP] [RFC FS-1060] Nullness checking (applied to codebase) (#15265)" (#15309)

This reverts commit 559c058144.

* Fixes

* Feature/nullness - parsing of constraints (#15753)

* Feature/nullness - parsing of constraints for:
'T: not null ....  syntax in Type argument specification
appType | NULL ...  for specifying types

* applying changed syntax

* positive.fs updated

* positive.fs paranthesis

* fixing "parse warning Remove spaces between the type name and type parameter, e.g. "C<'T>", not "C <'T>". Type parameters must be placed directly adjacent to the type name."

* positive .bsl updated

* Please mighty fantomas

* Feature nullness metadata export (#15981)

* fix merge mistake

* fix build

* fantomas

* bsl fix

* il tests update

* fix test

* tests fixed

* fantomas

* fix tests

* trim test

* trimming test

* trim check

* now?

* IL tests

* il tests

* trim test

* trim

* one more time

* Merge main to feature/nullness (#16366)

* Fixes #16359 - correctly handle imports with 0 length public key tokens (#16363)

* Parser: recover on unfinished record decls, fix field ranges (#16357)

* Parser: recover on unfinished record decls, fix field ranges

* Fantomas

* Better diagnostic ranges for fields

* More parser tests

* Update surface area

* Fix xml doc test

* Update baselines

* Update src/Compiler/SyntaxTree/SyntaxTree.fsi

Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>

* Add MutableKeyword to SynFieldTrivia. (#11)

* Simplify

* Fantomas

---------

Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>

---------

Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com>
Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* syntax tree layout

* Nullness-related aggressive trimming of FSharp.Core (#16387)

* Merge main to feature/nullness (#16397)

* [main] Update dependencies from dnceng/internal/dotnet-optimization (#16150)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231019.5

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23519.5

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231019.5

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23519.5

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231021.3

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23521.3

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20231021.3

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime
 From Version 1.0.0-prerelease.23515.2 -> To Version 1.0.0-prerelease.23521.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* [main] Update dependencies from dotnet/arcade (#16241)

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231106.5

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23556.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231114.4

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23564.4

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/arcade build 20231130.1

Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.23463.1 -> To Version 8.0.0-beta.23580.1

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23426.1 -> To Version 1.0.0-beta.23475.1 (parent: Microsoft.DotNet.Arcade.Sdk

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* Name resolution: don't search extension members in type abbreviations (#16390)

* Name resolution: don't search extension members in type abbreviations

* Add test

* Revert "[main] Update dependencies from dotnet/arcade (#16241)" (#16396)

This reverts commit f219a99059.

* trimmed size updated

---------

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com>

* Nullness interop - import of C#-emitted metadata (#16423)

* Nullness - include in QuickInfo and in general in "typeEnc" (string representation of a type) (#16555)

* failing test

* todo for IL import

* explanation added

* il meta parsing

* flags evaluation

* you shall passs

* evaluateFirstOrderNullnessAndAdvance

* import il type with nullness

* type import

* IL nullness import

fields, props, events, method args, method return types - nullness imported from IL

* test rename

* fantomas

* get stack trace on error

* split ilmethod's type

* fix crashes for Csharp style extensions

* solve coexistance of nullness and Is* properties of DUs

* updating tests

* clean tests

* fantomas

* fantomas one more time

* importing nullness for generic typars

* print failing ivals, let's see

* write even more!

* isolated failing test - combo of module rec, signature file, IVT

* another attempt

* format

* test

* hide tests

* Remove 'specialname' for DU case tester

* format

* warning as error

* update baseline netcore

* nullable errors not in desktop framework

* surface area, trimming

* surface area

* cosmetic cleanup & annotations

* Rename to ILMethParentTypeInfo

* making vMapFold tail recursive

* physical nullnessEquiv

* format

* Commenting SkipNullness usages

* Nullness work - activity module

* Remove strict generic 'T:null' import

* Null|NonNull pattern also for regular compilation

* Backported Null|NonNull active pattern

* one more time

* revert

* Show nullness in quickinfo and in general in type representations

* Merge main to feature/nullness (#16539)

Merge of main + syntax conflict resolution + semantic conflict resolution

* release notes

* Fix ILType.Array import (#16585)

* Nullness - reading+writing metadata for  'inherits' and interface implementations (#16597)

* ILGenerator test case

* Nullness :: Format string %s should allow nullable string (#16656)

* Nullness::  Unchecked.nonNull for FSharp.Core (#16654)

* Nullness :: Pattern matching with null should mark input for subsequent clauses as without null + support for matching nulls in tuples (#16659)

* Feature nullness - support overrides of nullness annotation in the imported object hierarchy (#16711)

* Improve type inference w.r.t. nullness in printing (#16681)

* Update tests/AheadOfTime/Trimming/check.ps1

* Fix merge errors

* il tests reflecting visibility change

* Nullness feature :: New warning for functions insisting on a (WithNull) argument + typar equality fix (#16853)

Null-handling functions now have the option to raise a warning when they are called with a known-to-be-withoutNull argument.
That way, API authors (incl. Fsharp.Core) can help with cleaning code from superflous null checks.

While doing it, a strange error kept coming when using Option.ofObj and other functions with a (T | null) typar.
It turned out that nullness info had been striped from nullable typars on stripTyparEqnsAux calls in some occasions, leading to treating all typars as 'KnownWithoutNull' even when that was not true.

* Feature nullness - propper guards against ` | null ` on unsupported types (#16907)

TODOs resolved:
* mkAppTy resolved
* mkFunTyWithNullness
* delayed checks of post-infered values for nullness-carrying capabilities

* Feature nullness :: warn also for 'obj' type (since it can be infered for null literal) (#16962)

* Nullness feature :: various bugfixes (#17080)

* Bugfix - matching aliased nullable should strip nullness

Eliminating nullness after pattern matching null (that is , for subsequent patterns) must visit contents of abbreviations as well. Otherwise it does not work with the Maybe<T> type whcih we use in the compiler.

* Making 'obj' work with new 'not null' constraints in fslib functions

Bugfix: obj cannot be passed to generic typars which require T: not null, such as the NonNull active pattern.

This commit fixes it.

* Bugfix - false 'useless null' warning in nested applications

Error fixed:
Error on useless null checkwith nullness constraint propagation in code like this:let meTry = Option.ofObj (Path.GetDirectoryName "")`. The warning about 'useless Option.ofObj' points to the string literal, ignoring the string literal is first passed to an API which may return null

* Fix import for C# extension methods

Bugfix for:
C# extension methods which put "?" on the this argument are wrongly interpreted by moving the nullability elsewhere. See AsMemory<T> from System.Memory.dll , this treats byteArray.ToMemory() as resulting in a Memory<byte | null> which is clearly wrong.

Also, this now allows to call C# extension methods with ?this to be invoked on a nullable value.

* LinkedList First,Last bugfix

There was a bug of LinkedList .First and .Last properties not returning nullable nodes.
This was fixed by improved byte import in previous commit, adding a regression test for guarding this.


* Bugfix: Solve nullness for typars

This fixes a bug where `not null` generic constraint was incorrectly passed between two typars:`T1 | null` with not null constraint on T1, and T2 without constraints.

This occured when calling Option.ofObj(..) when the inner expression caused solving of generic type arguments, e.g. after (|>) or (id) function.

This uses additional inference variable to unify them.

* updating IL tests

* One more try

* surface area

* trimmed size

* trimmed size

* fix issues for plain 'dotnet build Fsharp.Compiler.Service.sln`

* update FSharpCoreShippedPackageVersionValue

* Wkraround attributetargets issue by using 'obj'. This removes 3x box and adds 1x unbox.

* Feature nullness :: Bugfixes (#17102)

* Ignore Nullness applied on structs (C# allows T? when when T is a struct)
* Bigfix: Working with CLI events in Fsharp
* Bugfix: Mutable binding initially assigned to null should not need type annotation
* Solving `let mutable cache = null` via type inference
* Enforcing TyparConstraint.IsReferenceType when WithNull type is used
* Nullness-related constraint consistency
* Bugfix for emitting Nullable attrs for C#

* Automated command ran: fantomas

  Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com>

* Feature nullness ::  Try infer without null even when function/method arg is marked as nullable (#17269)

* Feature nullness :: apply nullness annotations to usages of 'obj' in Fsharp.Core (#17284)

* resolve build error from auto-merge

* Feature nullness :: Cleanups, Test reorg, fix incrementalbuild cache behavior (#17309)


* Fix TransparentCompiler - it should report PostInference errors if it only encountered a warning (reported as an error due to confiig)

* fix build issues

* resolve semantic merge error

* Nullness subsumption when used for contravariant typars

* fix nullness plain build (#17404)

* Update docs/release-notes/.FSharp.Compiler.Service/8.0.300.md

* Update release notes

* Update check.ps1

* Update check.ps1

---------

Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org>
Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com>
Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: psfinaki <psfinaki@users.noreply.github.com>
2024-07-17 21:30:43 +02:00
Brian Rourke Boll 3125875f3b
C# collection expression support for F# lists & sets (#17359) 2024-07-16 11:31:42 +02:00
Vlad Zarytovskii 53273d1b85
Revert "Fix AOT (#17238)" (#17264)
This reverts commit 7e59327502.
2024-05-29 17:50:22 +02:00
Kevin Ransom (msft) 7e59327502
Fix AOT (#17238) 2024-05-28 18:21:50 +00:00
Kevin Ransom (msft) 9d053591bb
Fix inlining (#17168) 2024-05-20 19:13:36 +00:00
Kevin Ransom (msft) 0115c93d59
The Ahead of time tests are not correctly propagating the failure. (#17132) 2024-05-14 11:53:04 +02:00
Petr 9877cfec82
Faster equality in generic contexts (#16615) 2024-03-04 20:01:52 +01:00
Kevin Ransom (msft) 68a7dae360
Real accessibility (#15484)
* merge

* remove unused binding

* temp

* temp

* temp

* temp

* temp

* temp

* fantomas

* temp

* temp

* quotes

* temp

* realsig build and test

* tuples, staticint tests

* SerializableAttribute tests

* SeqExpressionStepping

* AsyncExpressionStepping

* misc

* AttributeTargets

* CCtorDUWithMember ListExpressionStepping

* temp

* cleanup

* fantomas

* temp

* temp

* temp

* Automated command ran: fantomas

  Co-authored-by: KevinRansom <5175830+KevinRansom@users.noreply.github.com>

* Some cleanup

* clean

* fantoms

* temp

* merge issues

* fantomas

* temp

* Update src/Compiler/TypedTree/TypedTreeBasics.fs

Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* Update src/Compiler/Optimize/Optimizer.fs

Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* inline

* Fix plain build.

* Update changelog

* Fixed release notes

* feedback

* remove surplus realsigs

* Update src/Compiler/TypedTree/TypedTree.fsi

Co-authored-by: Petr Pokorny <petr@innit.cz>

* Update tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs

Co-authored-by: Petr Pokorny <petr@innit.cz>

* baselines

* baselines

* baselines

* build.sh

* restore quotes

* moar quotes

* mutable police

* fantomas

* t

* Update baselines

* Shadowing/LinqCount.fsx baseline

* Shadowing lingcount

* access.fsx

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Petr Pokorny <petr@innit.cz>
2024-03-01 04:01:34 +00:00
Adam Boniecki 2de1f6892f
Lower interpolation into a call to concat (#16556)
* Add unit tests for interp strings with string expr

Sanity check that lowering to concat does not break these simple cases

* Add IL test for lowering to concat

* Add optimization in CheckExpressions

Initial attempt with many TODOs, also not sure whether it should be done
in checking, but it seems that later we would have to again parse the
string (since CheckExpressions is going from AST version of an
interpolated string to a sprintf call basically)

* Do not optimize when format specifiers are there

Cannot really optimize this way if width and other flags are specified.
Typed interpolated expressions should be possible to support, but
skipping them for now (TODO).

* Adjust expected length of codegen

* Filter out empty string parts

E.g. $"{x}{y}" has 5 string parts, including 3 empty strings

* Detect format specifiers better

There were false positives before

* Refactor, improve regex

* Unrelated indentation fix in parser

* Use language feature flag

* FSComp.txt auto-update

* Add release notes

* Add langversion flag to some unit tests

* Fix typo in src/Compiler/FSComp.txt

Co-authored-by: Petr <psfinaki@users.noreply.github.com>

* Update .xlf and undo change to CheckFormatStrings

* Add a test, undo change in CheckFormatString

* Refactor based on review suggestions

* Add more IL tests

* Add comments lost in refactoring

* Automated command ran: fantomas

  Co-authored-by: psfinaki <5451366+psfinaki@users.noreply.github.com>

---------

Co-authored-by: Adam Boniecki <abonie@users.noreply.github.com>
Co-authored-by: Petr <psfinaki@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-22 16:49:21 +00:00
Viktor Hofer 119a2eb678
Remove unnecessary DotNetBuildOffline switches (#16489) 2024-01-08 10:21:58 +01:00
Tuomas Hietanen 1c4245cccf
Less RegEx construction on recursive method (#16351)
* Less  RegEx construction on recursive method

* mandatory Fantomas commit

* moved regexes to a static value

* Expected growth in size exactly 2x 256
2023-12-05 14:10:57 +01:00
Tuomas Hietanen 2a25184293
Some performance optimizations and code cleanup (#16302)
* code optimisations and cleanup:

Some ContainsKey double lookups to TryContainsKey
Some nested list Contains to set Contains.
Some FSharpLint rules
also "dotnet fantomas . -r" but I bet it'll make merging harder.

* Made FSharp.Core.dll expectation tighter. It would be nice to get both SelfContained_Trimming_Test and StaticLinkedFSharpCore_Trimming_Test the results once.

* As expected, StaticLinkedFSharpCore_Trimming_Test smaller too...

* vzarytovskii feedback implemented

* Reverted Sets to Lists due to speculation of memory consumption in the PR comments

Will open this as separate PR
2023-11-22 20:22:47 +01:00
Vlad Zarytovskii 73e4e5ece0
Merge branch 'release/dev17.8' into merges/main-to-release/dev17.8 2023-09-14 14:23:39 +02:00
Vlad Zarytovskii e6a5c75d83
Use .NET8 rc1 (#15968) 2023-09-14 11:37:52 +02:00
dotnet-maestro[bot] 7966421cd1
[release/dev17.7] Update dependencies from dotnet/arcade (#15459) 2023-06-27 18:29:41 +02:00
Vlad Zarytovskii 3085440f1d
Fix trimming test for p5 2023-06-20 18:24:27 +02:00
Vlad Zarytovskii 0242e6439d
Trimming size adjustments 2023-06-06 14:54:14 +02:00
Kevin Ransom (msft) 487c230d73
Merge branch 'release/net8' into merges/main-to-release/net8 2023-06-02 09:42:15 -07:00
Kevin Ransom (msft) 289ab1c532
Fix package build (#15264) 2023-06-02 16:37:39 +02:00
Vlad Zarytovskii d66a79f098
Move to net8 tfm (#15245)
Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
2023-05-24 00:37:53 +02:00
Kevin Ransom (msft) 663f350d96
Aot for static linked fsharpcore test and fix duplicated embedded types issue. (#15168)
* Add aot

* tests

* Add component test

* logfile

* improve filter

* feedback
2023-05-17 14:23:41 -07:00
Kevin Ransom (msft) 2de4545883
Move trim tests to separate test\AheadOfTime location (#15165)
* Move trim tests to separate AheadOfTime location and widen trim test to net472 and net7.0

* trimming doesn't work for tfm net472
2023-05-02 13:55:32 +02:00