Skip to content

Commit 68a7dae

Browse files
KevinRansomgithub-actions[bot]T-Grovzarytovskii0101
authored
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 <[email protected]> * Some cleanup * clean * fantoms * temp * merge issues * fantomas * temp * Update src/Compiler/TypedTree/TypedTreeBasics.fs Co-authored-by: Tomas Grosup <[email protected]> * Update src/Compiler/Optimize/Optimizer.fs Co-authored-by: Tomas Grosup <[email protected]> * inline * Fix plain build. * Update changelog * Fixed release notes * feedback * remove surplus realsigs * Update src/Compiler/TypedTree/TypedTree.fsi Co-authored-by: Petr Pokorny <[email protected]> * Update tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputationExpressions/ComputationExpressions.fs Co-authored-by: Petr Pokorny <[email protected]> * 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 <[email protected]> Co-authored-by: Vlad Zarytovskii <[email protected]> Co-authored-by: Petr Pokorny <[email protected]>
1 parent f29ce0a commit 68a7dae

File tree

645 files changed

+185057
-9204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

645 files changed

+185057
-9204
lines changed

Directory.Build.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
77
<FSharpNetCoreProductDefaultTargetFramework>net8.0</FSharpNetCoreProductDefaultTargetFramework>
88
</PropertyGroup>
9+
910
<!--
1011
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.
1112
This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local FSharp.Core project.
@@ -20,6 +21,19 @@
2021
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
2122
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
2223
</PropertyGroup>
24+
25+
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'true'">
26+
<!--
27+
When shipping Build fsharp.compiler.service dll using realsig visibility
28+
When testing we have a test pass built using old style visibility to improve
29+
testing coverage.
30+
31+
Don't use it explicitly when building with plain .NET (without Proto or Arcade).
32+
-->
33+
<OtherFlags Condition="'$(Configuration)' != 'Proto' and '$(TestingLegacyInternalSignature)' != 'true'">$(OtherFlags) --realsig-</OtherFlags>
34+
<OtherFlags Condition="'$(Configuration)' != 'Proto' and '$(TestingLegacyInternalSignature)' == 'true'">$(OtherFlags) --realsig+</OtherFlags>
35+
36+
</PropertyGroup>
2337

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

FSharp.Compiler.Service.sln.DotSettings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
<s:Boolean x:Key="/Default/UserDictionary/Words/=mtype/@EntryIndexedValue">True</s:Boolean>
427427
<s:Boolean x:Key="/Default/UserDictionary/Words/=mubinds/@EntryIndexedValue">True</s:Boolean>
428428
<s:Boolean x:Key="/Default/UserDictionary/Words/=munge/@EntryIndexedValue">True</s:Boolean>
429-
<s:Boolean x:Key="/Default/UserDictionary/Words/=mustinline/@EntryIndexedValue">True</s:Boolean>
429+
<s:Boolean x:Key="/Default/UserDictionary/Words/=shouldinline/@EntryIndexedValue">True</s:Boolean>
430430
<s:Boolean x:Key="/Default/UserDictionary/Words/=mutables/@EntryIndexedValue">True</s:Boolean>
431431
<s:Boolean x:Key="/Default/UserDictionary/Words/=mval/@EntryIndexedValue">True</s:Boolean>
432432
<s:Boolean x:Key="/Default/UserDictionary/Words/=mvid/@EntryIndexedValue">True</s:Boolean>

FSharpBuild.Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<!-- use this to enable good debugging in the Proto bootstrap compiler -->
115115
<!-- You'll have to remove it to get the actual compiler bo build because optimization is needed for some large methods -->
116116
<!--
117-
<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
117+
<PropertyGroup Condition="'$(Configuration)' == 'Proto'">
118118
<DebugSymbols>true</DebugSymbols>
119119
<Optimize>false</Optimize>
120120
<Tailcalls>true</Tailcalls>

azure-pipelines.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,62 @@ stages:
353353
ArtifactType: Container
354354
parallel: true
355355

