Skip to content

Build cleanup #431

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Build cleanup #431

wants to merge 4 commits into from

Conversation

mgravell
Copy link

  • use Directory.Build.props for common config
  • use Directory.Packages.props for dependencies
  • add package icon
  • enable source link, deterministic builds, etc
  • configure licence, package, etc in package file
  • add net481 as an explicit TFM (avoids some ns* package-hell scenarios)
  • use automatic versioning with pinned assembly version
  • configure build SDK

- use Directory.Build.props for common config
- use Directory.Packages.props for dependencies
- add package icon
- enable source link, deterministic builds, etc
- configure licence, package, etc in package file
- add net481 as an explicit TFM (avoids some ns* package-hell scenarios)
- use automatic versioning with pinned assembly version
- configure build SDK
@mgravell
Copy link
Author

Before:

image

After:

image

@mgravell
Copy link
Author

mgravell commented Jul 29, 2025

Build fail is because of git height / automatic version; investigating:

Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.

We might also have to tweak global.json; IMO we should change the CI server to build with (whatever it says there), and run with (chosen platform) - otherwise we need to limit the C# to the lowest version supported by SDKs in the CI suite.

"version": "1.0",
"assemblyVersion": "1.0.0.0",
"publicReleaseRefSpec": [
"^refs/heads/main$",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider changing the way versions handled for release pipeline here in nuget-release

Copy link
Author

@mgravell mgravell Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that would be good to resolve along with NBGV, which is the default/go-to automated versioning tool; however, that was complaining about git checkout - looks like somewhere we're using shallow clone (NBGV needs a bit more to calculate the version via commits), so: that's something we'd need to fix in parallel. I suggest we defer that for now, but yes: that would be a good thing to fix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically: this version.json was "get that process started", but: a cog fell out, so that's slightly incomplete

@atakavci
Copy link
Collaborator

atakavci commented Aug 1, 2025

Build fail is because of git height / automatic version; investigating:

@mgravell , might require the git history with actions/checkout@4 for NerdBank, i think i hit similar issue with SE.Redis pipeline before here .
try with fetch-depth: 0

@mgravell
Copy link
Author

mgravell commented Aug 1, 2025

ah, yes, that's the voodoo I was looking for; what's your preference:

  • I fix that in this one?
  • I do that in a separate PR?

@mgravell
Copy link
Author

mgravell commented Aug 1, 2025

As a side note: before we pat ourselves on the back about ticking all the boxes: IMO the big missing box at the moment is strong naming (#77), which is causing problems (#99, #416). Normally I'd be a bit "eek" about adding a strong-name, but IMO since it only went 1.0 in March, my vote goes for "YOLO, add the strong name, and rev the major to 2.0" - I'd love your input on that, @uglide @atakavci

@atakavci
Copy link
Collaborator

atakavci commented Aug 1, 2025

@mgravell
i think those are two different PR's with possibly some confusion there. One attempts to sign the code while the original request (at least what i understand) is strong naming.
i explored there are cases that strong naming the lib without a clear context and in-advance notice created a lot of friction with some other client libraries in the past. That was the reason i hit the breaks.
And still don't have a strong opinion but a bit on the side of not doing it, since it doesn't seem to bring a huge value.

@atakavci
Copy link
Collaborator

atakavci commented Aug 1, 2025

ah, yes, that's the voodoo I was looking for; what's your preference:

* I fix that in this one?

* I do that in a separate PR?

whatever feels comfortable with you =)

@mgravell
Copy link
Author

mgravell commented Aug 1, 2025 via email

@AMeyerInkSoft
Copy link

AMeyerInkSoft commented Aug 4, 2025

Sorry for the spam, but heads-up in case this PR might be a better place to add a couple properties I suggested via #434 . The screenshots listed in comments toward the start of this PR suggest the packaging might be updated to cite the licensing another way, so pardon me if my suggestions are redundant. EDIT: I missed it at first glance, originally, but it looks like the this PR does indeed include a PackageLicenseExpression tag.

@mgravell
Copy link
Author

mgravell commented Aug 4, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants