Skip to content

Conversation

@smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented Jul 15, 2025

Fixes #34185
Initial commentary in #34185 (comment)

I've had a similar hack here stashed away for another internal project. It generates the following file across all projects:

~/Repos/osu/osu.Desktop $ cat obj/Debug/net8.0/DeployProperties.g.cs
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: osu.Game.Utils.OfficialBuildAttribute("2025.715.15-tachyon")]

// Generated by the MSBuild WriteCodeFragment class.

... which is the same thing our internal deploy project does, minus the version name which is added in this patch. Thus this also cleans up the deploy project a bit (see referring PRs).

@smoogipoo
Copy link
Contributor Author

@bdach Consider this a fallback because I'd highly prefer any solution that gets around the version being trimmed on Android.

@smoogipoo smoogipoo requested review from bdach and peppy July 15, 2025 08:09
@smoogipoo smoogipoo force-pushed the better-official-build branch from dcb5791 to ff87586 Compare July 15, 2025 08:23
@smoogipoo
Copy link
Contributor Author

Have rewritten this to use a more canonical implementation, because I noticed Sentry already outputs its own file: https://github.com/getsentry/sentry-dotnet/blob/935ce5b4a3679fbd9e45edefd781df26efd4d92d/src/Sentry/buildTransitive/Sentry.targets#L34-L55

But, this is itself very canonical code across many projects: https://grep.app/search?q=%3CWriteCodeFragment

@smoogipoo smoogipoo force-pushed the better-official-build branch from 0d57b4f to 8e414a7 Compare July 15, 2025 08:59
@smoogipoo
Copy link
Contributor Author

Sorry for the force pushes, I'll call it here 😅 Basically I'm not convinced Sentry is doing it correctly based on actual behaviour, so I referred to other examples. Pushed away the initial revision too, because I don't think there's a world where that's reverted to in any case.

@bdach
Copy link
Collaborator

bdach commented Jul 15, 2025

In terms of a 'review' I suppose most I have to offer is that #34232 is a potential alternative to this.

I'm not sure I have any inherent preference as to which approach is better, personally, both have a few ugly warts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The version name of Android tachyon is lazer

2 participants