356+
- job: WindowsNoRealsig_testCoreclr
357+
pool:
358+
# The PR build definition sets this variable:
359+
# WindowsMachineQueueName=Windows.vs2022.amd64.open
360+
# and there is an alternate build definition that sets this to a queue that is always scouting the
361+
# next preview of Visual Studio.
362+
name: $(DncEngPublicBuildPool)
363+
demands: ImageOverride -equals $(WindowsMachineQueueName)
364+
timeoutInMinutes: 120
365+
steps:
366+
- checkout: self
367+
clean: true
368+
369+
- script: eng\CIBuild.cmd -compressallmetadata -norealsig -testCoreclr -configuration Release
370+
env:
371+
NativeToolsOnMachine: true
372+
displayName: Build
373+
374+
- task: PublishBuildArtifacts@1
375+
displayName: Publish Build BinLog
376+
condition: always()
377+
continueOnError: true
378+
inputs:
379+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
380+
ArtifactName: 'Windows Release build binlogs'
381+
ArtifactType: Container
382+
parallel: true
383+
384+
- job: WindowsNoRealsig_testDesktop
385+
pool:
386+
# The PR build definition sets this variable:
387+
# WindowsMachineQueueName=Windows.vs2022.amd64.open
388+
# and there is an alternate build definition that sets this to a queue that is always scouting the
389+
# next preview of Visual Studio.
390+
name: $(DncEngPublicBuildPool)
391+
demands: ImageOverride -equals $(WindowsMachineQueueName)
392+
timeoutInMinutes: 120
393+
steps:
394+
- checkout: self
395+
clean: true
396+
397+
- script: eng\CIBuild.cmd -compressallmetadata -norealsig -testDesktop -configuration Release
398+
env:
399+
NativeToolsOnMachine: true
400+
displayName: Build
401+
402+
- task: PublishBuildArtifacts@1
403+
displayName: Publish Build BinLog
404+
condition: always()
405+
continueOnError: true
406+
inputs:
407+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog'
408+
ArtifactName: 'Windows Release build binlogs'
409+
ArtifactType: Container
410+
parallel: true
411+
356412
- job: WindowsStrictIndentation
357413
pool:
358414
# The PR build definition sets this variable:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425))
2222
* Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456))
2323
* Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462))
24+
* 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)
2425
* 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))
2526
* Symbols: Add GenericArguments to FSharpEntity ([PR #16470](https://github.com/dotnet/fsharp/pull/16470))
2627

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
### Fixed
1+
### Added
2+
3+
* 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)
24

3-
* Preserve original stack traces in resumable state machines generated code if available. ([PR #16568](https://github.com/dotnet/fsharp/pull/16568))
5+
### Fixed
6+
* Preserve original stack traces in resumable state machines generated code if available. ([PR #16568](https://github.com/dotnet/fsharp/pull/16568))

eng/Build.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ param (
6969
[switch]$sourceBuild,
7070
[switch]$skipBuild,
7171
[switch]$compressAllMetadata,
72+
[switch]$norealsig,
7273
[switch]$verifypackageshipstatus = $false,
7374
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)
7475

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

215+
if ($norealsig) {
216+
$script:realsig = $False;
217+
}
218+
else {
219+
$script:realsig = $True;
220+
}
213221
if ($verifypackageshipstatus) {
214222
$script:verifypackageshipstatus = $True;
215223
}
@@ -288,6 +296,7 @@ function BuildSolution([string] $solutionName, $nopack) {
288296
/p:TestTargetFrameworks=$testTargetFrameworks `
289297
/p:DotNetBuildFromSource=$sourceBuild `
290298
/p:CompressAllMetadata=$CompressAllMetadata `
299+
/p:TestingLegacyInternalSignature=$realsig `
291300
/v:$verbosity `
292301
$suppressExtensionDeployment `
293302
@properties

eng/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ usage()
3434
echo " --skipBuild Do not run the build"
3535
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
3636
echo " --sourceBuild Simulate building for source-build"
37+
echo " --norealsig Build product with realsig- (default use realsig+)"
3738
echo " --tfm Override the default target framework"
3839
echo ""
3940
echo "Command line arguments starting with '/p:' are passed through to MSBuild."
@@ -68,6 +69,7 @@ skip_analyzers=false
6869
skip_build=false
6970
prepare_machine=false
7071
source_build=false
72+
realsig=true
7173
properties=""
7274

7375
docker=false
@@ -152,6 +154,9 @@ while [[ $# > 0 ]]; do
152154
--sourcebuild)
153155
source_build=true
154156
;;
157+
--norealsig)
158+
realsig=false
159+
;;
155160
--tfm)
156161
tfm=$2
157162
shift
@@ -308,6 +313,7 @@ function BuildSolution {
308313
/p:QuietRestore=$quiet_restore \
309314
/p:QuietRestoreBinaryLog="$binary_log" \
310315
/p:ArcadeBuildFromSource=$source_build \
316+
/p:TestingLegacyInternalSignature=$realsig \
311317
$properties
312318
fi
313319
}

src/Compiler/Checking/CheckComputationExpressions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ let TcComputationExpression (cenv: cenv) env (overallTy: OverallTy) tpenv (mWhol
18381838
addVarsToVarSpace varSpace (fun mQueryOp env ->
18391839
// Normalize the bindings before detecting the bound variables
18401840
match (List.map (BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env) binds) with
1841-
| [ NormalizedBinding(kind = SynBindingKind.Normal; mustInline = false; isMutable = false; pat = pat) ] ->
1841+
| [ NormalizedBinding(kind = SynBindingKind.Normal; shouldInline = false; isMutable = false; pat = pat) ] ->
18421842
// successful case
18431843
use _holder = TemporarilySuspendReportingTypecheckResultsToSink cenv.tcSink
18441844

0 commit comments

Comments
 (0)