Skip to content
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

Get core-setup building in the consolidated repo. #2

Closed
wants to merge 0 commits into from

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Oct 16, 2019

These were the changes I needed to make to get core-setup building in the consolidated repo, as well as some suggestions from @ViktorHofer.

  • Combine Core-Setup and CoreFX's eng/Build.props. Move Subset.props to the root eng directory.
  • Convert most usages of $(RepoRoot) to a new MSBuild property $(SetupRoot) which points to the root of the setup directory.
  • Fix some pointers to files to package.
  • Add "libraries" subset for CoreFX project.
  • Add "setup" subset that includes all Core-Setup default subsets.

I felt it was easiest to allow the setup build to output to the root artifacts directory as per Arcade convention, so there were a few changes I needed to make to enable the tests to work from there:

  • Updated paths to test assets to match new repo structure.
  • Updated test-emitted Directory.Build.props/Directory.Build.targets to find the new repo root.
  • Fix some bugs in the test setup that accidentally added dependencies on the repository's global.json.

I'll start working on porting back relevant pre-work back to core-setup, and ready a patch to add to dotnet/consolidation for changes that are only relevant after migration.

@jkoritzinsky
Copy link
Member Author

I've discovered a few TODOs for things that wouldn't show up on a local build. I'll keep a running list here as I discover them.

  • Signing hooks need to be re-enabled in a way that doesn't break the other repos.
  • Determine what should happen with the Tools.props file in setup/eng.

eng/Build.props Outdated
@@ -90,7 +90,7 @@

<Target Name="GetRepoTasksSrc">
<PropertyGroup>
<RepoTasksDir>$(RepoRoot)tools-local\tasks\</RepoTasksDir>
<RepoTasksDir>$(RepoRoot)src\setup\tools-local\tasks\</RepoTasksDir>
Copy link
Member

@ViktorHofer ViktorHofer Oct 17, 2019

Choose a reason for hiding this comment

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

We should paths for the three different repos in a Directory.Build.props file in the repo root:

<Project>
<PropertyGroup>
   <SourceDir>$(RepoRoot)src\</SourceDir>
   <SetupRootDir>$(SourceDir)setup\</SetupRootDir>
   <RuntimeRootDir>$(SourceDir)runtime\</RuntimeRootDir>
   <LibrariesRootDir>$(SourceDir)libraries\</LibrariesRootDir>
</PropertyGroup>
</Project>

Copy link
Member

Choose a reason for hiding this comment

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

Of course that file would need to be imported manually as Arcade doesn't import the Directory.Build.props from the repo in the override files like Tools.props, Build.props.


:end
exit /b %ERRORLEVEL%
%~dp0\..\..\build.cmd /p:Subset=libraries %*
Copy link
Member

Choose a reason for hiding this comment

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

if those two scripts are the only ones with the hardcoded relative parent paths then it should be fine.

@@ -5,7 +5,7 @@
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'">
<Message Importance="High" Text="Signing final packages" />
<MSBuild
Projects="$(RepoRoot)signing\SignFinalPackages.proj"
Projects="$(SetupRoot)signing\SignFinalPackages.proj"
Copy link
Member

Choose a reason for hiding this comment

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

it would be nice if the signing directory in core-setup would also be under core-setup/eng/

DestinationFiles="$(PublishRootDir)LICENSE.txt"
Condition="'$(TargetsUnix)' == 'true'"/>

<Copy SourceFiles="$(ProjectDir)resources/LICENSE-MSFT.txt"
<Copy SourceFiles="$(SetupRoot)resources/LICENSE-MSFT.txt"
Copy link
Member

Choose a reason for hiding this comment

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

should we move this file to a more common place in the repo root / repo subdir?

Copy link
Member

Choose a reason for hiding this comment

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

maybe that's better to discuss at a later point.

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

A couple of doc nits, looking very reasonable to me overall.

Signing hooks need to be re-enabled in a way that doesn't break the other repos.

Let me know how this breaks (once it's something that needs to be worked on), I'm responsible for how complicated it ended up in core-setup. 😄

Determine what should happen with the Tools.props file in setup/eng.

I'm honestly not sure what that file is for. May be something to clarify with Arcade folks if nobody already has context. (E.g. what they're for in CoreFX's more extensive copy of the file. It looks like CoreFX's is a superset?)

eng/Subsets.props Outdated Show resolved Hide resolved
eng/Subsets.props Outdated Show resolved Hide resolved
@ViktorHofer
Copy link
Member

ViktorHofer commented Oct 17, 2019

Yes, taking the super-set from corefx with the merge from coreclr should be fine. (Tools.props)

@jkoritzinsky
Copy link
Member Author

@dagood In the current state of the repo, the Signing.props file is not imported because it doesn't exist in the root eng/ folder. To not break the libraries or clr build, we need to figure out how to combine all of the (differing and complex in different ways) logic in all three clr/eng/Signing.props, libraries/eng/Signing.props, and setup/eng/Signing.props and creating a single eng/Signing.props that will work for all of our scenarios. This is something I'll definitely need help with getting right, especially since we don't really have a good way to test it locally AFAIK.

@jkoritzinsky
Copy link
Member Author

Backport to core-setup PR: dotnet/core-setup#8593

Once that's merged, I'll put out a PR to dotnet/consolidation with a patch file and template updates for the root folder so the next scouting exercise we do will have all of my work included.

@ViktorHofer ViktorHofer deleted the core-setup branch November 14, 2019 14:36
franksinankaya added a commit to franksinankaya/runtime that referenced this pull request Dec 30, 2019
Revert "Try dotnet#2"

This reverts commit 479548733c2b215e085eafd519b8f304d63925d5.

ldr instead of mov
trylek pushed a commit to trylek/runtime that referenced this pull request Aug 15, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
aik-jahoda pushed a commit to aik-jahoda/runtime that referenced this pull request Aug 31, 2020
vitek-karas referenced this pull request in vitek-karas/runtime Sep 24, 2020
rokonec added a commit to rokonec/runtime that referenced this pull request Nov 9, 2020
This reverts commit a09b4d3, partially, all but Huffman.cs
rokonec added a commit to rokonec/runtime that referenced this pull request Nov 26, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
janvorli added a commit to janvorli/runtime that referenced this pull request Dec 5, 2023
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