Skip to content

Conversation

@tlakollo
Copy link
Contributor

@tlakollo tlakollo commented Nov 8, 2022

Updating the consolidation branch into a new branch called LinkerIntoRuntime2 inside the runtime repo
The difference with #77569 is that this PR contains the latest linker changes and leaves outside changes that are not functional and are difficult to review (formatting the repo, moving docs, formatting the headers). Also, this PR takes into account the latest feedback about renaming linker to illink.
For more information about these changes please refer to #75278.

Tlakaelel Ceja Valadez added 5 commits November 8, 2022 08:27
Remove arcade eng\common directory in src\tools\illink since now we will use the runtime arcade infra
Remove build.cmd/build.sh and lint.cmd/lint.sh in src\tools\illink directory since now they will execute via a subset
Remove/Merge common files from src\tools\illink root:
 - .gitattributes
 - .gitignore
 - .github
 - .gitmodules
 - after.illink.sln.targets
 - code_of_conduct.md
 - global.json
 - LICENSE.txt
 - NuGet.config
 - THIRD-PARTY-NOTICES.TXT
Remove/Merge common files from src\tools\illink\eng:
 - Build.props
 - Publishing.props
 - Signing.props
 - SourceBuild.props
 - SourceBuildPrebuiltBaseline.xml
 - Tools.props
 - Version.Details.xml
 - Versions.props
Add subsets tools.illink and tools.illinktests for building illink and unitest it
Add Microsoft.DotNet.Cecil dependencies to runtime and to illink projects
Some workarounds to be able to build illink
Delete some cecil information from the external folder since now its a package
Test projects use to have relative paths based on the current working directory to know where to find stuff, now that the project is in a different place things are not found, this commit changes to instead use MSBuild variables to calculate where things are
Add the cecil package to tests
Change a cecil test that verify the official package name to only care about the important pieces
Add a variable to recognize when illink contains a change, and set an exclusion of the src/tools/* for other repos
Add a pipeline file to run illink unitests when there are illink changes
@tlakollo tlakollo added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) area-Tools-ILLink .NET linker development as well as trimming analyzers labels Nov 8, 2022
@tlakollo tlakollo added this to the 8.0.0 milestone Nov 8, 2022
@@ -1,6 +1,3 @@
# top-most EditorConfig file
root = true

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 want to consolidate the code styling in src/tools/illink with the rest of the repo? If yes, can you please open a tracking issue to remove this .editorconfig later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once the linker repo is archived and no cherry picking is being made the editorconfig will be customized to only contain a small subset of overrides from runtime global config #78050

Copy link
Member

@sbomer sbomer left a comment

Choose a reason for hiding this comment

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

LGTM with some minor comments. Thanks!

<BuildOutputTargetFolder>tools</BuildOutputTargetFolder>
<!-- Recommended by arcade for tools projects. generates an assembly version that includes patch number derived from date and build revision -->
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<AutoGenerateAssemblyVersion>false</AutoGenerateAssemblyVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Why is this changing here and in the analyzer? If we change it the comment should at least be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment pointing to the issue that tracks setting the feature to true again #78076

<Description>MSBuild tasks for running the IL Linker</Description>
<IsPackable>true</IsPackable>
<PackageId>Microsoft.NET.ILLink.Tasks</PackageId>
<!-- Removing the package id to be able to build the linker inside runtime
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a Microsoft.NET.ILLink.Tasks package included in the Versions.props and Version.Details.xml since this PackageId generates another package with the same name then the build system will believe that there is a cycle. Once we have live bits being feed into runtime we can delete the package in Versions.props and Version.Details.xml and uncomment the PackageId in this project. Opened #78073 to track this

@tlakollo tlakollo removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Nov 9, 2022
@tlakollo tlakollo merged commit 9590382 into dotnet:LinkerIntoRuntime2 Nov 9, 2022
@filipnavara
Copy link
Member

filipnavara commented Nov 9, 2022

Thanks! 🎉 (uff, only noticed now that it's still in separate branch and not main 🥺)

@tlakollo
Copy link
Contributor Author

tlakollo commented Nov 9, 2022

Thanks! 🎉 (uff, only noticed now that it's still in separate branch and not main 🥺)

Here is the PR targeting main, hopefully will be merged today #78077

tlakollo added a commit that referenced this pull request Nov 15, 2022
* Merge and remove common files
Remove arcade eng\common directory in src\tools\illink since now we will use the runtime arcade infra
Remove build.cmd/build.sh and lint.cmd/lint.sh in src\tools\illink directory since now they will execute via a subset
Remove/Merge common files from src\tools\illink root:
 - .gitattributes
 - .gitignore
 - .github
 - .gitmodules
 - after.illink.sln.targets
 - code_of_conduct.md
 - global.json
 - LICENSE.txt
 - NuGet.config
 - THIRD-PARTY-NOTICES.TXT
Remove/Merge common files from src\tools\illink\eng:
 - Build.props
 - Publishing.props
 - Signing.props
 - SourceBuild.props
 - SourceBuildPrebuiltBaseline.xml
 - Tools.props
 - Version.Details.xml
 - Versions.props

* Create subsets to be able to build illink
Create a variable for the tools folder in runtime
Add subsets tools.illink and tools.illinktests for building illink and unitest it
Add Microsoft.DotNet.Cecil dependencies to runtime and to illink projects
Some workarounds to be able to build illink
Delete some cecil information from the external folder since now its a package

* Refactorings to make test work
Test projects use to have relative paths based on the current working directory to know where to find stuff, now that the project is in a different place things are not found, this commit changes to instead use MSBuild variables to calculate where things are
Add the cecil package to tests
Change a cecil test that verify the official package name to only care about the important pieces

* Enable pipeline
Add a variable to recognize when illink contains a change, and set an exclusion of the src/tools/* for other repos
Reuse the dotnet-linker-tests pipeline file to also run illink unitests every time there are illink changes

* Fix Markdown lint

* Remove checked-in binaries

* Use nunit for linker tests and fix cecil version test
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2022
@tlakollo tlakollo deleted the LinkerIntoRuntimeDiff2 branch January 16, 2023 05:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Tools-ILLink .NET linker development as well as trimming analyzers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants