...
 
Commits (2)
    https://gitcode.net/dotnet/fsharp/-/commit/77d05bb16c8c3672151b8f8265ba1fe8e91b425d Backport #15845 to 17.7 (#15848) 2023-08-24T15:59:23+02:00 Vlad Zarytovskii vzaritovsky@hotmail.com Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:florian.verdonck@outlook.com" title="florian.verdonck@outlook.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg1" style="text-decoration: none">N</a><a href="mailto:florian.verdonck@outlook.com" title="florian.verdonck@outlook.com">Florian Verdonck</a> &lt;<a href="mailto:florian.verdonck@outlook.com" title="florian.verdonck@outlook.com">florian.verdonck@outlook.com</a>&gt;</span> Co-authored-by: <span data-trailer="Co-authored-by:"><a href="mailto:tomasgrosup@microsoft.com" title="tomasgrosup@microsoft.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg6" style="text-decoration: none">N</a><a href="mailto:tomasgrosup@microsoft.com" title="tomasgrosup@microsoft.com">Tomas Grosup</a> &lt;<a href="mailto:tomasgrosup@microsoft.com" title="tomasgrosup@microsoft.com">tomasgrosup@microsoft.com</a>&gt;</span> https://gitcode.net/dotnet/fsharp/-/commit/0e471797f52dc75f7052d84e8d5e142339a05d89 Update azure-pipelines.yml (fix perl, so signed build works) (#15857) 2023-08-25T14:19:49+02:00 Vlad Zarytovskii vzaritovsky@hotmail.com
