Skip to content

Commit

Permalink
Merge pull request #3 from T-Gro/feature/activity-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
safesparrow committed Oct 10, 2022
2 parents 80459f9 + 50fd7b5 commit 4e23ca3
Show file tree
Hide file tree
Showing 266 changed files with 6,344 additions and 5,300 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "5.0.0-beta-005",
"version": "5.0.3",
"commands": [
"fantomas"
]
Expand Down
81 changes: 73 additions & 8 deletions .fantomasignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,79 @@ artifacts/

# Explicitly unformatted implementation files

src/Compiler/Checking/**/*.fs
src/Compiler/DependencyManager/**/*.fs
src/Compiler/Facilities/**/*.fs
src/Compiler/Interactive/**/*.fs
src/Compiler/Legacy/**/*.fs
src/Compiler/Optimize/**/*.fs
src/Compiler/Symbols/**/*.fs
src/Compiler/TypedTree/**/*.fs
src/Compiler/Checking/AccessibilityLogic.fs
src/Compiler/Checking/AttributeChecking.fs
src/Compiler/Checking/AugmentWithHashCompare.fs
src/Compiler/Checking/CheckBasics.fs
src/Compiler/Checking/CheckComputationExpressions.fs
src/Compiler/Checking/CheckDeclarations.fs
src/Compiler/Checking/CheckExpressions.fs
src/Compiler/Checking/CheckFormatStrings.fs
src/Compiler/Checking/CheckIncrementalClasses.fs
src/Compiler/Checking/CheckPatterns.fs
src/Compiler/Checking/ConstraintSolver.fs
src/Compiler/Checking/FindUnsolved.fs
src/Compiler/Checking/import.fs
src/Compiler/Checking/InfoReader.fs
src/Compiler/Checking/infos.fs
src/Compiler/Checking/MethodCalls.fs
src/Compiler/Checking/MethodOverrides.fs
src/Compiler/Checking/NameResolution.fs
src/Compiler/Checking/NicePrint.fs
src/Compiler/Checking/PatternMatchCompilation.fs
src/Compiler/Checking/PostInferenceChecks.fs
src/Compiler/Checking/QuotationTranslator.fs
src/Compiler/Checking/SignatureConformance.fs
src/Compiler/Checking/TypeHierarchy.fs
src/Compiler/Checking/TypeRelations.fs

src/Compiler/DependencyManager/AssemblyResolveHandler.fs
src/Compiler/DependencyManager/DependencyProvider.fs
src/Compiler/DependencyManager/NativeDllResolveHandler.fs

src/Compiler/Facilities/BuildGraph.fs
src/Compiler/Facilities/CompilerLocation.fs
src/Compiler/Facilities/DiagnosticOptions.fs
src/Compiler/Facilities/DiagnosticResolutionHints.fs
src/Compiler/Facilities/DiagnosticsLogger.fs
src/Compiler/Facilities/LanguageFeatures.fs
src/Compiler/Facilities/Logger.fs
src/Compiler/Facilities/prim-lexing.fs
src/Compiler/Facilities/prim-parsing.fs
src/Compiler/Facilities/ReferenceResolver.fs
src/Compiler/Facilities/SimulatedMSBuildReferenceResolver.fs
src/Compiler/Facilities/TextLayoutRender.fs

src/Compiler/Interactive/ControlledExecution.fs
src/Compiler/Interactive/fsi.fs

src/Compiler/Legacy/LegacyHostedCompilerForTesting.fs
src/Compiler/Legacy/LegacyMSBuildReferenceResolver.fs

src/Compiler/Optimize/DetupleArgs.fs
src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs
src/Compiler/Optimize/LowerCalls.fs
src/Compiler/Optimize/LowerComputedCollections.fs
src/Compiler/Optimize/LowerLocalMutables.fs
src/Compiler/Optimize/LowerSequences.fs
src/Compiler/Optimize/LowerStateMachines.fs
src/Compiler/Optimize/Optimizer.fs

src/Compiler/Symbols/Exprs.fs
src/Compiler/Symbols/FSharpDiagnostic.fs
src/Compiler/Symbols/SymbolHelpers.fs
src/Compiler/Symbols/SymbolPatterns.fs
src/Compiler/Symbols/Symbols.fs

