-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Microsoft.Extensions.Logging.Generators.Tests hardcode the AssemblyVersion #58175
Comments
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsThe generated logging generator baseline files all hardcode the generator's assembly version, i.e.: Line 8 in 6d5a772
This makes reving the repository to the next major version (including tfm and assembly version) hard as the test files need to updated with it. @maryamariyan can you please look into this so that we can avoid the hardcoded version? Failed in #58011.
|
Tagging subscribers to this area: @maryamariyan Issue DetailsThe generated logging generator baseline files all hardcode the generator's assembly version, i.e.: Line 8 in 6d5a772
This makes reving the repository to the next major version (including tfm and assembly version) hard as the test files need to updated with it @maryamariyan can you please look into this so that we can avoid the hardcoded version? Failed in #58011.
|
@ViktorHofer what's your recommendation for the fix here? |
|
Exactly what Sam said. Use replacement tokens instead of the hardcoded versions. |
I would like to take this one :) |
Instead of using a hardcoded version of the assembly version on the logging generated baseline files used by tests we use replacement tokens and at runtime we replace them. fix dotnet#58175
* Replacement tokens in logging test baseline files Instead of using a hardcoded version of the assembly version on the logging generated baseline files used by tests we use replacement tokens and at runtime we replace them. fixes #58175
It appears that the version number of this assembly is locked at 6.0.0.0. This can be problematic for VBCSCompiler during reference package updates, leading to dramatic reduction in compiler throughput (for Roslyn.sln, builds are about 3x slower). The fix for this solution is ensuring the assembly version number increases with each build for analyzer and source generator packages. |
Instead of using a hardcoded version of the assembly version on the logging generated baseline files used by tests we use replacement tokens and at runtime we replace them. fix #58175
… build (#58919) * increment source generator assembly versions with every build * use isGenerator Project property * add comment * Replacement tokens in logging test baseline files (#58220) * Replacement tokens in logging test baseline files Instead of using a hardcoded version of the assembly version on the logging generated baseline files used by tests we use replacement tokens and at runtime we replace them. fixes #58175 Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com> Co-authored-by: Allan Targino <13934447+allantargino@users.noreply.github.com>
The generated logging generator baseline files all hardcode the generator's assembly version, i.e.:
runtime/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Baselines/TestWithTwoParams.generated.txt
Line 8 in 6d5a772
This makes reving the repository to the next major version (including tfm and assembly version) harder as it needs to be, as the test files need to be updated whenever assembly versions change.
@maryamariyan can you please look into this so that we can avoid the hardcoded version?
Failed in #58011.
The text was updated successfully, but these errors were encountered: