Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main to release/dev17.5 #14043

Merged
merged 33 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0e8f267
Remove check for jagged arrays and add unit tests (#13974)
edgarfgp Sep 26, 2022
6b48ca6
Delete bug_report.yml
vzarytovskii Sep 26, 2022
5395b5d
Update bug_report.md
vzarytovskii Sep 26, 2022
9714ceb
Update feature_request.md
vzarytovskii Sep 26, 2022
8a62c6c
Create other_issue.md
vzarytovskii Sep 26, 2022
8c7c39c
Update DEVGUIDE.md
vzarytovskii Sep 26, 2022
fcbc1dd
Symbols: create constructor symbols for class constructor items (#13822)
auduchinok Sep 26, 2022
58023aa
fix go-to-definition to symbols in large files (#13987)
dsyme Sep 27, 2022
4f7f156
Parser: recover on missing items in tuple patterns (#13985)
auduchinok Sep 27, 2022
108ca7d
More descriptive error message for diagnostic 727 (#12832)
baronfel Sep 29, 2022
f306724
[main] Update dependencies from dotnet/arcade (#13992)
dotnet-maestro[bot] Sep 29, 2022
33edc2c
Fix analysis of conjunctive patterns for exhaustiveness (#13020)
dsyme Sep 29, 2022
0ec7fb2
Compiler ignores obsolete attribute for enum cases (#13997)
edgarfgp Sep 30, 2022
bc000c2
[main] Update dependencies from dotnet/arcade (#14000)
dotnet-maestro[bot] Oct 1, 2022
a5a22bc
Reflecting PR feedback for #13956 (#13989)
T-Gro Oct 3, 2022
ca85fd8
Update README.md
vzarytovskii Oct 3, 2022
c208e5c
Add SynArgPatsNamePatPairsTrivia to SynArgPats.NamePatPairs. (#14009)
nojaf Oct 3, 2022
a312dc6
Infer isreadonly from structs ("readonly struct" in C#) to avoid stru…
T-Gro Oct 3, 2022
30b3a8f
First steps towards reviving CodeLens
psfinaki Oct 4, 2022
3827140
More DU obsolete attribute tests (#13996)
edgarfgp Oct 4, 2022
eac93fe
Update dependencies from https://github.com/dotnet/arcade build 20221…
dotnet-maestro[bot] Oct 4, 2022
b68720d
Warning or error is raised when consuming IL Event with an Obsolete a…
edgarfgp Oct 4, 2022
cc4f641
Added parallelization options to VS (#14022)
0101 Oct 4, 2022
cadaf3f
Fixing some rendering issues for CodeLens
psfinaki Oct 5, 2022
d1bf297
Optimize `IntrinsicFunctions.getTypeInfo`. (#13858)
teo-tsirpanis Oct 5, 2022
2d86dbd
Add SynPat.ListCons. (#14010)
nojaf Oct 5, 2022
88e8cb3
Remove unused option from performance options dialogue (#14028)
0101 Oct 6, 2022
ffdfc71
Missing xml doc for member getset (#13841)
nojaf Oct 6, 2022
e389d77
Correct SynAttribute range (#13998)
nojaf Oct 6, 2022
23d9352
Add extern keyword to SynBindingTrivia. (#14030)
nojaf Oct 6, 2022
89e91dd
Prevent `dotnet` process spawn on compiler startup (#13969)
dsyme Oct 6, 2022
ec4f326
Removing some broken CodeLens behavior
psfinaki Oct 7, 2022
e13b346
Merge branch 'release/dev17.5' into merges/main-to-release/dev17.5
vzarytovskii Oct 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
69 changes: 0 additions & 69 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

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: -->

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
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
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22473.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.22503.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ba4d2568dd2e3e7538feeaba60215f7bcb99e89c</Sha>
<Sha>d2d39276af2db3da7816ee2dc543e120d7e5781e</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.22473.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.22503.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ba4d2568dd2e3e7538feeaba60215f7bcb99e89c</Sha>
<Sha>d2d39276af2db3da7816ee2dc543e120d7e5781e</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
7 changes: 4 additions & 3 deletions eng/common/cross/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ elif [[ "$__CodeName" == "illumos" ]]; then
--with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \
--disable-libquadmath-support --disable-shared --enable-tls
make -j "$JOBS" && make install && cd ..
BaseUrl=https://pkgsrc.joyent.com
BaseUrl=https://pkgsrc.smartos.org
if [[ "$__UseMirror" == 1 ]]; then
BaseUrl=http://pkgsrc.smartos.skylime.net
BaseUrl=https://pkgsrc.smartos.skylime.net
fi
BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All"
echo "Downloading manifest"
Expand All @@ -402,7 +402,8 @@ elif [[ "$__CodeName" == "illumos" ]]; then
read -ra array <<<"$__IllumosPackages"
for package in "${array[@]}"; do
echo "Installing '$package'"
package="$(grep ">$package-[0-9]" All | sed -En 's/.*href="(.*)\.tgz".*/\1/p')"
# find last occurrence of package in listing and extract its name
package="$(sed -En '/.*href="('"$package"'-[0-9].*).tgz".*/h;$!d;g;s//\1/p' All)"
echo "Resolved name '$package'"
wget "$BaseUrl"/"$package".tgz
ar -x "$package".tgz
Expand Down
1 change: 1 addition & 0 deletions eng/common/init-tools-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ try {
$ToolPath = Convert-Path -Path $BinPath
Write-Host "Adding $ToolName to the path ($ToolPath)..."
Write-Host "##vso[task.prependpath]$ToolPath"
$env:PATH = "$ToolPath;$env:PATH"
$InstalledTools += @{ $ToolName = $ToolDirectory.FullName }
}
}
Expand Down
2 changes: 1 addition & 1 deletion eng/common/templates/job/execute-sdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- job: Run_SDL
dependsOn: ${{ parameters.dependsOn }}
displayName: Run SDL tool
condition: eq( ${{ parameters.enable }}, 'true')
condition: and(succeededOrFailed(), eq( ${{ parameters.enable }}, 'true'))
variables:
- group: DotNet-VSTS-Bot
- name: AzDOProjectName
Expand Down
4 changes: 4 additions & 0 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ parameters:
enablePublishTestResults: false
enablePublishUsingPipelines: false
disableComponentGovernance: false
componentGovernanceIgnoreDirectories: ''
mergeTestResults: false
testRunTitle: ''
testResultsFormat: ''
Expand Down Expand Up @@ -146,6 +147,8 @@ jobs:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}:
- task: ComponentGovernanceComponentDetection@0
continueOnError: true
inputs:
ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -223,4 +226,5 @@ jobs:
parameters:
PackageVersion: ${{ parameters.packageVersion}}
BuildDropPath: ${{ parameters.buildDropPath }}
IgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

2 changes: 1 addition & 1 deletion eng/common/templates/jobs/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
defaultManagedPlatform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-latest'

# Defines the platforms on which to run build jobs. One job is created for each platform, and the
# object in this array is sent to the job template as 'platform'. If no platforms are specified,
Expand Down
4 changes: 2 additions & 2 deletions eng/common/templates/post-build/post-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ stages:
jobs:
- job:
displayName: NuGet Validation
condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
condition: and(succeededOrFailed(), eq( ${{ parameters.enableNugetValidation }}, 'true'))
pool:
# We don't use the collection uri here because it might vary (.visualstudio.com vs. dev.azure.com)
${{ if eq(variables['System.TeamProject'], 'DevDiv') }}:
Expand Down Expand Up @@ -282,4 +282,4 @@ stages:
-MaestroToken '$(MaestroApiAccessToken)'
-WaitPublishingFinish true
-ArtifactsPublishingAdditionalParameters '${{ parameters.artifactsPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
-SymbolPublishingAdditionalParameters '${{ parameters.symbolPublishingAdditionalParameters }}'
4 changes: 4 additions & 0 deletions eng/common/templates/steps/generate-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
# PackageName - The name of the package this SBOM represents.
# PackageVersion - The version of the package this SBOM represents.
# ManifestDirPath - The path of the directory where the generated manifest files will be placed
# IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector.

parameters:
PackageVersion: 7.0.0
BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
PackageName: '.NET'
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
IgnoreDirectories: ''
sbomContinueOnError: true

steps:
Expand All @@ -34,6 +36,8 @@ steps:
BuildDropPath: ${{ parameters.buildDropPath }}
PackageVersion: ${{ parameters.packageVersion }}
ManifestDirPath: ${{ parameters.manifestDirPath }}
${{ if ne(parameters.IgnoreDirectories, '') }}:
AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}'

- task: PublishPipelineArtifact@1
displayName: Publish SBOM manifest
Expand Down
6 changes: 6 additions & 0 deletions eng/common/templates/steps/source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ steps:
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
fi

runtimeOsArgs=
if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then
runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}'
fi

publishArgs=
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
publishArgs='--publish'
Expand All @@ -80,6 +85,7 @@ steps:
$internalRuntimeDownloadArgs \
$internalRestoreArgs \
$targetRidArgs \
$runtimeOsArgs \
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
/p:ArcadeBuildFromSource=true \
/p:AssetManifestFileName=$assetManifestFileName
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"perl": "5.32.1.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22473.1",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.22473.1"
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22503.1",
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.22503.1"
}
}
6 changes: 5 additions & 1 deletion src/Compiler/Checking/AttributeChecking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ let CheckEntityAttributes g (tcref: TyconRef) m =
CheckILAttributes g (isByrefLikeTyconRef g m tcref) tcref.ILTyconRawMetadata.CustomAttrs m
else
CheckFSharpAttributes g tcref.Attribs m

let CheckILEventAttributes g (tcref: TyconRef) cattrs m =
CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m

/// Check the attributes associated with a method, returning warnings and errors as data.
let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
Expand Down Expand Up @@ -507,7 +510,8 @@ let CheckUnionCaseAttributes g (x:UnionCaseRef) m =
/// Check the attributes on a record field, returning errors and warnings as data.
let CheckRecdFieldAttributes g (x:RecdFieldRef) m =
CheckEntityAttributes g x.TyconRef m ++ (fun () ->
CheckFSharpAttributes g x.PropertyAttribs m)
CheckFSharpAttributes g x.PropertyAttribs m) ++ (fun () ->
CheckFSharpAttributes g x.RecdField.FieldAttribs m)

/// Check the attributes on an F# value, returning errors and warnings as data.
let CheckValAttributes g (x:ValRef) m =
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Checking/AttributeChecking.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,5 @@ val IsSecurityAttribute:
val IsSecurityCriticalAttribute: g: TcGlobals -> Attrib -> bool

val IsAssemblyVersionAttribute: g: TcGlobals -> Attrib -> bool

val CheckILEventAttributes: g: TcGlobals -> tcref: TyconRef -> cattrs: ILAttributes -> m: range -> OperationResult<unit>
1 change: 1 addition & 0 deletions src/Compiler/Checking/CheckDeclarations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ module TcRecdUnionAndEnumDeclarations =

let TcEnumDecl cenv env parent thisTy fieldTy (SynEnumCase(attributes=Attributes synAttrs; ident= SynIdent(id,_); value=v; xmlDoc=xmldoc; range=m)) =
let attrs = TcAttributes cenv env AttributeTargets.Field synAttrs

match v with
| SynConst.Bytes _
| SynConst.UInt16s _
Expand Down
4 changes: 3 additions & 1 deletion src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9095,7 +9095,9 @@ and TcEventItemThen (cenv: cenv) overallTy env tpenv mItem mExprAndItem objDetai
let (SigOfFunctionForDelegate(delInvokeMeth, delArgTys, _, _)) = GetSigOfFunctionForDelegate cenv.infoReader delTy mItem ad
let objArgs = Option.toList (Option.map fst objDetails)
MethInfoChecks g cenv.amap true None objArgs env.eAccessRights mItem delInvokeMeth


CheckILEventAttributes g einfo.DeclaringTyconRef (einfo.GetCustomAttrs()) mItem |> CommitOperationResult

// This checks for and drops the 'object' sender
let argsTy = ArgsTypeOfEventInfo cenv.infoReader mItem ad einfo
if not (slotSigHasVoidReturnTy (delInvokeMeth.GetSlotSig(cenv.amap, mItem))) then errorR (nonStandardEventError einfo.EventName mItem)
Expand Down
Loading