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

Increment source generator assembly versions with every build #58836

Merged
merged 3 commits into from
Sep 10, 2021
Merged

Increment source generator assembly versions with every build #58836

merged 3 commits into from
Sep 10, 2021

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented Sep 8, 2021

Fixes #58274

@ghost
Copy link

ghost commented Sep 8, 2021

Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #58274

Author: Anipik
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@@ -16,6 +16,11 @@
<Import Project="$(RepositoryEngineeringDir)resources.targets" />
<Import Project="..\..\Directory.Build.targets" />

<!-- To suppress warnings about reseting the assembly version.-->
<PropertyGroup Condition="'$(AutoGenerateAssemblyVersion)' == 'true'">
<AssemblyVersion></AssemblyVersion>
Copy link
Member

@ericstj ericstj Sep 8, 2021

Choose a reason for hiding this comment

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

I see that this is the warning you're avoiding:
https://github.com/dotnet/arcade/blob/20daa7891e53bd30fc12640fad4a0a9de15ec953/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets#L15

I see that you have to do this, because our default AssemblyVersion is set in props, before a project might set AutoGenerateAssemblyVersion.

So this allows a project to override the repo wide AssemblyVersion with an automatically set AssemblyVersion. I guess an alternative would be to have the repo-wide AssemblyVersion be set in targets and consider if some project set AutoGenerateAssemblyVersion.

Copy link
Contributor Author

@Anipik Anipik Sep 9, 2021

Choose a reason for hiding this comment

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

i didnt do that because this needs to be ported to 6.0 and don't want to cause any side-effects by moving the assembly version to targets file. There shouldnt be any but didnt want to take unnecessary risk. Also it would be nice to have all versioning properties in a single file :P

@Anipik Anipik merged commit 1395216 into dotnet:main Sep 10, 2021
@Anipik
Copy link
Contributor Author

Anipik commented Sep 10, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1219776519

@danmoseley
Copy link
Member

@Anipik generally best to not close the issue until the port is complete. That helps make sure we don't miss a port.

@Anipik
Copy link
Contributor Author

Anipik commented Sep 10, 2021

opened (Y)

@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2021
@Anipik Anipik deleted the generators branch November 10, 2021 18:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider incrementing the assembly version for source generator with each build
4 participants