src/Compiler/TypedTree/CompilerGlobalState.fs
src/Compiler/TypedTree/QuotationPickler.fs
src/Compiler/TypedTree/tainted.fs
src/Compiler/TypedTree/TcGlobals.fs
src/Compiler/TypedTree/TypedTree.fs
src/Compiler/TypedTree/TypedTreeBasics.fs
src/Compiler/TypedTree/TypedTreeOps.fs
src/Compiler/TypedTree/TypedTreePickle.fs
src/Compiler/TypedTree/TypeProviders.fs

# Explicitly unformatted file that needs more care to get it to format well

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve F#
title: ''
labels: Bug
labels: [Bug, Needs-Triage]
assignees: ''

---
Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: F# Discussions
url: https://github.com/dotnet/fsharp/discussions
about: Please ask and answer questions here.
- name: F# Language Suggestions
url: https://github.com/fsharp/fslang-suggestions
about: Language features discussions here.
- name: F# Language Design
url: https://github.com/fsharp/fslang-design
about: Language design RFCs here.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for the F# tools or compiler
title: ''
labels: Feature Request
labels: [Feature Request, Needs-Triage]
assignees: ''

---
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/other_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other issue
about: Open an issue which does not belong to any categories above
title: ''
labels: [Needs-Triage]
assignees: ''

---
<!-- Please, provide a clear and concise description of what the problem is below: -->

31 changes: 31 additions & 0 deletions .github/workflows/add_to_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Add all issues to F# project

on:
issues:
types:
- opened
- transferred

jobs:
cleanup_old_runs:
runs-on: ubuntu-20.04
permissions:
actions: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete old workflow runs
run: |
_UrlPath="/repos/$GITHUB_REPOSITORY/actions/workflows"
_CurrentWorkflowID="$(gh api -X GET "$_UrlPath" | jq '.workflows[] | select(.name == '\""$GITHUB_WORKFLOW"\"') | .id')"
gh api -X GET "$_UrlPath/$_CurrentWorkflowID/runs" --paginate \
| jq '.workflow_runs[] | select(.status == "completed") | .id' \
| xargs -I{} gh api -X DELETE "/repos/$GITHUB_REPOSITORY/actions/runs"/{}
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/orgs/dotnet/projects/126/
github-token: ${{ secrets.GITHUB_TOKEN }}
83 changes: 83 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Backport PR to branch
on:
issue_comment:
types: [created]
schedule:
# once a day at 13:00 UTC
- cron: '0 13 * * *'

permissions:
contents: write
issues: write
pull-requests: write

