diff options
author | Steve <hez2010@outlook.com> | 2022-11-27 00:46:01 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-26 09:46:01 -0600 |
commit | 959822a74c770c1dec9ed877c5eb80bde13f1a1b (patch) | |
tree | 28a2beb826efef187183fe1352891f9e86004784 /lib/compilers/dotnet.ts | |
parent | bb647eb6aba70c85bf2dc7893bb0c275e5704606 (diff) | |
download | compiler-explorer-959822a74c770c1dec9ed877c5eb80bde13f1a1b.tar.gz compiler-explorer-959822a74c770c1dec9ed877c5eb80bde13f1a1b.zip |
Fix F# build failure (#4344)gh-5081
* Fix FSharp compilation
Diffstat (limited to 'lib/compilers/dotnet.ts')
-rw-r--r-- | lib/compilers/dotnet.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts index d0fe8c321..b40ed0fd2 100644 --- a/lib/compilers/dotnet.ts +++ b/lib/compilers/dotnet.ts @@ -47,7 +47,7 @@ class DotNetCompiler extends BaseCompiler { } get compilerOptions() { - return ['build', '-c', this.buildConfig, '-v', 'q', '--nologo', '--no-restore']; + return ['build', '-c', this.buildConfig, '-v', 'q', '--nologo', '--no-restore', '/clp:NoSummary']; } get configurableOptions() { @@ -103,16 +103,24 @@ class DotNetCompiler extends BaseCompiler { <AssemblyName>CompilerExplorer</AssemblyName> <LangVersion>${this.langVersion}</LangVersion> <EnableDefaultCompileItems>false</EnableDefaultCompileItems> + <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <Compile Include="${sourceFile}" /> </ItemGroup> </Project> `; + const sdkBaseDir = path.join(path.dirname(compiler), 'sdk'); + const sdkVersions = await fs.readdir(sdkBaseDir); const nugetConfigFileContent = `<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> + <packageSource key="fsharp" value="${path.join( + sdkBaseDir, + sdkVersions[0], + '/FSharp/library-packs/', + )}" /> </packageSources> </configuration> `; @@ -146,8 +154,8 @@ class DotNetCompiler extends BaseCompiler { crossgen2Options.push(options[switchIndex]); } - const restoreOptions = ['restore', '--configfile', nugetConfigPath, '-v', 'q', '--nologo']; - const restoreResult = await this.exec(compiler, restoreOptions, execOptions); + const restoreOptions = ['restore', '--configfile', nugetConfigPath, '-v', 'q', '--nologo', '/clp:NoSummary']; + await this.exec(compiler, restoreOptions, execOptions); const compilerResult = await super.runCompiler(compiler, this.compilerOptions, inputFilename, execOptions); |