Skip to content

Commit info is missing from singlefilehost #51554

Closed

Description

@am11

In .NET 5, singlefilehost binary has commit information:

$ strings /usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/5.0.5/runtimes/linux-x64/native/singlefilehost | \
    grep '@Commit'

@(#)Version 42.42.42.42424 @Commit: 2f740adc1457e8a28c1c072993b66f515977eb51

(version is the wrong / default / placeholder value, but at least we have the commit hash)

In .NET6 preview3, that info line is missing:

$ strings /usr/share/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64/6.0.0-preview.3.21201.4/runtimes/linux-x64/native/singlefilehost | \
    grep '@Commit'

# nothing

cc @VSadov, @janvorli

Activity

  1. ghost added
    untriaged
    on Apr 20, 2021
  2. ghost added
    in-pr
    on Apr 25, 2021
  3. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    I've checked singlefilehost.exe 5.0 and apphost.exe 5.0 and 3.1. None seem to have versioning information.

    Was that string included only on Unix?
    I wonder if that was intentional, considering the version was incorrect.

  4. janvorli commented on Apr 26, 2021

    @janvorli
    Member

    I wonder if that was intentional, considering the version was incorrect.

    What do you mean by "incorrect"?

  5. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    What do you mean by "incorrect"?

    It is literally @(#)Version 42.42.42.42424 @Commit: 2f740adc1457e8a28c1c072993b66f515977eb51

    This is a placeholder version, not a real one.

  6. janvorli commented on Apr 26, 2021

    @janvorli
    Member

    The placeholder is used by all local builds. Only official builds include the real version.

  7. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    Also, in 3.1 apphost contains the following

    @(#)Version 3.100.320.12801 @Commit: 4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a

    but that is gone in 5.0.
    I do not see any version info in 5.0 apphost.

  8. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    I have a feeling the version info was removed in 5.0, but not completely and singlegilehost on Linux gets its commit sha somehow, while the version is a placeholder (that is - in an official sdk installed from apt-get)

  9. janvorli commented on Apr 26, 2021

    @janvorli
    Member

    that is - in an official sdk installed from apt-get

    Ah, then that seems like a bug that was missed or if the version was removed intentionally, then I haven't heard about it and I don't understand the reason.

  10. vitek-karas commented on Apr 26, 2021

    @vitek-karas
    Member

    I'm pretty sure we have an issue about the dev-only version somewhere, I just can't find it now.

  11. janvorli commented on Apr 26, 2021

    @janvorli
    Member

    The problem is that even official one is missing the version string, according to Vlad.

  12. vitek-karas commented on Apr 26, 2021

    @vitek-karas
    Member

    Yes I understand that - we need to fix it.

  13. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    It looks like removal of version info from apphost was intentional - dotnet/core-setup#2287

  14. VSadov commented on Apr 26, 2021

    @VSadov
    Member

    Some reasons why hosts should not be version-stamped were given in the discussion at dotnet/core-setup#2090 (comment)

  15. vitek-karas commented on Apr 26, 2021

    @vitek-karas
    Member

    I think we should make it very explicit what we want:

    • We WANT - Include the version of the apphost (build number and commit) in the binary - so that I can grep for it. This is to help debug problems - not for end user consumption.
    • We DON'T WANT - include version resource on Windows - since that should be the version of the app which we have no control over. (This doesn't have a counterpart on Linux/macOS anyway)
  16. ghost removed
    in-pr
    on Apr 29, 2021
  17. am11 commented on Apr 30, 2021

    @am11
    MemberAuthor

    Fixed in 6.0.100-preview.5.21230.4. I have noticed another issue (still on Unix), where shared libraries (.so) produced by libraries subset have incorrect official build version, opened dotnet/arcade#7326.

  18. ghost locked as resolved and limited conversation to collaborators on May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions