[PM-39513] chore: Pin library project versions to 0.0.1 - #8238
[PM-39513] chore: Pin library project versions to 0.0.1#8238justindbaur wants to merge 1 commit into
Conversation
Every project's <Version> is recorded in each consumer's packages.lock.json, so bumping <Version> in the root Directory.Build.props rewrote ~60 of the 77 lock files on every release (see #8179). Pinning projects that are only ever consumed as libraries keeps those entries stable. This extends the pattern already established in src/Libraries/Directory.Build.props to the libraries that live outside that folder. Safe because nothing reports these assemblies' versions. MapVersionEndpoint() resolves IBitwardenEnvironment.Version, which reads the *entry* assembly's AssemblyInformationalVersionAttribute -- and the deployable services (Api, Identity, Admin, Events, EventsProcessor, Icons, Notifications, Billing, Sso, Scim, SeederApi, Pam) are all left unpinned. Admin's self-host "installed version" panel uses the same accessor. None of these projects are packed or pushed to a feed, and none are strong-named. Measured by setting Directory.Build.props to a throwaway next version and running `dotnet restore --force-evaluate`: the next version bump now touches 11 lock files instead of 60. The remainder are integration-test projects that reference Identity, Api, or Pam. Note: test/Migrator.Test/packages.lock.json contains more than the version pin. It was committed stale in #8143 (added 2026-08-17, a week after the 2026-08-10 bump) and still referenced 2026.7.2 plus older Microsoft.Extensions patch versions; --force-evaluate corrected it. The other 59 lock files contain version-pin changes only.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the addition of Code Review DetailsNo findings. Notes for the reviewer (not findings):
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8238 +/- ##
==========================================
+ Coverage 63.28% 68.57% +5.28%
==========================================
Files 2401 2401
Lines 104003 104043 +40
Branches 9417 9426 +9
==========================================
+ Hits 65817 71344 +5527
+ Misses 35930 30341 -5589
- Partials 2256 2358 +102 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39513
Follow-up to the churn seen in #8179 (
Bump version to 2026.8.0).📔 Objective
Every project's
<Version>is recorded in each consumer'spackages.lock.json, so bumping<Version>in the rootDirectory.Build.propsrewrites ~60 of the 77 lock files on everyrelease. This pins projects that are only ever consumed as libraries to
0.0.1so thoseentries stop moving, extending the pattern already established in
src/Libraries/Directory.Build.propsto the libraries living outside that folder.15 projects pinned
src/: Core, HttpExtensions, Infrastructure.Dapper, Infrastructure.EntityFramework, SharedWeb, Pam.Domainbitwarden_license/src/: Commercial.Core, Commercial.Infrastructure.EntityFrameworkutil/: Migrator, MySqlMigrations, PostgresMigrations, SqliteMigrations, RustSdk, Seedertest/: CommonImpact
Measured by pointing
Directory.Build.propsat a throwaway next version and runningdotnet restore --force-evaluate:Pam.Domainwas the single biggest contributor — unpinned, it alone accounted for 40 files,because both
Infrastructure.DapperandInfrastructure.EntityFrameworkreference it and ittherefore leaks into nearly every closure.
The remaining 11 are integration-test projects that legitimately reference
Identity,Api,or
Pam. That is the floor without pinning the deployable services themselves.Why this is safe
Nothing reports these assemblies' versions.
MapVersionEndpoint()resolvesIBitwardenEnvironment.Version, which reads the entry assembly'sAssemblyInformationalVersionAttribute— and every deployable service (Api, Identity, Admin,Events, EventsProcessor, Icons, Notifications, Billing, Sso, Scim, SeederApi, Pam) is left
unpinned. Admin's self-hosted "installed version" panel uses the same accessor. None of these
projects are packed or pushed to a feed, and none are strong-named.
Note on
test/Migrator.Test/packages.lock.jsonThis is the one lock file whose diff is not purely the version pin. It was committed stale in
#8143 (added 2026-08-17, a week after the 2026-08-10 bump) and still referenced
2026.7.2plus older
Microsoft.Extensions.*patch versions.--force-evaluatecorrected it. The other59 lock files contain version-pin changes only.
📸 Screenshots
N/A — build configuration only.