Skip to content

Commit 459162b

Browse files
author
dotnet-automerge-bot
authored
Merge pull request #7084 from dotnet/merges/master-to-release/dev16.3
Merge master to release/dev16.3
2 parents 7ee0b8c + 5a8f454 commit 459162b

123 files changed

Lines changed: 1136 additions & 1116 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,4 @@ tests/fsharpqa/testenv/bin/System.ValueTuple.dll
126126
msbuild.binlog
127127
/fcs/FSharp.Compiler.Service.netstandard/*.fs
128128
/fcs/FSharp.Compiler.Service.netstandard/*.fsi
129+
/.ionide/

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
4040

4141
## Attribution
4242

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
4444

45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
45+
[homepage]: https://contributor-covenant.org
46+
[version]: https://contributor-covenant.org/version/1/4/

DEVGUIDE.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Get the latest source code from the master branch by running this git command:
66

77
git clone https://github.com/dotnet/fsharp.git
8-
8+
99
Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command:
1010

1111
git clean -xfd
@@ -52,6 +52,10 @@ After you build the first time you can open and use this solution:
5252

5353
If you are just developing the core compiler and library then building ``FSharp.sln`` will be enough.
5454

55+
If you do not have Visual Studio installed and want to simply build the compiler as a .NET Core application, use this:
56+
57+
Build.cmd -noVisualStudio
58+
5559
### Developing the F# Compiler (Linux/macOS)
5660

5761
For Linux/Mac:
@@ -104,9 +108,9 @@ Or hard crash on launch ("Unknown Error"), delete these folders:
104108

105109
The new builds of the Visual F# IDE Tools can no longer be installed into Visual Studio 2015.
106110

107-
You can install Visual Studio 2019 from https://www.visualstudio.com/downloads/.
111+
You can install Visual Studio 2019 from <https://www.visualstudio.com/downloads/>.
108112

109-
**Note:** This step will install a VSIX extension into Visual Studio "Next" that changes the Visual F# IDE Tools
113+
**Note:** This step will install a VSIX extension into Visual Studio "Next" that changes the Visual F# IDE Tools
110114
components installed in that VS installation. You can revert this step by disabling or uninstalling the addin.
111115

112116
For **Debug**, uninstall then reinstall:
@@ -157,25 +161,25 @@ See the "Debugging The Compiler" section of this [article](https://medium.com/@w
157161

158162
## Notes
159163

160-
#### Windows: Links to Additional frameworks
164+
### Windows: Links to Additional frameworks
161165

162-
- [Git for windows](http://msysgit.github.io/)
163-
- [.NET 4.6](http://www.microsoft.com/en-us/download/details.aspx?id=48137)
164-
- [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx)
166+
- [Git for windows](https://gitforwindows.org/)
167+
- [.NET 4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48137)
168+
- [Windows 8.1 SDK](https://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx)
165169
- [Windows 10 SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)
166170

167-
#### Notes on the Windows .NET Framework build
171+
### Notes on the Windows .NET Framework build
168172

169173
1. The `update.cmd` script adds required strong name validation skips and NGens the compiler and libraries. This requires admin privileges.
170174
1. The compiler binaries produced are "private" and strong-named signed with a test key.
171175
1. Some additional tools are required to build the compiler, notably `fslex.exe`, `fsyacc.exe`, `FSharp.PowerPack.Build.Tasks.dll`, `FsSrGen.exe`, `FSharp.SRGen.Build.Tasks.dll`, and the other tools found in the `lkg` directory.
172176
1. The overall bootstrapping process executes as follows
173-
- We first need an existing F# compiler. We use the one in the `lkg` directory. Let's assume this compiler has an `FSharp.Core.dll` with version X.
174-
- We use this compiler to compile the source in this distribution, to produce a "proto" compiler, dropped to the `proto` directory. When run, this compiler still relies on `FSharp.Core.dll` with version X.
175-
- We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution.
176-
- We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution.
177+
- We first need an existing F# compiler. We use the one in the `lkg` directory. Let's assume this compiler has an `FSharp.Core.dll` with version X.
178+
- We use this compiler to compile the source in this distribution, to produce a "proto" compiler, dropped to the `proto` directory. When run, this compiler still relies on `FSharp.Core.dll` with version X.
179+
- We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution.
180+
- We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution.
177181

178-
#### Updating FSComp.fs, FSComp.resx and XLF
182+
### Updating FSComp.fs, FSComp.resx and XLF
179183

180184
If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running
181185

@@ -185,7 +189,7 @@ If your changes involve modifying the list of language keywords in any way, (e.g
185189

186190
This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually.
187191

188-
#### Configuring proxy server
192+
### Configuring proxy server
189193

190194
If you are behind a proxy server, NuGet client tool must be configured to use it:
191195

@@ -195,6 +199,6 @@ If you are behind a proxy server, NuGet client tool must be configured to use it
195199

196200
Where you should set proper proxy address, user name and password.
197201

198-
#### Resources
202+
### Resources
199203

200-
The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.
204+
The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](https://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ These are the branches in use:
6565

6666
* `dev15.9`
6767
- Long-term servicing branch for VS 2017 update 15.9.x. We do not expect to service that release, but if we do, that's where the changes will go.
68-
68+
6969
* `dev16.x`
7070
- Latest release branch for the particular point release of Visual Studio.
7171
- Incorporates features and fixes from master up to a particular branch point, then selective cherry-picks.
@@ -84,28 +84,28 @@ Evolution of the F# language and core library follows a process spanning two add
8484

8585
The following links can help you get an overview of some technical aspects of the F# language and compiler:
8686

87-
* [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html)
88-
* [The F# Language Specification](http://fsharp.org/specs/language-spec/)
87+
* [The F# Compiler Technical Guide](https://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html)
88+
* [The F# Language Specification](https://fsharp.org/specs/language-spec/)
8989

9090
## License
9191

9292
This project is subject to the MIT License. A copy of this license is in [License.txt](License.txt).
9393

9494
## Code of Conduct
9595

96-
This project has adopted the [Contributor Covenant](http://contributor-covenant.org/) code of conduct to clarify expected behavior in our community. You can read it at [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md).
96+
This project has adopted the [Contributor Covenant](https://contributor-covenant.org/) code of conduct to clarify expected behavior in our community. You can read it at [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md).
9797

9898
## Get In Touch
9999

100-
Members of the [F# Software Foundation](http://fsharp.org) are invited to the [FSSF Slack](http://fsharp.org/guides/slack/). You can find support from other contributors in the `#compiler` and `#editor-support` channels.
100+
Members of the [F# Software Foundation](https://fsharp.org) are invited to the [FSSF Slack](https://fsharp.org/guides/slack/). You can find support from other contributors in the `#compiler` and `#editor-support` channels.
101101

102102
Additionally, you can use the `#fsharp` tag on Twitter if you have general F# questions, including about this repository. Chances are you'll get multiple responses.
103103

104-
## About F#
104+
## About F\#
105105

106106
If you're curious about F# itself, check out these links:
107107

108108
* [What is F#](https://docs.microsoft.com/dotnet/fsharp/what-is-fsharp)
109109
* [Get started with F#](https://docs.microsoft.com/dotnet/fsharp/get-started/)
110-
* [F# Software Foundation](http://fsharp.org)
111-
* [F# Testimonials](http://fsharp.org/testimonials)
110+
* [F# Software Foundation](https://fsharp.org)
111+
* [F# Testimonials](https://fsharp.org/testimonials)

eng/Build.ps1

Lines changed: 60 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ param (
5353
[switch]$testVs,
5454
[switch]$testAll,
5555
[string]$officialSkipTests = "false",
56+
[switch]$noVisualStudio,
5657

5758
[parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
5859

@@ -96,6 +97,7 @@ function Print-Usage() {
9697
Write-Host " -procdump Monitor test runs with procdump"
9798
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
9899
Write-Host " -useGlobalNuGetCache Use global NuGet cache."
100+
Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported."
99101
Write-Host ""
100102
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
101103
}
@@ -145,8 +147,19 @@ function Process-Arguments() {
145147
}
146148

147149
function Update-Arguments() {
148-
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.exe")) {
149-
$script:bootstrap = $True
150+
if ($script:noVisualStudio) {
151+
$script:bootstrapTfm = "netcoreapp2.1"
152+
$script:msbuildEngine = "dotnet"
153+
}
154+
155+
if ($bootstrapTfm -eq "netcoreapp2.1") {
156+
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
157+
$script:bootstrap = $True
158+
}
159+
} else {
160+
if (-Not (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.exe") -or (Test-Path "$ArtifactsDir\Bootstrap\fsc\fsc.runtimeconfig.json")) {
161+
$script:bootstrap = $True
162+
}
150163
}
151164
}
152165

@@ -227,10 +240,37 @@ function TestUsingNUnit([string] $testProject, [string] $targetFramework) {
227240
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
228241
$testLogPath = "$ArtifactsDir\TestResults\$configuration\${projectName}_$targetFramework.xml"
229242
$testBinLogPath = "$LogDir\${projectName}_$targetFramework.binlog"
230-
$args = "test $testProject --no-restore --no-build -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
243+
$args = "test $testProject -c $configuration -f $targetFramework -v n --test-adapter-path . --logger ""nunit;LogFilePath=$testLogPath"" /bl:$testBinLogPath"
244+
245+
if (-not $noVisualStudio -or $norestore) {
246+
$args += " --no-restore"
247+
}
248+
249+
if (-not $noVisualStudio) {
250+
$args += " --no-build"
251+
}
252+
231253
Exec-Console $dotnetExe $args
232254
}
233255

256+
function BuildCompiler() {
257+
if ($bootstrapTfm -eq "netcoreapp2.1") {
258+
$dotnetPath = InitializeDotNetCli
259+
$dotnetExe = Join-Path $dotnetPath "dotnet.exe"
260+
$fscProject = "$RepoRoot\src\fsharp\fsc\fsc.fsproj"
261+
$fsiProject = "$RepoRoot\src\fsharp\fsi\fsi.fsproj"
262+
263+
$argNoRestore = if ($norestore) { " --no-restore" } else { "" }
264+
$argNoIncremental = if ($rebuild) { " --no-incremental" } else { "" }
265+
266+
$args = "build $fscProject -c $configuration -v $verbosity -f netcoreapp2.1" + $argNoRestore + $argNoIncremental
267+
Exec-Console $dotnetExe $args
268+
269+
$args = "build $fsiProject -c $configuration -v $verbosity -f netcoreapp2.1" + $argNoRestore + $argNoIncremental
270+
Exec-Console $dotnetExe $args
271+
}
272+
}
273+
234274
function Prepare-TempDir() {
235275
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.props") $TempDir
236276
Copy-Item (Join-Path $RepoRoot "tests\Resources\Directory.Build.targets") $TempDir
@@ -259,7 +299,11 @@ try {
259299
}
260300

261301
if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
262-
BuildSolution
302+
if ($noVisualStudio) {
303+
BuildCompiler
304+
} else {
305+
BuildSolution
306+
}
263307
}
264308

265309
if ($build) {
@@ -269,7 +313,7 @@ try {
269313
$desktopTargetFramework = "net472"
270314
$coreclrTargetFramework = "netcoreapp2.1"
271315

272-
if ($testDesktop) {
316+
if ($testDesktop -and -not $noVisualStudio) {
273317
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
274318
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.LanguageServer.UnitTests\FSharp.Compiler.LanguageServer.UnitTests.fsproj" -targetFramework $desktopTargetFramework
275319
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework
@@ -285,7 +329,7 @@ try {
285329
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
286330
}
287331

288-
if ($testFSharpQA) {
332+
if ($testFSharpQA -and -not $noVisualStudio) {
289333
Push-Location "$RepoRoot\tests\fsharpqa\source"
290334
$resultsRoot = "$ArtifactsDir\TestResults\$configuration"
291335
$resultsLog = "test-net40-fsharpqa-results.log"
@@ -304,21 +348,27 @@ try {
304348
}
305349

306350
if ($testFSharpCore) {
307-
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
351+
if (-not $noVisualStudio) {
352+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework
353+
}
308354
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
309355
}
310356

311357
if ($testCompiler) {
312-
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
358+
if (-not $noVisualStudio) {
359+
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework
360+
}
313361
TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework
314362
}
315363

316364
if ($testCambridge) {
317-
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
365+
if (-not $noVisualStudio) {
366+
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $desktopTargetFramework
367+
}
318368
TestUsingNUnit -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $coreclrTargetFramework
319369
}
320370

321-
if ($testVs) {
371+
if ($testVs -and -not $noVisualStudio) {
322372
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\GetTypesVS.UnitTests\GetTypesVS.UnitTests.fsproj" -targetFramework $desktopTargetFramework
323373
TestUsingNUnit -testProject "$RepoRoot\vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj" -targetFramework $desktopTargetFramework
324374
}

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19320.1">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19323.4">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>b21c24996a73aa62b7a1ee69f546b9d2eb084f29</Sha>
8+
<Sha>9946534da4f73e6242ca105f6798ab58119c9ab0</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/build-utils.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]
230230
# Important to not set $script:bootstrapDir here yet as we're actually in the process of
231231
# building the bootstrap.
232232
function Make-BootstrapBuild() {
233-
Write-Host "Building bootstrap compiler"
233+
Write-Host "Building bootstrap '$bootstrapTfm' compiler"
234234

235235
$dir = Join-Path $ArtifactsDir "Bootstrap"
236236
Remove-Item -re $dir -ErrorAction SilentlyContinue
@@ -243,7 +243,7 @@ function Make-BootstrapBuild() {
243243

244244
# prepare compiler
245245
$projectPath = "$RepoRoot\proto.proj"
246-
Run-MSBuild $projectPath "/restore /t:Publish" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
246+
Run-MSBuild $projectPath "/restore /t:Publish /p:TargetFramework=$bootstrapTfm;ProtoTargetFramework=$bootstrapTfm" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
247247
Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsc" -Force -Recurse
248248
Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\publish" -Destination "$dir\fsi" -Force -Recurse
249249

eng/common/cross/build-rootfs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ if [[ "$__LinuxCodeName" == "alpine" ]]; then
203203
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
204204
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
205205
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
206+
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
206207
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
207208
add $__AlpinePackages
208209
rm -r $__ApkToolsDir

0 commit comments

Comments
 (0)