......@@ -142,6 +142,8 @@ stages:
/p:PublishToSymbolServer=true
/p:VisualStudioDropName=$(VisualStudioDropName)
/p:GenerateSbom=true
env:
NativeToolsOnMachine: true
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c $(_BuildConfig)
displayName: End to end build tests
- task: PublishTestResults@2
......@@ -365,9 +367,13 @@ stages:
# yes, this is miserable, but - https://github.com/dotnet/arcade/issues/13239
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
env:
NativeToolsOnMachine: true
displayName: Build / Test
condition: ne(variables['_testKind'], 'testIntegration')
- script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind)
env:
NativeToolsOnMachine: true
displayName: Build / Integration Test
continueOnError: true
condition: eq(variables['_testKind'], 'testIntegration')
......@@ -519,6 +525,7 @@ stages:
clean: true
- script: .\Build.cmd -c Release -pack
env:
NativeToolsOnMachine: true
FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag)
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
env:
......@@ -649,6 +656,8 @@ stages:
- script: dotnet --list-sdks
displayName: Report dotnet SDK versions
- script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig)
env:
NativeToolsOnMachine: true
displayName: Initial build and prepare packages.
- script: $(Build.SourcesDirectory)/tests/AheadOfTime/Trimming/check.cmd
displayName: Build, trim, publish and check the state of the trimmed app.
......
......@@ -514,18 +514,13 @@ try {
TryDownloadDotnetFrameworkSdk
$nativeTools = InitializeNativeTools
if (-not (Test-Path variable:NativeToolsOnMachine)) {
$env:PERL5Path = Join-Path $nativeTools "perl\5.32.1.1\perl\bin\perl.exe"
$env:PERL5Path = Join-Path $nativeTools "perl\5.38.0.1\perl\bin\perl.exe"
write-host "variable:NativeToolsOnMachine = unset or false"
$nativeTools
write-host "Path = $env:PERL5Path"
}
else {
$env:PERL5Path = Join-Path $nativeTools["perl"] "perl\bin\perl.exe"
write-host "variable:NativeToolsOnMachine = $variable:NativeToolsOnMachine"
$nativeTools.values
write-host "Path = $env:PERL5Path"
}
$dotnetPath = InitializeDotNetCli
$env:DOTNET_ROOT = "$dotnetPath"
......@@ -606,7 +601,15 @@ try {
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
write-host "Exec-Console $env:PERL5Path"
Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
if (-not (Test-Path variable:NativeToolsOnMachine)) {
Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
}
else
{
Exec-Console "perl.exe" """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
}
write-host "Exec-Console finished"
Pop-Location
}
......
......@@ -15,7 +15,7 @@
<!-- F# Version components -->
<FSMajorVersion>7</FSMajorVersion>
<FSMinorVersion>0</FSMinorVersion>
<FSBuildVersion>400</FSBuildVersion>
<FSBuildVersion>401</FSBuildVersion>
<FSRevisionVersion>0</FSRevisionVersion>
<!-- -->
<!-- F# Language version -->
......
......@@ -15,7 +15,7 @@
"xcopy-msbuild": "17.6.0-2"
},
"native-tools": {
"perl": "5.32.1.1"
"perl": "5.38.0.1"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23320.3",
......
......@@ -3958,8 +3958,10 @@ module TcDeclarations =
if tcref.TyparsNoRange.Length = synTypars.Length then
(tcref.TyparsNoRange, synTypars)
||> List.zip
|> List.iter (fun (typar, SynTyparDecl.SynTyparDecl(_, SynTypar(ident = untypedIdent))) ->
typar.SetIdent(untypedIdent)
|> List.iter (fun (typar, SynTyparDecl.SynTyparDecl (_, tp)) ->
let (SynTypar(ident = untypedIdent; staticReq = sr)) = tp
if typar.StaticReq = sr then
typar.SetIdent(untypedIdent)
)
res
......
......@@ -46,3 +46,31 @@ else ()
|> run
|> shouldSucceed
|> withExitCode 0
[<Fact>]
let ``Respect nowarn 957 for extension method`` () =
FSharp """
module Foo
type DataItem<'data> =
{ Identifier: string
Label: string
Data: 'data }
static member Create<'data>(identifier: string, label: string, data: 'data) =
{ DataItem.Identifier = identifier
DataItem.Label = label
DataItem.Data = data }
#nowarn "957"
type DataItem< ^input> with
static member inline Create(item: ^input) =
let stringValue: string = (^input: (member get_StringValue: unit -> string) (item))
let friendlyStringValue: string = (^input: (member get_FriendlyStringValue: unit -> string) (item))
DataItem.Create< ^input>(stringValue, friendlyStringValue, item)
"""
|> compile
|> shouldSucceed
module Extensions
type DataItem<'data> =
{ Identifier: string
Label: string
Data: 'data }
static member Create<'data>(identifier: string, label: string, data: 'data) =
{ DataItem.Identifier = identifier
DataItem.Label = label
DataItem.Data = data }
#nowarn "957"
type DataItem< ^input> with
static member inline Create(item: ^input) =
let stringValue: string = (^input: (member get_StringValue: unit -> string) (item))
let friendlyStringValue: string =
(^input: (member get_FriendlyStringValue: unit -> string) (item))
DataItem.Create< ^input>(stringValue, friendlyStringValue, item)
\ No newline at end of file
......@@ -133,6 +133,49 @@ type System.Collections.Concurrent.ConcurrentDictionary<'key,'value> with
member TryFind: key: 'key -> 'value option"""
[<Fact>]
let ``Don't update typar name in type extension when TyparStaticReq doesn't match`` () =
FSharp """
module Extensions
type DataItem<'data> =
{ Identifier: string
Label: string
Data: 'data }
static member Create<'data>(identifier: string, label: string, data: 'data) =
{ DataItem.Identifier = identifier
DataItem.Label = label
DataItem.Data = data }
#nowarn "957"
type DataItem< ^input> with
static member inline Create(item: ^input) =
let stringValue: string = (^input: (member get_StringValue: unit -> string) (item))
let friendlyStringValue: string =
(^input: (member get_FriendlyStringValue: unit -> string) (item))
DataItem.Create< ^input>(stringValue, friendlyStringValue, item)
"""
|> printSignatures
|> should equal
"""
module Extensions
type DataItem<'data> =
{
Identifier: string
Label: string
Data: 'data
}
static member inline Create: item: ^input -> DataItem<^input> when ^input: (member get_StringValue: unit -> string) and ^input: (member get_FriendlyStringValue: unit -> string)
static member Create<'data> : identifier: string * label: string * data: 'data -> DataItem<'data>"""
[<Fact>]
let ``ValText for C# abstract member override`` () =
let csharp = CSharp """
......