Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Merge various restore tasks into one Sync target#17226

Merged
weshaggard merged 2 commits into
dotnet:masterfrom
weshaggard:MergeRestoreTargets
Mar 27, 2018
Merged

Merge various restore tasks into one Sync target#17226
weshaggard merged 2 commits into
dotnet:masterfrom
weshaggard:MergeRestoreTargets

Conversation

@weshaggard
Copy link
Copy Markdown
Member

There were various restore targets happening independently
when they should all be combined so the sync step can be
independent from the build step. This change merges them
together under the Sync target.

In particular this moves RestoreOptData and RestoreNETCorePlatforms
to be part of the sync step instead of being individually ran.

Should fix https://github.com/dotnet/coreclr/issues/17176.
Follow-up on #17136.

cc @dpodder @wtgodbe

@weshaggard
Copy link
Copy Markdown
Member Author

Turns out CI does things differently then official builds (:(). Official builds call sync first but CI and dev builds do not so they will not restore the packages before the native build which needs the PGO data. So I'm going to still keep the optdata restore in the scripts on top of making it get restored during sync. That should enable both scenarios to work.

FYI @RussKeldorph @jashook

There were various restore targets happening independently
when they should all be combined so the sync step can be
independent from the build step. This change merges them
together under the Sync target.

In particular this moves RestoreOptData and RestoreNETCorePlatforms
to be part of the sync step instead of being individually ran.

Pass BuildType to sync commands so optdata gets restored correctly
@weshaggard weshaggard force-pushed the MergeRestoreTargets branch from 63fc2cd to af6715e Compare March 26, 2018 18:03
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

LGTM

@weshaggard
Copy link
Copy Markdown
Member Author

test Ubuntu x64 Formatting

@weshaggard
Copy link
Copy Markdown
Member Author

@BruceForstall any idea what is going on in the formatting CI leg?

Formatting jit directory.
11:18:50 Can't find compile_commands.json file. Running configure.
11:18:51 There was an error running CMake to generate compile_commands.json. Please run build.sh configureonly

@BruceForstall
Copy link
Copy Markdown

I'm not sure how the formatting jobs internals work. @adiaaida can you advise?

@weshaggard
Copy link
Copy Markdown
Member Author

test Ubuntu x64 Formatting

@RussKeldorph
Copy link
Copy Markdown

Formatting jobs rely on the build to generate a set of compiler command lines (compile_commands.json). Looks like something is going wrong when trying to run cmake to generate that.

@weshaggard
Copy link
Copy Markdown
Member Author

@RussKeldorph @adiaaida any pointers on where that happens? I cannot find the the script yet. It looks like it is only failing for Release build type for formatting but I cannot see anything yet that would explain why.

@RussKeldorph
Copy link
Copy Markdown

RussKeldorph commented Mar 26, 2018

Try running ./build.sh x64 Release configureonly with your change

>./build.sh x64 Release configureonly
Commencing CoreCLR Repo build
Setting up directories for build
Checking prerequisites...
Restoring the OptimizationData package
Running init-tools.sh
Tools are already initialized
Running: /home/russellk/git/coreclr/master/Tools/dotnetcli/dotnet /home/russellk/git/coreclr/master/Tools/run.exe /home/russellk/git/coreclr/master/config.json build -optdata -BuildArch=x64 -BuildType=Release -BuildOS=Linux
Running: /home/russellk/git/coreclr/master/Tools/msbuild.sh /nologo /verbosity:minimal /clp:Summary  /l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log /t:RestoreOptData  ./build.proj /p:__BuildType=Release /p:__BuildArch=x64 /p:__BuildOS=Linux  /maxcpucount /p:RestoreDefaultOptimizationDataPackage=false /p:UsePartialNGENOptimization=false /p:PortableBuild=true
MSBUILD : error MSB1021: Cannot create an instance of the logger. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Switch: BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log
Command execution failed with exit code 1.
ERROR: An error occured in /home/russellk/git/coreclr/master/Tools/dotnetcli/dotnet /home/russellk/git/coreclr/master/Tools/run 5. Check 5 logs under /home/russellk/git/coreclr/master.
Failed to restore the optimization data package.

@RussKeldorph
Copy link
Copy Markdown

Also, jit-format is in the dotnet/jitutils repo, but I'm 99% certain that if you make the configureonly switch work on build.sh it will fix this formatting problem.

We don't need the binclash logger for optdata so disable it
by pass a single space (note empty string means default).

The default value points at net46 which isn't what we want on
linux.
@weshaggard
Copy link
Copy Markdown
Member Author

OK I was finally able to repro in my ubuntu docker image and figured out what is wrong. I pushed a fix that should disable this logging setting being passed that isn't needed.

@weshaggard
Copy link
Copy Markdown
Member Author

OK passed the other failure not going to wait on the arm builds as they aren't reliable. I want to kick off an official build to watch.

@weshaggard weshaggard merged commit 13dfb52 into dotnet:master Mar 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Official build break: Unexpected qualifier -skiprestore

4 participants