Skip to content

Commit f2eecf8

Browse files
committed
Change how proto acquires FSharp.Core
1 parent 7fa61b7 commit f2eecf8

File tree

10 files changed

+46
-19
lines changed

10 files changed

+46
-19
lines changed

.vsts-signed.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ jobs:
9898
continueOnError: true
9999
condition: succeeded()
100100

101+
# Publish Proto Compiler
102+
- task: PublishBuildArtifacts@1
103+
displayName: Push Proto
104+
inputs:
105+
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/bin/fsc/Proto'
106+
ArtifactName: Proto Compiler
107+
continueOnError: true
108+
condition: succeeded()
109+
101110
# Execute cleanup tasks
102111
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
103112
displayName: Execute cleanup tasks

eng/build-utils.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ function Make-BootstrapBuild() {
242242

243243
# prepare FsLex and Fsyacc
244244
Run-MSBuild "$RepoRoot\src\buildtools\buildtools.proj" "/restore /t:Build" -logFileName "BuildTools" -configuration $bootstrapConfiguration
245-
Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.1\*" -Destination $dir
246-
Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.1\*" -Destination $dir
245+
Copy-Item "$ArtifactsDir\bin\fslex\$bootstrapConfiguration\netcoreapp2.1\*" -Destination $dir -force
246+
Copy-Item "$ArtifactsDir\bin\fsyacc\$bootstrapConfiguration\netcoreapp2.1\*" -Destination $dir -force
247247

248248
# prepare compiler
249249
$projectPath = "$RepoRoot\proto.proj"
250250
Run-MSBuild $projectPath "/restore /t:Build" -logFileName "Bootstrap" -configuration $bootstrapConfiguration
251-
Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir
252-
Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir
251+
Copy-Item "$ArtifactsDir\bin\fsc\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir -force
252+
Copy-Item "$ArtifactsDir\bin\fsi\$bootstrapConfiguration\$bootstrapTfm\*" -Destination $dir -force
253253

254254
return $dir
255255
}

src/fsharp/Directory.Build.targets

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
<Project>
22
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
33
<Import Project="..\buildtools\buildtools.targets" />
4+
5+
<!-- Proto Build use package or compiler fsharp.core -->
6+
<ItemGroup Condition="'$(Configuration)' == 'Proto'">
7+
<!-- When building building locally we go to nuget and use the Version number that matches the LKG tools in use -->
8+
<PackageReference Include="FSharp.Core" Version="$(FSharpCoreImplicitPackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true' or '$(FSharpSourceBuild)' != 'true'" />
9+
10+
<!-- When building building from source we use the fsharp.core alongside the compiler. Frankly this is awfull -->
11+
<Reference Include="FSharp.Core" Condition="'$(DotNetBuildFromSource)' == 'true' and '$(FSharpSourceBuild)' == 'true'">
12+
<HintPath>$(_DotNetRoot)sdk\$(NETCoreSdkVersion)\FSharp\FSharp.Core.dll</HintPath>
13+
</Reference>
14+
</ItemGroup>
15+
416
</Project>

src/fsharp/FSharp.Build/FSharp.Build.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<None Include="Microsoft.FSharp.Overrides.NetSdk.targets" CopyToOutputDirectory="PreserveNewest" />
3333
</ItemGroup>
3434

35-
<ItemGroup>
35+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
3636
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
3737
</ItemGroup>
3838

src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<Compile Include="..\fsiaux.fs" />
2828
</ItemGroup>
2929

30-
<ItemGroup>
31-
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj" />
30+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
31+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
3232
</ItemGroup>
3333

3434
<ItemGroup>

src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@
674674
</Compile>
675675
</ItemGroup>
676676

677-
<ItemGroup>
677+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
678678
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
679679
</ItemGroup>
680680

src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<Compile Include="FSharpInteractiveServer.fs" />
2121
</ItemGroup>
2222

23-
<ItemGroup>
24-
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj" />
23+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
24+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/fsharp/fsc/fsc.fsproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
</None>
2929
</ItemGroup>
3030

31-
<ItemGroup>
31+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
3232
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
33+
</ItemGroup>
34+
35+
<ItemGroup>
3336
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Build\FSharp.Build.fsproj" />
3437
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
3538
</ItemGroup>

src/fsharp/fsi/fsi.fsproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
<None Include="app.config" />
2626
</ItemGroup>
2727

28+
<ItemGroup Condition="'$(Configuration)' != 'Proto'">
29+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
30+
</ItemGroup>
31+
2832
<ItemGroup>
29-
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj" />
30-
<ProjectReference Include="..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
31-
<ProjectReference Include="..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
33+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
34+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
3235

3336
<!-- only used when '$(TargetFramework)' == 'net472' -->
34-
<ProjectReference Include="..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" Condition="'$(TargetFramework)' == 'net472'" />
37+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" Condition="'$(TargetFramework)' == 'net472'" />
3538
</ItemGroup>
3639

3740
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">

src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<ProjectReference Include="..\FSharp.Core\FSharp.Core.fsproj" />
30-
<ProjectReference Include="..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
31-
<ProjectReference Include="..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
32-
<ProjectReference Include="..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" />
29+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
30+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" />
31+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj" />
32+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" />
3333
</ItemGroup>
3434

3535
<ItemGroup>

0 commit comments

Comments
 (0)