Skip to content

Commit

Permalink
fix a few packaing issues after the rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Aug 7, 2020
1 parent ce057be commit f73e30f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
31 changes: 23 additions & 8 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,23 @@ Target.create "Restore" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "restore" "FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n"
)

let outputs =[
"FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj"
"../src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Nuget.fsproj"
"FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj"
]

Target.create "Build" (fun _ ->
runDotnet __SOURCE_DIRECTORY__ "build" "../src/buildtools/buildtools.proj -v n -c Proto"
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/netcoreapp3.1/fslex.dll"
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/netcoreapp3.1/fsyacc.dll"
runDotnet (Path.Combine(__SOURCE_DIRECTORY__, "FSharp.Compiler.Service")) "build" (sprintf "FSharp.Compiler.Service.fsproj -nodereuse:false -v n -c Release /p:DisableCompilerRedirection=true /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)

let build relPath =
let dir, proj = Path.getDirectory relPath, Path.GetFileName relPath
runDotnet (Path.Combine(__SOURCE_DIRECTORY__, dir)) "build" (sprintf "%s -nodereuse:false -v n -c Release /p:DisableCompilerRedirection=true /p:FsLexPath=%s /p:FsYaccPath=%s" proj fslexPath fsyaccPath)

outputs
|> List.iter build
)

Target.create "Test" (fun _ ->
Expand All @@ -74,13 +86,16 @@ Target.create "Test" (fun _ ->
)

Target.create "NuGet" (fun _ ->
DotNet.pack (fun packOpts ->
{ packOpts with
Configuration = DotNet.BuildConfiguration.Release
Common = packOpts.Common |> withDotnetExe |> DotNet.Options.withVerbosity (Some DotNet.Verbosity.Normal)
MSBuildParams = { packOpts.MSBuildParams with
Properties = packOpts.MSBuildParams.Properties @ [ "Version", assemblyVersion; "VersionPrefix", assemblyVersion; "PackageReleaseNotes", release.Notes |> String.concat "\n" ] }
}) "FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj"
outputs
|> List.iter (
DotNet.pack (fun packOpts ->
{ packOpts with
Configuration = DotNet.BuildConfiguration.Release
Common = packOpts.Common |> withDotnetExe |> DotNet.Options.withVerbosity (Some DotNet.Verbosity.Normal)
MSBuildParams = { packOpts.MSBuildParams with
Properties = packOpts.MSBuildParams.Properties @ [ "Version", assemblyVersion; "VersionPrefix", assemblyVersion; "PackageReleaseNotes", release.Notes |> String.concat "\n" ] }
})
)
)

Target.create "GenerateDocs" (fun _ ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@
</Target>

<ItemGroup>
<EmbeddedText Include="DependencyManager.txt" />
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
<Compile Include="AssemblyResolveHandler.fsi" />
<Compile Include="AssemblyResolveHandler.fs" />
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
<Compile Include="NativeDllResolveHandler.fsi" />
<Compile Include="NativeDllResolveHandler.fs" />
<Compile Include="DependencyProvider.fsi" />
<Compile Include="DependencyProvider.fs" />
<EmbeddedText Include="FSDependencyManager.txt" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.ProjectFile.fs" />
<Compile Include="$(FSharpSourcesRoot)\fsharp\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Utilities.fs" />
Expand All @@ -66,8 +57,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
<PackageReference Update="FSharp.Core" Version="$(FcsFSharpCorePkgVersion)" />
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ type FSharpDependencyManager (outputDir:string option) =
sprintf """ #r "nuget:FSharp.Data";; // %s 'FSharp.Data' %s""" (SR.loadNugetPackage()) (SR.highestVersion())
|]

member __.ResolveDependencies(scriptExt:string, packageManagerTextLines:string seq, tfm: string) : bool * string list * string list =
member __.ResolveDependencies(scriptExt:string, packageManagerTextLines:string seq, tfm: string, rid: string) : obj =

let scriptExt, poundRprefix =
match scriptExt with
Expand Down

0 comments on commit f73e30f

Please sign in to comment.