Repository navigation
Add SCCSID to AOT published shipping binaries - #7600
Conversation
09900d2 to
14ab3f1
Compare
14ab3f1 to
10be6b9
Compare
|
@MichalStrehovsky, PTAL. |
Sorry, I'm not the best person to review this. I literally wrote "I don't have an opinion on this. I don't know why we include _version.c in the first place.". As far as I'm concerned, it's useless information and I would not sign off on a change that doesn't do anything useful because we still need to maintain it. It will add this string to native AOT outputs, so from that perspective I'm happy to sign off, provided we need this. |
It's a unix convention https://en.wikipedia.org/wiki/Source_Code_Control_System. Windows binaries have PE metadata populated via source link, so _version.c is the unix-y answer to that.
Off the top of my head, three current use-cases:
One may not be a fan of it but it certainly is not useless. We are adding SCCSID in "native binaries shipped in .NET". This is to make it consistent "nativeaot published binaries shipped by .NET". I think it should be fine. cc @jkotas |
|
Okay, I'm fine with it. Found the original motivation for the use in our repos at dotnet/runtime#5107. Do you have an opinion on whether we should match the version.c inclusion rules? (I assume we don't include version.c on Windows at minimum.) |
|
I agree we shouldn't emit this on Windows, it has no meaning there. I'm a bit torn on the approach, I don't like that we need to remember to include the target everywhere we have a NativeAOT'd app. I saw that at least on Windows the NativeAOT'd .exe still contains the PE Copyright / ProductVersion fields from somewhere, I assume it propagates them from the original .NET assembly? maybe we could do the same for sccsid on Unix? |
|
I can exclude it but we had this discussion earlier dotnet/runtime#51554 (comment), the idea was we don't want to override PE resource with our version but rather emit it in Windows. The only reason why we don't emit it in apphost is because how arcade infra is written and nobody worked on it. I will exclude it from here and we can align it once other win32 runtime binaries receive the fix. |
Co-authored-by: Adeel Mujahid <[email protected]>
+1 Can this be done by Arcade targets that generate the @Version resource for the C/C++ binaries? |
|
@jkotas, you mean #7600 (comment)? We are including files from |
|
I think it would be better to do it correctly right of the gate so that we do not have deal with this again. We have been adopting for tools accros the stack and I expect that it is going to continue. Can the equivalent of this change be achieved by adding the logic to https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.targets ? |
|
Moved to arcade SDK and verified that it still works: https://github.com/am11/dotnet-riscv/releases/tag/11.0.100-preview.7.26364.199 $ find ~/.dotnet-new -name libaspnetcoretools.so | xargs strings | grep '@(#)'
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
$ find ~/.dotnet-new -name crossgen2 | xargs strings | grep '@(#)'
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
$ find ~/.dotnet-new -name ilc | xargs strings | grep '@(#)'
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
$ find ~/.dotnet-new -name libcoreclr.so | xargs strings | grep '@(#)'
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888
@(#)Version 11.0.26.36599 @Commit: df02874e4e7bdd772c58bf6342a3756f03b68888 |
Co-authored-by: Jan Kotas <[email protected]>
MichalStrehovsky
left a comment
There was a problem hiding this comment.
This turned out pretty nice! Thanks!
Fixes dotnet/aspnetcore#67637.