Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix breaks in the official build #18218

Merged
merged 3 commits into from
Apr 11, 2017
Merged

Conversation

mellinoe
Copy link
Contributor

There were two issues related to my recent change ( #18035 ):

  • codeOptimization.targets was still trying to generate and restore a project.json file. This only happens when EnableProfileGuidedOptimization is set to true, which doesn't happen in CI builds. I've modified the targets file to use a checked-in MSBuild project instead. An unchanged version of codeOptimization.targets was checked in in order to show the diff (look at the second commit to see just the diff).
  • optional.json was not being updated anymore, because I accidentally removed it from the list of projects being updated in dependencies.props. It was still being restored correctly, but the version numbers no longer matched up and the files from the packages were no longer being found. I've added it back into dependencies.props and manually sync'd back up the version numbers.
    • NOTE: optional.json is still a "project.json-based project". We don't use the CLI to restore this project; we use some built-in nuget task which supports encrypted credentials. This task still supports project.json restores.

@weshaggard

@ericstj
Copy link
Member

ericstj commented Apr 11, 2017

FYI @dpodder who appears to be changing same targets in dotnet/buildtools#1427

@mellinoe
Copy link
Contributor Author

@dpodder The changes look pretty simple to merge. I'll watch for a new version of buildtools and update corefx onto it and merge in the codeOptimization.targets changes into Tools-Override here.

<OptimizationDataNuGetFeed Condition="'$(OptimizationDataNuGetFeed)'==''">https:%2F%2Fdotnet.myget.org/F/roslyn/api/v3/index.json</OptimizationDataNuGetFeed>
</PropertyGroup>

<MakeDir Directories="$(OptimizationDataDir)" ContinueOnError="true" />
<WriteLinesToFile File="$(OptimizationDataProjectJson)" Lines="@(_OptimizationDataJsonLine)" Overwrite="true" />
<Copy SourceFiles="$(OptimizationDataSourceProject)" DestinationFiles="$(OptimizationDataRestoreTarget)" />
Copy link
Member

Choose a reason for hiding this comment

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

Do we actually need to copy it? The only reason I could imagine would be if nuget wasn't smart enough to invalidate the restore when we change the global properties. It's not like this was even doing incremental build all that well since the package name/version weren't in the path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't strictly need to, but it does control where the intermediate outputs go to.

Copy link
Member

Choose a reason for hiding this comment

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

... unless you pass in a property for that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll do that in a follow-up. I'm going to merge now to unblock the official builds.

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

Consider simplifying the restore target if it works correctly on the .msbuild file with only changing global properties.

@mellinoe
Copy link
Contributor Author

I rebased on master so that CI won't hit the problem fixed by #18213.

@mellinoe mellinoe merged commit f630d05 into dotnet:master Apr 11, 2017
@karelz karelz modified the milestone: 2.0.0 Apr 15, 2017
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.

4 participants