-
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
Use generated version files when printing/tracing host version info #90273
Conversation
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov Issue DetailsSet
Fixes #80961 There's more cleanup that can be done here (for example, we no longer need all the separate defines/versions for each host component - all the versions are the same), but this just fixes the immediate issue of single-file not having version/commit info at all.
|
runtime/src/native/corehost/common.cmake Line 23 in 41bc935
would be nice to generalize and reuse that global info instead of wiring up a new mechanism. e.g. diagnostics has mirrored All these seem very similar use-cases for which we can do something better, IMO. Currently, one limitation is imposed by arcade is that it only allows one version file per platform, so it is either _version.c (Unix) or _version.h (Windows): https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets., we can change it to emit both on all platforms. |
Thanks. Switched to using generated |
4c493f2
to
c9a9908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
These properties can also be cleaned up:
runtime/Directory.Build.targets
Lines 216 to 227 in 79b9707
<!-- | |
By default, we are always building the nuget packages for HostPolicy, HostFXR and | |
Dotnet/AppHost. Thus, the properties (below) are always set to $(ProductVersion). | |
However, there are scenarios when only some of these components will change (e.g. during | |
servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases, | |
pass the appropriate version value(s) as argument to the build command in order to override; | |
e.g. 'build -p:HostPolicyVersion=x.y.z ...' | |
--> | |
<HostVersion Condition="'$(HostVersion)' == ''">$(ProductVersion)</HostVersion> | |
<AppHostVersion Condition="'$(AppHostVersion)' == ''">$(ProductVersion)</AppHostVersion> | |
<HostResolverVersion Condition="'$(HostResolverVersion)' == ''">$(ProductVersion)</HostResolverVersion> | |
<HostPolicyVersion Condition="'$(HostPolicyVersion)' == ''">$(ProductVersion)</HostPolicyVersion> |
I think the only things still using those are the host packages (which I opted not to touch in this change). Most of those can be removed (and the remaining one switched to just used the product version) when we get to #35244 |
Use generated version files when printing/tracing host version info.
VER_PRODUCTVERSION_STR
/sccsid
from generated_version.(h|c)
for version and commit info (for tracing)RuntimeProductVersion
for version from header generated byGenerateRuntimeVersionFile
HOST_*_PKG_VER
defines and script arguments for passing that info aroundFixes #80961
Host traces will have: