Skip to content

Commit

Permalink
Merge main to lsp (#16798)
Browse files Browse the repository at this point in the history
* 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>

* Fix range start of INTERP_STRING_PART (#16785)

* use the same mechanism we used to fix the range start of INTERP_STRING_END to also fix the range start of INTERP_STRING_PART

* - use a new rule for '"}" +' to catch the correct range start
- clean up work around structures introduced before and not needed anymore with this

* Revert "- use a new rule for '"}" +' to catch the correct range start"

This reverts commit 4d01cda.

* add second PR to changelog

* remove commented poc code

* Enforce union case declarations AttributeTargets (#16764)

* Enforce union-cases AttributeTargets

* release notes

* LanguageFeature.EnforceAttributeTargetsUnionCaseDeclarations

* release notes

* format code

* improve naming

* Update src/Compiler/Checking/CheckExpressions.fs

Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com>

* Fix merge conflict

---------

Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com>

* Don't consider parse warnings as errors in ComputeTcIntermediate (#16792)

* Fix seqexpression testcases (#16795)

* correct realsignature test cases for seqexpr tests

* rename typo

---------

Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
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>
Co-authored-by: dawe <dawedawe@posteo.de>
Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com>
Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
  • Loading branch information
10 people authored Mar 4, 2024
1 parent 9f532bd commit f88b1a3
Show file tree
Hide file tree
Showing 670 changed files with 190,371 additions and 9,097 deletions.
14 changes: 14 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<FSharpNetCoreProductDefaultTargetFramework>net8.0</FSharpNetCoreProductDefaultTargetFramework>
</PropertyGroup>

<!--
When developers load the FSharp.Compiler.Service solution we set FSHARPCORE_USE_PACKAGE to true if it hasn't already been set to a value.
This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local FSharp.Core project.
Expand All @@ -20,6 +21,19 @@
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>

<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'true'">
<!--
When shipping Build fsharp.compiler.service dll using realsig visibility
When testing we have a test pass built using old style visibility to improve
testing coverage.
Don't use it explicitly when building with plain .NET (without Proto or Arcade).
-->
<OtherFlags Condition="'$(Configuration)' != 'Proto' and '$(TestingLegacyInternalSignature)' != 'true'">$(OtherFlags) --realsig-</OtherFlags>
<OtherFlags Condition="'$(Configuration)' != 'Proto' and '$(TestingLegacyInternalSignature)' == 'true'">$(OtherFlags) --realsig+</OtherFlags>

</PropertyGroup>

<Import Project="$(RepoRoot)/Directory.Build.props.user" Condition="Exists('$(RepoRoot)/Directory.Build.props.user')" />

Expand Down
2 changes: 1 addition & 1 deletion FSharp.Compiler.Service.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=mtype/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mubinds/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=munge/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mustinline/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=shouldinline/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mutables/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mval/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mvid/@EntryIndexedValue">True</s:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<!-- use this to enable good debugging in the Proto bootstrap compiler -->
<!-- You'll have to remove it to get the actual compiler bo build because optimization is needed for some large methods -->
<!--
<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<Tailcalls>true</Tailcalls>
Expand Down
56 changes: 56 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,62 @@ stages:
ArtifactType: Container
parallel: true

- job: WindowsNoRealsig_testCoreclr
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true

- script: eng\CIBuild.cmd -compressallmetadata -norealsig -testCoreclr -configuration Release
env:
NativeToolsOnMachine: true
displayName: Build

- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true

- job: WindowsNoRealsig_testDesktop
pool:
# The PR build definition sets this variable:
# WindowsMachineQueueName=Windows.vs2022.amd64.open
# and there is an alternate build definition that sets this to a queue that is always scouting the
# next preview of Visual Studio.
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 120
steps:
- checkout: self
clean: true

- script: eng\CIBuild.cmd -compressallmetadata -norealsig -testDesktop -configuration Release
env:
NativeToolsOnMachine: true
displayName: Build

- task: PublishBuildArtifacts@1
displayName: Publish Build BinLog
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
ArtifactName: 'Windows Release build binlogs'
ArtifactType: Container
parallel: true

- job: WindowsStrictIndentation
pool:
# The PR build definition sets this variable:
Expand Down
4 changes: 3 additions & 1 deletion docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Fixed

* Fix wrong range start of INTERP_STRING_END. ([PR #16774](https://github.com/dotnet/fsharp/pull/16774))
* Fix wrong range start of INTERP_STRING_END. ([PR #16774](https://github.com/dotnet/fsharp/pull/16774), [PR #16785](https://github.com/dotnet/fsharp/pull/16785))
* Fix missing warning for recursive calls in list comprehensions. ([PR #16652](https://github.com/dotnet/fsharp/pull/16652))
* Code generated files with > 64K methods and generated symbols crash when loaded. Use infered sequence points for debugging. ([Issue #16399](https://github.com/dotnet/fsharp/issues/16399), [#PR 16514](https://github.com/dotnet/fsharp/pull/16514))
* `nameof Module` expressions and patterns are processed to link files in `--test:GraphBasedChecking`. ([PR #16550](https://github.com/dotnet/fsharp/pull/16550), [PR #16743](https://github.com/dotnet/fsharp/pull/16743))
Expand All @@ -14,13 +14,15 @@
* Allow calling method with both Optional and ParamArray. ([#PR 16688](https://github.com/dotnet/fsharp/pull/16688), [suggestions #1120](https://github.com/fsharp/fslang-suggestions/issues/1120))
* Fix release inline optimization, which leads to MethodAccessException if used with `assembly:InternalsVisibleTo`` attribute. ([Issue #16105](https://github.com/dotnet/fsharp/issues/16105), ([PR #16737](https://github.com/dotnet/fsharp/pull/16737))
* Enforce AttributeTargets on let values and functions. ([PR #16692](https://github.com/dotnet/fsharp/pull/16692))
* Enforce AttributeTargets on union case declarations. ([PR #16764](https://github.com/dotnet/fsharp/pull/16764))

### Added

* The stackguard depth for ILPdbWriter.unshadowScopes can be modified via the environment variable `FSHARP_ILPdb_UnshadowScopes_StackGuardDepth`([PR #16583](https://github.com/dotnet/fsharp/pull/16583))
* Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425))
* Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456))
* Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462))
* Add switch to generate types and members with IL visibility that accurately represents their F# visibility. ([PR #15484](https://github.com/dotnet/fsharp/pull/15484)
* Allow returning bool instead of unit option for partial active patterns. ([Language suggestion #1041](https://github.com/fsharp/fslang-suggestions/issues/1041), [PR #16473](https://github.com/dotnet/fsharp/pull/16473))
* Symbols: Add GenericArguments to FSharpEntity ([PR #16470](https://github.com/dotnet/fsharp/pull/16470))

Expand Down
7 changes: 5 additions & 2 deletions docs/release-notes/.FSharp.Core/8.0.300.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Fixed
### Added

* Minor tweaks to inline specifications to support Visibility PR ([PR #15484](https://github.com/dotnet/fsharp/pull/15484), [#PR 16427](https://github.com/dotnet/fsharp/pull/15484)

* Preserve original stack traces in resumable state machines generated code if available. ([PR #16568](https://github.com/dotnet/fsharp/pull/16568))
### Fixed
* Preserve original stack traces in resumable state machines generated code if available. ([PR #16568](https://github.com/dotnet/fsharp/pull/16568))
1 change: 1 addition & 0 deletions docs/release-notes/.Language/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

* Allow extension methods without type attribute work for types from imported assemblies. ([PR #16368](https://github.com/dotnet/fsharp/pull/16368))
* Enforce AttributeTargets on let values and functions. ([PR #16692](https://github.com/dotnet/fsharp/pull/16692))
* Enforce AttributeTargets on union case declarations. ([PR #16764](https://github.com/dotnet/fsharp/pull/16764))

### Changed

Expand Down
11 changes: 10 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ param (
[switch]$sourceBuild,
[switch]$skipBuild,
[switch]$compressAllMetadata,
[switch]$norealsig,
[switch]$verifypackageshipstatus = $false,
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)

Expand Down Expand Up @@ -131,7 +132,8 @@ function Print-Usage() {
Write-Host " -sourceBuild Simulate building for source-build."
Write-Host " -skipbuild Skip building product"
Write-Host " -compressAllMetadata Build product with compressed metadata"
Write-Host " -verifypackageshipstatus Verify whether the packages we are building have already shipped to nuget"
Write-Host " -norealsig Build product with realsig- (default use realsig+)"
Write-Host " -verifypackageshipstatus Verify whether the packages we are building have already shipped to nuget"
Write-Host ""
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
}
Expand Down Expand Up @@ -210,6 +212,12 @@ function Process-Arguments() {
$script:compressAllMetadata = $True;
}

if ($norealsig) {
$script:realsig = $False;
}
else {
$script:realsig = $True;
}
if ($verifypackageshipstatus) {
$script:verifypackageshipstatus = $True;
}
Expand Down Expand Up @@ -288,6 +296,7 @@ function BuildSolution([string] $solutionName, $nopack) {
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:DotNetBuildFromSource=$sourceBuild `
/p:CompressAllMetadata=$CompressAllMetadata `
/p:TestingLegacyInternalSignature=$realsig `
/v:$verbosity `
$suppressExtensionDeployment `
@properties
Expand Down
6 changes: 6 additions & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ usage()
echo " --skipBuild Do not run the build"
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
echo " --sourceBuild Simulate building for source-build"
echo " --norealsig Build product with realsig- (default use realsig+)"
echo " --tfm Override the default target framework"
echo ""
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
Expand Down Expand Up @@ -68,6 +69,7 @@ skip_analyzers=false
skip_build=false
prepare_machine=false
source_build=false
realsig=true
properties=""

docker=false
Expand Down Expand Up @@ -152,6 +154,9 @@ while [[ $# > 0 ]]; do
--sourcebuild)
source_build=true
;;
--norealsig)
realsig=false
;;
--tfm)
tfm=$2
shift
Expand Down Expand Up @@ -308,6 +313,7 @@ function BuildSolution {
/p:QuietRestore=$quiet_restore \
/p:QuietRestoreBinaryLog="$binary_log" \
/p:ArcadeBuildFromSource=$source_build \
/p:TestingLegacyInternalSignature=$realsig \
$properties
fi
}
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckComputationExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ let TcComputationExpression (cenv: cenv) env (overallTy: OverallTy) tpenv (mWhol
addVarsToVarSpace varSpace (fun mQueryOp env ->
// Normalize the bindings before detecting the bound variables
match (List.map (BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env) binds) with
| [ NormalizedBinding(kind = SynBindingKind.Normal; mustInline = false; isMutable = false; pat = pat) ] ->
| [ NormalizedBinding(kind = SynBindingKind.Normal; shouldInline = false; isMutable = false; pat = pat) ] ->
// successful case
use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink

Expand Down
Loading

0 comments on commit f88b1a3

Please sign in to comment.