GitInfo icon indicating copy to clipboard operation
GitInfo copied to clipboard

💟 Adopting SponsorLink in v3.5

Open kzu opened this issue 1 year ago • 11 comments

In order to improve the long-term sustainability of this (and other) projects, we'll be adopting SponsorLink v2.

Please get familiar with it, read the privacy statement and raise any doubts related to it in the SponsorLink repo itself.

All of SponsorLink is OSS too.

What this means for you:

  1. If you're not a sponsor (or you haven't synchronized your sponsorship), you will get a IDE-only warning reminding you that the project needs sponsorship.
  2. CLI or CI builds will never check for sponsorship.
  3. Sponsorship status for GitInfo/ThisAssembly is no longer optional for in-IDE usage (to compile warnings-free, exclusively in the IDE).
  4. If you're an oss author (thanks for being one of the 35.8k authors contributing to 2.4k repositories producing 4.7k packages with 22.2M combined daily downloads), will never need to sponsor me to use my stuff, unless you want to 💜). Just sync your status with dotnet tool install -g dotnet-sponsor; sponsor sync devloopd and enjoy!

Back this issue Back this issue

kzu avatar Nov 01 '24 22:11 kzu

Can you eventually explain "that the project needs sponsorship."? Just to get rid of the warning or does it realy need an active sponsorship to be legaly used? And how does that work out for projects using TreatWarningsAsErrors? Does this mean the project must be sponsored to get rid or otherwise the library has to be removed to get the code to compile at all?

IceReaper avatar Dec 02 '24 11:12 IceReaper

Sponsorship status for GitInfo/ThisAssembly is no longer optional for in-IDE usage.

As noted, SponsorLink applies only to IDE usage. The requirement is not legal (it's still OSS). You can keep using it if you just ignore the warnings.

kzu avatar Dec 02 '24 13:12 kzu

But it wont be possible to use <TreatWarningsAsErrors> as the generated code will cause CS0618 warnings due to emit due to the usage of [Obsolete]? So its either:

  • sponsor
  • disable TreatWarningsAsErrors
  • ignore CS0618

Or one is now locked out of building. And if the conduct fobids to disable point 2 and 3, its basicaly sponsor or remove the dependency if you want to keep being able to build in your IDE?

IceReaper avatar Dec 02 '24 13:12 IceReaper

That's correct. And since sponsorships can be company-wide in addition to individual (or you are implicitly a sponsor if you contributed to an active nuget package that's OSS), this should be a very low bar for continued usage/adoption.

You can of course remain on an older version too.

kzu avatar Dec 02 '24 16:12 kzu

Okay, understood! Well, for me personally and my team at work this means we will replace GitInfo with an alternative. While the idea behind this is noble and a good thing, this enforcement of a warning and the acceptance of an issue this produces is the wrong approach from our point of view. But thanks for the quick response!

IceReaper avatar Dec 02 '24 16:12 IceReaper

@IceReaper did you find a alternative? We are in the same situation.

AnderssonPeter avatar Jan 15 '25 09:01 AnderssonPeter

@IceReaper did you find a alternative? We are in the same situation.

We use GitVersion as an alternative. A very good alternative!

AndreasBieber avatar Jan 15 '25 10:01 AndreasBieber

@AndreasBieber do you have a link, the following does not seem to be maintained https://www.nuget.org/packages/GitVersion and does it have the source generated git information?

AnderssonPeter avatar Jan 15 '25 12:01 AnderssonPeter

https://www.nuget.org/packages/GitVersion.MsBuild

IceReaper avatar Jan 15 '25 12:01 IceReaper

Using GitVersionInformation.ShortSha or GitVersionInformation.Sha from

https://www.nuget.org/packages/GitVersion.MsBuild

is a good "fix" to avoid the IDE warning. Thanks for the hint.

Yety avatar Mar 10 '25 14:03 Yety

Nowadays I use ThisAssembly.Git

kzu avatar Mar 17 '25 17:03 kzu

I couldn't get GitVersion.MsBuild to work, but Verlite worked like a charm, It sadly doesn't have the commit date but I can live without it.

AnderssonPeter avatar Aug 22 '25 11:08 AnderssonPeter

Switching to OSMF: #385

kzu avatar Oct 17 '25 16:10 kzu