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

Condition source-link arguments #11153

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

NikolaMilosavljevic
Copy link
Member

Fixes: dotnet/source-build#2883

This change allows source-build to disable sourcelink, but it will not do it by default anymore.

<InnerBuildArgs>$(InnerBuildArgs) /p:EnableSourceLink=false</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) /p:DeterministicSourcePaths=false</InnerBuildArgs>
<InnerBuildArgs Condition="'$(DisableSourceLink)' == 'true'">$(InnerBuildArgs) /p:EnableSourceControlManagerQueries=false</InnerBuildArgs>
<InnerBuildArgs Condition="'$(DisableSourceLink)' == 'true'">$(InnerBuildArgs) /p:EnableSourceLink=false</InnerBuildArgs>
Copy link
Member

Choose a reason for hiding this comment

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

Why both and EnableSourceLink and DisableSourceLink? This is confusing IMO. Would it make sense to toggle EnableSourceControlManagerQueries and DeterministicSourcePaths based on EnableSourceLink and just use EnableSourceLink to control the behavior?

Copy link
Member

Choose a reason for hiding this comment

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

I guess this DisableSourceLink is something that already exists. 😞

Copy link
Member Author

Choose a reason for hiding this comment

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

In light of this change: https://github.com/dotnet/runtime/pull/76685/files - would it actually make sense to completely remove these 3 lines instead?

DisableSourceLink seems to be a higher-level property, controlling the values of these 3 source-link related properties, like in here:

<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
<EnableSourceLink>false</EnableSourceLink>
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
</PropertyGroup>

Similarly, in installer repo:
https://github.com/dotnet/installer/blob/e9549ff1d3412a94f101be476cec553f0bf858e8/Directory.Build.props#L35-L37

As a result, we would also remove the same 3 lines from: https://github.com/dotnet/installer/blob/e9549ff1d3412a94f101be476cec553f0bf858e8/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets#L89-L91

Copy link
Member

Choose a reason for hiding this comment

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

Yes, removing these would be good. They appear completely redundant now.

@akoeplinger
Copy link
Member

Should we port this to main?

NikolaMilosavljevic added a commit to NikolaMilosavljevic/arcade that referenced this pull request Nov 4, 2022
NikolaMilosavljevic added a commit that referenced this pull request Nov 6, 2022
* Condition source-link arguments (#11153)

* Remove redundant arguments - these properties are set by repos based on value of DisableSourceLink property
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