Skip to content

Fix building in devcontainer #15009

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

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ RUN apt-get update \
ENV DEBIAN_FRONTEND=dialog

# Make sure we can build using plain dotnet
ENV BUILDING_USING_DOTNET=true
ENV BUILDING_USING_DOTNET="true"
3 changes: 0 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
"storage": "32gb"
},

// Default settings are set in .vscode/settings.json
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"*.fs": "${capture}.fsi"
},
"FSharp.suggestGitignore": false,
"FSharp.enableMSBuildProjectGraph": true,
"FSharp.enableAdaptiveLspServer": false,
"FSharp.enableMSBuildProjectGraph": false,
"FSharp.enableAdaptiveLspServer": true,
"FSharp.workspacePath": "FSharp.Compiler.Service.sln",
"FSharp.workspaceModePeekDeepLevel": 1,
"FSharp.enableBackgroundServices": false,
Expand All @@ -35,7 +35,7 @@
"csharp.suppressDotnetInstallWarning": true,
"csharp.suppressDotnetRestoreNotification": true,
"csharp.suppressHiddenDiagnostics": true,
"omnisharp.autoStart": true,
"omnisharp.autoStart": false,
"omnisharp.defaultLaunchSolution": "FSharp.Compiler.Service.sln",
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
"omnisharp.disableMSBuildDiagnosticWarning": true,
Expand Down
8 changes: 6 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
All settings below can be overriden via CLI switches if needed. -->

<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Compiler.Service' and '$(BUILDING_USING_DOTNET)' != 'false'">
<BUILDING_USING_DOTNET Condition="'$(BUILDING_USING_DOTNET)' == ''">true</BUILDING_USING_DOTNET>
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>

<!-- Temporary workaround if proj-info is used, allows Ionide's evaluation to work correctly. -->
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>

<Import Project="$(RepoRoot)/Directory.Build.props.user" Condition = "Exists('$(RepoRoot)/Directory.Build.props.user')" />
Expand All @@ -25,7 +30,6 @@
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
<FsLexPath>$(ArtifactsDir)/bin/fslex/$(Configuration)/net7.0/fslex.dll</FsLexPath>
<FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/net7.0/fsyacc.dll</FsYaccPath>
<OtherFlags>$(OtherFlags) --test:ParallelCheckingWithSignatureFilesOn</OtherFlags>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)/eng/Versions.props" Condition="'$(DISABLE_ARCADE)' == 'true'"/>
Expand Down
7 changes: 6 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ function BuildSolution([string] $solutionName) {
# Do not set the property to true explicitly, since that would override value projects might set.
$suppressExtensionDeployment = if (!$deployExtensions) { "/p:DeployExtension=false" } else { "" }

$BUILDING_USING_DOTNET_ORIG = $env:BUILDING_USING_DOTNET

$env:BUILDING_USING_DOTNET="false"

MSBuild $toolsetBuildProj `
$bl `
/p:Configuration=$configuration `
Expand All @@ -261,10 +265,11 @@ function BuildSolution([string] $solutionName) {
/p:TestTargetFrameworks=$testTargetFrameworks `
/p:DotNetBuildFromSource=$sourceBuild `
/p:CompressAllMetadata=$CompressAllMetadata `
/p:BUILDING_USING_DOTNET=false `
/v:$verbosity `
$suppressExtensionDeployment `
@properties

$env:BUILDING_USING_DOTNET=$BUILDING_USING_DOTNET_ORIG
}

function TestAndAddToPath([string] $testPath) {
Expand Down
2 changes: 1 addition & 1 deletion eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ function TestUsingNUnit() {
}

function BuildSolution {
BUILDING_USING_DOTNET=false
BuildCategory="Build"
BuildMessage="Error preparing build"
local solution="FSharp.sln"
Expand Down Expand Up @@ -295,7 +296,6 @@ function BuildSolution {
/p:QuietRestore=$quiet_restore \
/p:QuietRestoreBinaryLog="$binary_log" \
/p:ArcadeBuildFromSource=$source_build \
/p:BUILDING_USING_DOTNET=false \
$properties
fi
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@

<ItemGroup>
<None Include="**\*.cs;**\*.fs;**\*.fsx;**\*.fsi" Exclude="@(Compile)">
<Link>%(RelativeDir)\TestSource\%(Filename)%(Extension)</Link>
<Link>%(RelativeDir)TestSource\%(Filename)%(Extension)</Link>
</None>
</ItemGroup>

Expand Down