Skip to content

Commit 4bce3d3

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fileindex-race
2 parents 09363e0 + 8c0bf14 commit 4bce3d3

36 files changed

+676
-1127
lines changed

CONTRIBUTING.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Contributing to F#
2+
3+
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
4+
5+
## General feedback and discussions?
6+
7+
Start a [discussion](https://github.com/dotnet/fsharp/discussions) on the [repository issue tracker](https://github.com/dotnet/fsharp/issues).
8+
9+
## Bugs and feature requests?
10+
11+
**IMPORTANT: If you want to report a security-related issue, please see the `Reporting security issues and bugs` section below.**
12+
13+
Before reporting a new issue, try to find an existing issue if one already exists. If it already exists, upvote (👍) it. Also, consider adding a comment with your unique scenarios and requirements related to that issue. Upvotes and clear details on the issue's impact help us prioritize the most important issues to be worked on sooner rather than later. If you can't find one, that's okay, we'd rather get a duplicate report than none.
14+
15+
If you can't find an existing issue, log a new issue in this GitHub repository.
16+
17+
## Creating Issues
18+
19+
- **DO** use a descriptive title that identifies the issue to be addressed or the requested feature. For example, when describing an issue where the compiler is not behaving as expected, write your bug title in terms of what the compiler should do rather than what it is doing – “F# compiler should report FS1234 when Xyz is used in Abcd.”
20+
- **DO** specify a detailed description of the issue or requested feature.
21+
- **DO** provide the following for bug reports
22+
- Describe the expected behavior and the actual behavior. If it is not self-evident such as in the case of a crash, provide an explanation for why the expected behavior is expected.
23+
- Provide an example with source code / projects that reproduce the issue.
24+
- Specify any relevant exception messages and stack traces.
25+
- **DO** subscribe to notifications for the created issue in case there are any follow up questions.
26+
27+
## Reporting security issues and bugs
28+
29+
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/security/ff852094.aspx).
30+
31+
## Writing Code
32+
33+
### Finding an issue to work on
34+
35+
Over the years we've seen many PRs targeting areas, which we didn't plan to expand further at the time. In many of these these cases we had to say `no` to those PRs and close them. That, obviously, is not a great outcome for us. And it's especially bad for the contributor, as they've spent a lot of effort preparing the change.
36+
To resolve this problem, we've decided to separate a bucket of issues, which would be great candidates for community members to contribute to. We mark these issues with the `help wanted` label. [help wanted](https://github.com/dotnet/fsharp/labels/help%20wanted)
37+
38+
Within that set, we have additionally marked issues that are good candidates for first-time contributors. Here: [Good first issue](https://github.com/dotnet/fsharp/labels/good%20first%20issue)
39+
40+
If you would like to make a contribution to an area not documented here, first open an issue with a description of the change you would like to make and the problem it solves so it can be discussed before a pull request is submitted.
41+
42+
### The primary customers of the F# repository are users of the dotnet SDK, Visual Studio, Rider and Ionide. At all times their experience is paramount in our mind.
43+
44+
We are very accepting of community pull requests, there are however, a set of firm considerations that we hold to when reviewing PRs and determining what to merge. These have been developed over the years to maintain the quality of the product and the experience that F# developers have when installing and upgrading the dotnet SDK and Visual Studio.
45+
46+
- Does the change fix something that needs fixing, is there an issue, does the issue indicate a real problem?
47+
- Does the change improve the readability of something that needs improvement?
48+
- Does the change add a feature that is approved for adding?
49+
- Does the code match or improve of the existing codebase?
50+
- Is the performance improvement measured and can regressions be identified?
51+
- Will our existing customers be able to without effort upgrading the **Major** release of an SDK or VS?
52+
- Will our existing customers be able to without effort upgrading the **Minor** release of an SDK or VS?
53+
- This change is not binary breaking (i.e. does not break VS, Rider or Ionide)?
54+
- Does it have adequate testing?
55+
- Do all existing tests run unmodified?
56+
57+
In general answers to the above should be **Yes**. A **No** to any of them is not disqualifying of the PR, however a no answer will need an explanation and a discussion.
58+
59+
There are additional considerations
60+
- Is the risk of accepting this change High or even Medium, these really refer to how much of the existing user or codebase is impacted. How likely do we feel we are to revert the changes later.
61+
For an acceptable PR with a high risk, we will definitely need to discuss mitigations for the risk. A decision to upgrade the SDK or VS needs to be always low risk for our customers, they have businesses to run, they don't want to have to deal with our - risky behavior. We may defer or delay risky PRs into a later release or abandon it.
62+
- Is the change as small as possible
63+
- Should it be chopped up into smaller, yet independently valuable and releasable to production, chunks
64+
- Is the cost of reviewing the change worth the improvement made by the change
65+
Again, some PR’s are too big or provide too little value to merge.
66+
67+
68+
### Resources to help you get started
69+
70+
Here are some resources to help you get started on how to contribute code or new content.
71+
72+
- [Developers Guide](https://github.com/dotnet/fsharp/blob/main/DEVGUIDE.md) to get started on building the source code on your own.
73+
- [Test Guide](https://github.com/dotnet/fsharp/blob/main/TESTGUIDE.md) how to build run and work with test cases.
74+
- [F# compiler guide](https://github.com/dotnet/fsharp/blob/main/docs/index.md)
75+
- [F# language specification](https://fsharp.org/specs/language-spec/)
76+
- [F# language design](https://github.com/fsharp/fslang-design/)
77+
- [F# language suggestions](https://github.com/fsharp/fslang-suggestions/)
78+
- [help wanted](https://github.com/dotnet/fsharp/labels/help%20wanted) where to start
79+
80+
### Submitting a pull request
81+
82+
You will need to sign a [Contributor License Agreement](https://cla.dotnetfoundation.org/) when submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to follow the instructions provided by the CLA bot when you send the pull request. This needs to only be done once for any .NET Foundation OSS project.
83+
84+
If you don't know what a pull request is read this article: <https://help.github.com/articles/using-pull-requests>. Make sure the repository can build and all tests pass. Familiarize yourself with the project workflow and our coding conventions.
85+
86+
- **DO** ensure submissions pass all Azure DevOps legs and are merge conflict free.
87+
- **DO** submit language feature requests as issues in the [F# language](https://github.com/fsharp/fslang-suggestions) repos. Please note: approved in principle does not guarantee acceptance.
88+
- **DO NOT** submit language features as PRs to this repo first, or they will likely be declined.
89+
- **DO** submit issues for other features. This facilitates discussion of a feature separately from its implementation, and increases the acceptance rates for pull requests.
90+
- **DO NOT** submit large code formatting changes without discussing with the team first.
91+
92+
### Reviewing pull requests
93+
94+
Our repository gets a high volume of pull requests and reviewing each of them is a significant time commitment. Our team priorities often force us to focus on reviewing a subset of the active pull requests at a given time.
95+
96+
### Feedback
97+
98+
Contributors will review your pull request and provide feedback.
99+
100+
## Merging pull requests
101+
102+
When your pull request has had the feedback addressed, and it has been signed off by two or more core team reviewers with commit access, and all checks are green, we will commit it.
103+
104+
## Code of conduct
105+
106+
See [CODE-OF-CONDUCT.md](./CODE-OF-CONDUCT.md)

DEVGUIDE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fs
228228

229229
### Updating ILVerify baselines
230230

231-
These control IL for the core modules of the compiler. The baselines are located in the `eng` folder and look like:
231+
These are IL baseline tests for the core assemblies of the compiler (FSharp.Core and FSharp.Compiler.Service). The baselines are located in the `tests/ILVerify` folder and look like:
232+
232233
```
233234
ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl
234235
ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl
@@ -240,7 +241,10 @@ ilverify_FSharp.Core_Release_netstandard2.0.bsl
240241
ilverify_FSharp.Core_Release_netstandard2.1.bsl
241242
```
242243

243-
If you want to update them, run the [ilverify.ps1]([url](https://github.com/dotnet/fsharp/blob/main/eng/ilverify.ps1)) script in PowerShell. The script will create `.actual` files. If the differences make sense, replace the original baselines with the actual files.
244+
If you want to update them, either
245+
246+
1. Run the [ilverify.ps1]([url](https://github.com/dotnet/fsharp/blob/main/tests/ILVerify/ilverify.ps1)) script in PowerShell. The script will create `.actual` files. If the differences make sense, replace the original baselines with the actual files.
247+
2. Set the `TEST_UPDATE_BSL` to `1` (please refer to "Updating baselines in tests" section in this file) **and** run `ilverify.ps1` - this will automatically replace baselines. After that, please carefully review the change and push it to your branch if it makes sense.
244248

245249
## Automated Source Code Formatting
246250

INTERNAL.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ their respective branches.
3838

3939
[VS 16.1](https://dev.azure.com/devdiv/DevDiv/_release?definitionId=1669&_a=releases)
4040

41-
VS 16.0 and prior were done manually
41+
VS 16.0 and prior were done manually.
4242

4343
## VS Insertions as part of the build definition
4444

@@ -64,6 +64,7 @@ it's a good idea to check the previous link for any old or stalled insertions in
6464
Update the `insertTargetBranch` value at the bottom of `azure-pipelines.yml` in the appropriate release branch. E.g., when VS 17.3 snapped and switched to ask mode, [this PR](https://github.com/dotnet/fsharp/pull/13456/files) correctly updates the insertion target so that future builds from that F# branch will get auto-inserted to VS.
6565

6666
### When VS `main` is open for insertions for preview releases of VS:
67+
6768
0. Disable auto-merges from `main` to **current** release branch, please make a change for the following file and create a pull request:
6869
https://github.com/dotnet/roslyn-tools/blob/6d7c182c46f8319d7922561e2c1586c7aadce19e/src/GitHubCreateMergePRs/config.xml#L52-L74
6970
> You should comment out the `main -> release/devXX.X` flow until step #4 is completed (`<merge from="main" to="release/dev17.13" />`)
@@ -131,6 +132,23 @@ Since github issue filtering is currently not flexible enough, that query was ge
131132
Invoke-WebRequest -Uri "https://api.github.com/repos/dotnet/fsharp/labels?per_page=100" | ConvertFrom-Json | % { $_.name } | ? { $_.StartsWith("Area-") } | % { Write-Host -NoNewLine ('-label:"' + $_ + '" ') }
132133
```
133134

134-
## Other links
135+
## Fix problems with the internal source mirror
136+
137+
The repo is [here](https://dev.azure.com/dnceng/internal/_git/dotnet-fsharp), the CI is [here](https://dnceng.visualstudio.com/internal/_build?definitionId=499).
138+
139+
If something breaks in the CI there and you want to experiment, the general workflow is the following:
140+
1. Make a branch
141+
2. Make a change
142+
3. Run the build from your branch. If needed, set the "skipTests" variable to "true" - can save time at this stage.
143+
4. Once the problem and the fix is identified, make a PR to THIS (dotnet/fsharp) repo - it will propagate to the internal mirror just afterwards.
144+
5. Delete all your work in the internal repo.
145+
146+
**DO NOT** try to push to the internal repo - this will mess up the flows. **DO NOT** create PRs to not confuse anyone.
147+
148+
You need the following permissions to do the above investigations:
149+
- "Generic contribute"
150+
- "Create branch"
151+
- "Queue builds"
152+
- "Edit queue build configuration"
135153

136-
[Internal source mirror](https://dev.azure.com/dnceng/internal/_git/dotnet-fsharp).
154+
If anything, reach out to the "First Responders" team.

azure-pipelines-PR.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ stages:
229229
env:
230230
DOTNET_DbgEnableMiniDump: 1
231231
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
232-
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
232+
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
233233
NativeToolsOnMachine: true
234234
displayName: Build
235235

@@ -247,8 +247,8 @@ stages:
247247
condition: failed()
248248
continueOnError: true
249249
inputs:
250-
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
251-
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
250+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
251+
ArtifactName: 'Windows Release WindowsLangVersionPreview process dumps'
252252
ArtifactType: Container
253253
parallel: true
254254

@@ -269,7 +269,7 @@ stages:
269269
env:
270270
DOTNET_DbgEnableMiniDump: 1
271271
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
272-
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
272+
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
273273
NativeToolsOnMachine: true
274274
displayName: Build
275275

@@ -287,8 +287,8 @@ stages:
287287
condition: failed()
288288
continueOnError: true
289289
inputs:
290-
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
291-
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
290+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
291+
ArtifactName: 'Windows Release WindowsNoRealsig_testCoreclr process dumps'
292292
ArtifactType: Container
293293
parallel: true
294294

@@ -309,7 +309,7 @@ stages:
309309
env:
310310
DOTNET_DbgEnableMiniDump: 1
311311
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
312-
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
312+
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
313313
NativeToolsOnMachine: true
314314
displayName: Build
315315

@@ -327,8 +327,8 @@ stages:
327327
condition: failed()
328328
continueOnError: true
329329
inputs:
330-
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
331-
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
330+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
331+
ArtifactName: 'Windows Release WindowsNoRealsig_testDesktop process dumps'
332332
ArtifactType: Container
333333
parallel: true
334334

@@ -349,7 +349,7 @@ stages:
349349
env:
350350
DOTNET_DbgEnableMiniDump: 1
351351
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
352-
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
352+
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
353353
NativeToolsOnMachine: true
354354
displayName: Build
355355

@@ -367,8 +367,8 @@ stages:
367367
condition: failed()
368368
continueOnError: true
369369
inputs:
370-
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
371-
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
370+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
371+
ArtifactName: 'Windows Release WindowsStrictIndentation process dumps'
372372
ArtifactType: Container
373373
parallel: true
374374

@@ -385,7 +385,7 @@ stages:
385385
env:
386386
DOTNET_DbgEnableMiniDump: 1
387387
DOTNET_DbgMiniDumpType: 3 # Triage dump, 1 for mini, 2 for Heap, 3 for triage, 4 for full. Don't use 4 unless you know what you're doing.
388-
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\$(_configuration)\$(Build.BuildId)-%e-%p-%t.dmp
388+
DOTNET_DbgMiniDumpName: $(Build.SourcesDirectory)\artifacts\log\Release\$(Build.BuildId)-%e-%p-%t.dmp
389389
NativeToolsOnMachine: true
390390
displayName: Build
391391

@@ -403,8 +403,8 @@ stages:
403403
condition: failed()
404404
continueOnError: true
405405
inputs:
406-
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
407-
ArtifactName: 'Windows $(_configuration) $(_testKind) process dumps'
406+
PathToPublish: '$(Build.SourcesDirectory)\artifacts\log\Release'
407+
ArtifactName: 'Windows Release WindowsNoStrictIndentation process dumps'
408408
ArtifactType: Container
409409
parallel: true
410410

@@ -825,6 +825,6 @@ stages:
825825
installationPath: $(Agent.ToolsDirectory)/dotnet
826826
- script: dotnet tool restore
827827
displayName: Restore dotnet tools
828-
- pwsh: .\eng\ilverify.ps1
828+
- pwsh: .\tests\ILVerify\ilverify.ps1
829829
displayName: Run ILVerify
830830
workingDirectory: $(Build.SourcesDirectory)

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
</Dependency>
4343
</ProductDependencies>
4444
<ToolsetDependencies>
45-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24462.3">
45+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24572.2">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>91b9734abbad751d575c002b30778c88d978993c</Sha>
47+
<Sha>b41381d5cd633471265e9cd72e933a7048e03062</Sha>
4848
</Dependency>
4949
<!-- Intermediate is necessary for source build. -->
50-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24462.3">
50+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24572.2">
5151
<Uri>https://github.com/dotnet/arcade</Uri>
52-
<Sha>91b9734abbad751d575c002b30778c88d978993c</Sha>
52+
<Sha>b41381d5cd633471265e9cd72e933a7048e03062</Sha>
5353
<SourceBuild RepoName="arcade" ManagedOnly="true" />
5454
</Dependency>
5555
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.24462.2">

0 commit comments

Comments
 (0)