jobs:
cleanup_old_runs:
if: github.event.schedule == '0 13 * * *'
runs-on: ubuntu-20.04
permissions:
actions: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete old workflow runs
run: |
_UrlPath="/repos/$GITHUB_REPOSITORY/actions/workflows"
_CurrentWorkflowID="$(gh api -X GET "$_UrlPath" | jq '.workflows[] | select(.name == '\""$GITHUB_WORKFLOW"\"') | .id')"
# delete workitems which are 'completed'. (other candidate values of status field are: 'queued' and 'in_progress')
gh api -X GET "$_UrlPath/$_CurrentWorkflowID/runs" --paginate \
| jq '.workflow_runs[] | select(.status == "completed") | .id' \
| xargs -I{} gh api -X DELETE "/repos/$GITHUB_REPOSITORY/actions/runs"/{}
backport:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to')
runs-on: ubuntu-20.04
steps:
- name: Extract backport target branch
uses: actions/github-script@v3
id: target-branch-extractor
with:
result-encoding: string
script: |
if (context.eventName !== "issue_comment") throw "Error: This action only works on issue_comment events.";
// extract the target branch name from the trigger phrase containing these characters: a-z, A-Z, digits, forward slash, dot, hyphen, underscore
const regex = /^\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
target_branch = regex.exec(context.payload.comment.body);
if (target_branch == null) throw "Error: No backport branch found in the trigger phrase.";
return target_branch[1];
- name: Post backport started comment to pull request
uses: actions/github-script@v3
with:
script: |
const backport_start_body = `Started backporting to ${{ steps.target-branch-extractor.outputs.result }}: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
await github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: backport_start_body
});
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run backport
uses: ./eng/actions/backport
with:
target_branch: ${{ steps.target-branch-extractor.outputs.result }}
auth_token: ${{ secrets.GITHUB_TOKEN }}
pr_description_template: |
Backport of #%source_pr_number% to %target_branch%
/cc %cc_users%
## Customer Impact
## Testing
## Risk
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.
8 changes: 4 additions & 4 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ This will update your fork with the latest from `dotnet/fsharp` on your machine

## Developing on Windows

Install the latest released [Visual Studio](https://www.visualstudio.com/downloads/), as that is what the `main` branch's tools are synced with. Select the following workloads:
Install the latest released [Visual Studio](https://visualstudio.microsoft.com/vs/preview/) preview, as that is what the `main` branch's tools are synced with. Select the following workloads:

* .NET desktop development (also check F# desktop support, as this will install some legacy templates)
* Visual Studio extension development

You will also need the latest .NET 6 SDK installed from [here](https://dotnet.microsoft.com/download/dotnet/6.0).
You will also need the latest .NET 7 SDK installed from [here](https://dotnet.microsoft.com/download/dotnet/7.0).

Building is simple:

Expand All @@ -73,10 +73,10 @@ If you don't have everything installed yet, you'll get prompted by Visual Studio

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

We recommend installing the latest released Visual Studio and using that if you are on Windows. However, if you prefer not to do that, you will need to install the following:
We recommend installing the latest Visual Studio preview and using that if you are on Windows. However, if you prefer not to do that, you will need to install the following:

* [.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)
* [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0)
* [.NET 7](https://dotnet.microsoft.com/download/dotnet/7.0)

You'll need to pass an additional flag to the build script:

Expand Down
9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
<Import Project="FSharpBuild.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' == '' "/>
<Import Project="FSharpTests.Directory.Build.props" Condition = " '$(FSharpTestCompilerVersion)' != '' "/>

<!--
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.
-->
<PropertyGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">
<FSHARPCORE_USE_PACKAGE Condition="'$(SolutionName)' == 'FSharp.Compiler.Service'">true</FSHARPCORE_USE_PACKAGE>
</PropertyGroup>

<ItemGroup>
<!-- If there is a README.md next to a project file, include it (for easier access in the IDE) -->
<None Include="README.md" Condition="Exists('README.md')" />
Expand Down
1 change: 1 addition & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<WarningsAsErrors>1182;0025;$(WarningsAsErrors)</WarningsAsErrors>
<OtherFlags>$(OtherFlags) --nowarn:3384</OtherFlags>
<OtherFlags>$(OtherFlags) --times --nowarn:75</OtherFlags>
<OtherFlags Condition="$(ParallelCheckingWithSignatureFilesOn) == 'true'">$(OtherFlags) --test:ParallelCheckingWithSignatureFilesOn</OtherFlags>
</PropertyGroup>

<!-- nuget -->
Expand Down
11 changes: 11 additions & 0 deletions INTERNAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ Update the `insertTargetBranch` value at the bottom of `azure-pipelines.yml` in
7. Note, the help in the `darc` tool is really good. E.g., you can simply run `darc` to see a list of all commands available, and if you run `darc <some-command>` with no arguments, you'll be given a list of arguments you can use.
8. Ensure that version numbers are bumped for a new branch.

## Labeling issues on GitHub

Assign appropriate `Area-*` label to bugs, feature improvements and feature requests issues alike. List of `Area` labels with descriptions can be found [here](https://github.com/dotnet/fsharp/labels?q=Area). These areas are laid out to follow the logical organization of the code.

To find all existing open issues without assigned `Area` label, use [this query](https://github.com/dotnet/fsharp/issues?q=is%3Aissue+is%3Aopen+-label%3AArea-AOT+-label%3AArea-Async+-label%3AArea-Build+-label%3AArea-Compiler+-label%3AArea-Compiler-Checking+-label%3AArea-Compiler-CodeGen+-label%3AArea-Compiler-HashCompare+-label%3AArea-Compiler-ImportAndInterop+-label%3AArea-Compiler-Optimization+-label%3AArea-Compiler-Options+-label%3AArea-Compiler-PatternMatching+-label%3AArea-Compiler-Service+-label%3AArea-Compiler-SigFileGen+-label%3AArea-Compiler-SRTP+-label%3AArea-Compiler-StateMachines+-label%3AArea-Compiler-Syntax+-label%3AArea-ComputationExpressions+-label%3AArea-Debug+-label%3AArea-DependencyManager+-label%3AArea-Diagnostics+-label%3AArea-FCS+-label%3AArea-FSC+-label%3AArea-FSI+-label%3AArea-Infrastructure+-label%3AArea-LangService-API+-label%3AArea-LangService-AutoComplete+-label%3AArea-LangService-BlockStructure+-label%3AArea-LangService-CodeLens+-label%3AArea-LangService-Colorization+-label%3AArea-LangService-Diagnostics+-label%3AArea-LangService-FindAllReferences+-label%3AArea-LangService-Navigation+-label%3AArea-LangService-QuickFixes+-label%3AArea-LangService-RenameSymbol+-label%3AArea-LangService-ToolTips+-label%3AArea-LangService-UnusedDeclarations+-label%3AArea-LangService-UnusedOpens+-label%3AArea-Library+-label%3AArea-ProjectsAndBuild+-label%3AArea-Queries+-label%3AArea-Quotations+-label%3AArea-SetupAndDelivery+-label%3AArea-Testing+-label%3AArea-TypeProviders+-label%3AArea-UoM+-label%3AArea-VS+-label%3AArea-VS-Editor+-label%3AArea-VS-FSI+-label%3AArea-XmlDocs)

Since github issue filtering is currently not flexible enough, that query was generated by pasting output of this PowerShell command to the search box (might need to be rerun if new kinds of `Area` labels are added):
```ps1
Invoke-WebRequest -Uri "https://api.github.com/repos/dotnet/fsharp/labels?per_page=100" | ConvertFrom-Json | % { $_.name } | ? { $_.StartsWith("Area-") } | % { Write-Host -NoNewLine ('-label:"' + $_ + '" ') }
```

## Less interesting links

[FSharp.Core (Official NuGet Release)](https://dev.azure.com/dnceng/internal/_release?_a=releases&definitionId=72).
Expand Down
4 changes: 3 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
<add key="dotnet7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json" />
<add key="dotnet7-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="vssdk" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# The F# compiler, F# core library, and F# editor tools
[![Build Status](https://dev.azure.com/dnceng-public/public/_apis/build/status/dotnet/fsharp/fsharp-ci?branchName=main)](https://dev.azure.com/dnceng-public/public/_build/latest?definitionId=90&branchName=main)
[![Help Wanted](https://img.shields.io/github/issues/dotnet/fsharp/help%20wanted?style=flat-square&color=%232EA043&label=help%20wanted)](https://github.com/dotnet/runtime/labels/help%20wanted)


You're invited to contribute to future releases of the F# compiler, core library, and tools. Development of this repository can be done on any OS supported by [.NET](https://dotnet.microsoft.com/).

You will also need the latest .NET 6 SDK installed from [here](https://dotnet.microsoft.com/download/dotnet/6.0).
You will also need the latest .NET 7 SDK installed from [here](https://dotnet.microsoft.com/download/dotnet/7.0).

## Contributing

Expand Down Expand Up @@ -54,12 +57,6 @@ After it's finished, open `FSharp.sln` in your editor of choice.

Even if you find a single-character typo, we're happy to take the change! Although the codebase can feel daunting for beginners, we and other contributors are happy to help you along.

## Build Status

| Branch | Status |
|:------:|:------:|
|main|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/fsharp/fsharp-ci?branchName=main)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=496&branchName=main)|

## Per-build NuGet packages

Per-build [versions](https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-tools&view=versions&package=FSharp.Compiler.Service&protocolType=NuGet) of our NuGet packages are available via this URL: `https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json`
Expand Down
30 changes: 30 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,36 @@ stages:
# filePath: eng\tests\UpToDate.ps1
# arguments: -configuration $(_BuildConfig) -ci -binaryLog

# Run Build with --test:ParallelCheckingWithSignatureFilesOn
- job: ParallelCheckingWithSignatureFiles
condition: eq(variables['Build.Reason'], 'PullRequest')
variables:
- name: _SignType
value: Test
pool:
name: NetCore-Public
demands: ImageOverride -equals $(WindowsMachineQueueName)
timeoutInMinutes: 90
steps:
- checkout: self
clean: true
- task: UseDotNet@2
displayName: install SDK
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: false
workingDirectory: $(Build.SourcesDirectory)
installationPath: $(Build.SourcesDirectory)/.dotnet
- script: .\build.cmd -c Release -binaryLog /p:ParallelCheckingWithSignatureFilesOn=true
displayName: ParallelCheckingWithSignatureFiles build with Debug configuration
- task: PublishPipelineArtifact@1
displayName: Publish ParallelCheckingWithSignatureFiles Logs
inputs:
targetPath: '$(Build.SourcesDirectory)/artifacts/log/Release'
artifactName: 'ParallelCheckingWithSignatureFiles Attempt $(System.JobAttempt) Logs'
continueOnError: true

# Plain build Windows
- job: Plain_Build_Windows
pool:
Expand Down

0 comments on commit 4e23ca3

Please sign in to comment.