Skip to content

Update BuildTools to 2.1.0-preview2-02621-01#376

Merged
dagood merged 9 commits into
dotnet:dev/release/2.1from
dagood:update-buildtools
Mar 26, 2018
Merged

Update BuildTools to 2.1.0-preview2-02621-01#376
dagood merged 9 commits into
dotnet:dev/release/2.1from
dagood:update-buildtools

Conversation

@dagood
Copy link
Copy Markdown
Member

@dagood dagood commented Mar 21, 2018

Update dotnet/standard commit to bring in fixes for the new version (dotnet/standard#690), and fix init-tools.sh (same fix as standard).

Unblocks #371

@dagood dagood requested review from crummel and dseefeld March 21, 2018 22:14
@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 23, 2018

Figured out the weirdness with tarball, I'm pretty sure. Repro steps from fresh dotnet/standard@2022919 standalone clone:

  1. ./build.sh
  2. rm -rf packages/microsoft.netcore.compilers/
  3. ./build.sh

I do see microsoft.netcore.compilers.2.6.0-beta3-62316-02.nupkg in the repro tool VM's prebuilt/nuget-packages/ dir, but not in the root packages/ folder. I believe BuildTools handles the package not being there by building with the old Roslyn, which causes the failures like these:

/home/dagood/git/standard/Tools/Microsoft.CSharp.Core.targets(106,11): error MSB4064: The "OverrideToolHost" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property. [/home/dagood/git/standard/netstandard/ref/netstandard.csproj]
/home/dagood/git/standard/Tools/Microsoft.CSharp.Core.targets(67,5): error MSB4063: The "Csc" task could not be initialized with its input parameters.  [/home/dagood/git/standard/netstandard/ref/netstandard.csproj]

It seems like nothing actually executes the restore command on this package in the tarball build (since init-tools doesn't run again in the tarball build?) so dotnet/standard can't find it.

Move past breaks: Fix init-tools.sh. Update dotnet/standard commit to bring in fixes for the new version. When building the tarball, run Tools/init-tools.sh again to populate the packages/ directory with Microsoft.NETCore.Compilers (and any other future packages).
@dagood dagood force-pushed the update-buildtools branch from 6abbc79 to d4f088d Compare March 23, 2018 18:50
@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 23, 2018

I added a step to the tarball creation script that runs Tools/init-tools.sh to populate the packages/ dir with the package BuildTools now expects to be there.

Removed CoreCLR from known-good temporarily to see if this makes it past CI. This works on my machine with I limit the build to standard. (My docker install doesn't seem to be working, so I can't test the offline tarball build, but the online one seems to work.)

@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 23, 2018

Green CI, but with CoreCLR taken out. Locally, I'm trying a merge of release/2.1 into @weshaggard's fix branch to see if that works. The merge is clean, BuildTools version is 2.1.0-preview2-02612-03 (dotnet/buildtools@5274e07) and CLI 2.1.2, which means it should be past at least the known break.

Comment thread init-tools.msbuild
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.BuildTools" Version="$(BuildToolsPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.BuildTools.Coreclr" Version="1.0.4-prerelease" />
<PackageReference Include="ILLink.Tasks" Version="0.1.5-preview-1461378" />
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this to dependencies.props in my other PR (where I introduce dependencies.props) to match https://github.com/dotnet/coreclr/blob/2e5f43401b458315dc33c137f0ee0c5a02d810c2/init-tools.msbuild#L20-L22.

@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 26, 2018

CI's green! Once dotnet/coreclr#17136 is in CoreCLR release/2.1 we can move off my fork.

@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 26, 2018

@dseefeld @crummel PTAL

Comment thread .gitmodules Outdated
[submodule "src/coreclr"]
path = src/coreclr
url = https://github.com/dotnet/coreclr
url = https://github.com/dagood/coreclr
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note a huge deal but I generally perfer to not switch to forks but instead just use a branch in the main repo.

@weshaggard
Copy link
Copy Markdown
Member

@dagood did you move coreclr to the tip of the release/2.1 branch + my fix? If so and that works then I can update the release/2.1 branch in coreclr to have the fix. It should be noted that my fix isn't enough and needs adjustments see (dotnet/coreclr#17226) to ensure other scenarios still work.

@dagood
Copy link
Copy Markdown
Member Author

dagood commented Mar 26, 2018

Yep, my commit is just your fix branch with release/2.1 tip merged into it. I'll push it to dev/dagood/source-build-fixes-preview2 in dotnet/coreclr to unblock for now, then we can switch back when you have the adjustments in.

Comment thread support/tarball/build.sh
TEMP_TOOLS_DIR="$SCRIPT_ROOT/ToolsTemp"
PREBUILT_PACKAGE_SOURCE="$SCRIPT_ROOT/prebuilt/nuget-packages"
(
set -x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to leave this here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this makes the commands show up in the logs without the maintenance cost and risk of duplicating the commands in echo ... statements.

Copy link
Copy Markdown
Contributor

@dseefeld dseefeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. Otherwise, looks good.

Comment thread support/tarball/build.sh
(
set -x

"$CLI_ROOT/dotnet" restore "$SCRIPT_ROOT/init-tools.msbuild" --no-cache --packages "$SCRIPT_ROOT/packages" --source "$PREBUILT_PACKAGE_SOURCE" || exit $?
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The || exit $? pattern is what I came up with to make sure it exits on the first error. set -e would normally do this, but it doesn't apply when the command uses ||. (I used || on the subshell to notify the user that it failed rather than just having the script exit without any info.) Better ideas welcome.

dagood added 2 commits March 26, 2018 15:09
The commit is now on a dev branch so we don't depend on the dagood fork.
@dagood dagood merged commit 5861788 into dotnet:dev/release/2.1 Mar 26, 2018
@dagood dagood deleted the update-buildtools branch March 26, 2018 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants