chore: consolidate project metadata, drop unused dependencies and vendored sample assets #142
No reviewers
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET!142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-110-hygiene"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #110.
Cleanup the v0.6.0 sweep missed. Nothing here should change behaviour. The only effect on consumers is two dependencies the core package never used.
Project files
Directory.Build.propsnow holdsTargetFramework,Nullable,ImplicitUsingsand all package metadata. The unused rootPackageTagsis gone, because every packable project overrides it. Three new layers each import the root file:src/Directory.Build.propssetsGenerateDocumentationFileand makes CS1591 an error.tests/Directory.Build.propssetsIsPackable=false, thexUnit1051suppression and the globalusing Xunit;.samples/Directory.Build.propssetsIsPackable=false.LangVersion latest,TreatWarningsAsErrors false, andRootNamespace/AssemblyName/PackageIdwherever they equalled the project name. The project files now keep onlyDescription,PackageTagsand their references.ATProtoNet.csprojdropsMicrosoft.Extensions.HttpandMicrosoft.Extensions.Options.IHttpClientFactoryonly appeared in<c>doc text. The core dependency closure goes from 14 packages to 3:Logging.Abstractions,System.Formats.Cbor, andDependencyInjection.Abstractionsunder the first.ATProtoNet.Server's references are untouched.ProjectReferences to core are removed fromManagedPdsSample,ServerIntegrationSampleandATProtoNet.IntegrationTests.ServerIntegrationSamplekeeps its explicitATProtoNet.Serverreference even though it arrives through Blazor today, because the sample calls Server APIs directly and the package restructure may cut Blazor→Server.atproto-lexgen --versionand the--helpbanner printAssemblyInformationalVersionAttributeinstead of a hard-coded"1.0.0"..gitignore: the duplicate.idea/line is removed andnupkg/is added.Dead code
usings (IDE0005) are removed in 23 files acrosssrc/,tests/andtools/. They were applied withdotnet format style --diagnostics IDE0005, not by hand. The build diagnostic reports only the first line of each contiguous unnecessary block, so the report's count of 42 undercounts.FeedClient.csandFirehoseClient.cseach had 5.XrpcClient.RefreshToken.StandardSiteClient._xrpc, together with its now-unused internal constructor parameter. The call sites inAtProtoClientandStandardSiteClientTestsare updated.currentNonceparameter ofOAuthClient.SendWithDpopRetryAsync.namespacePrefixparameter ofEmitPlan.PlanUnions, thehintparameter ofEmitPlan.WalkObject, and thedefNameparameter ofLexiconEmitter.BuildSchemaFromType.Samples
Vendored Bootstrap trees are removed. Across both samples that is 87 of 88 tracked files and 17.1 MB. Only
wwwroot/lib/bootstrap/dist/css/bootstrap.min.cssstays, at the same path, soApp.razoris unchanged and the sample still works offline. Its license banner is in the file header.samples/BlazorOAuthSampleis folded intosamples/ServerIntegrationSample. Before the fold, a diff showed three things only BlazorOAuthSample had, and all three moved over:app.UseStatusCodePagesWithReExecute("/not-found", …), so unknown URLs render the NotFound page again. It had been unreachable in ServerIntegrationSample.appsettings.jsonandappsettings.Development.json, moved withgit mv, so the log levels match.The solution file and the links in
docs/blazor.md,docs/oauth.mdanddocs/architecture.mdare updated.Template leftovers are removed:
ReconnectModal.razor,.cssand.js(251 lines). Blazor shows its built-in reconnect UI instead.app.cssrules: form validation,blazor-error-boundary, and the Identity-templatedarker-border-checkboxandform-floatingrules..bi-list-nested-nav-menuicon rule._Imports.razordirectives.MainLayout.razor.cssandNavMenu.razor.cssstay, because the sidebar layout uses them.Docs and
CLAUDE.md: the "Shared build config" section ofdocs/architecture.mdandCLAUDE.mddescribe the newDirectory.Build.propslayering.Breaking changes
ATProtoNetno longer bringsMicrosoft.Extensions.HttporMicrosoft.Extensions.Optionsin transitively. ASP.NET Core apps are unaffected, because the shared framework carries both.Migration: an app outside ASP.NET Core that used
IHttpClientFactory,IOptions<T>orLoggerFactoryonly through this transitive dependency addsMicrosoft.Extensions.Http,Microsoft.Extensions.OptionsorMicrosoft.Extensions.Loggingitself.There are no public API changes. Every removed member or parameter is internal or private.
Verification
dotnet buildof the full solution with--no-incrementalfinishes with 0 warnings and 0 errors.LexiconGeneratorProgramTests.Main_VersionFlag_PrintsPackageVersionfor--versionand-v. It checks that the output starts with the assembly'sMajor.Minor.Build, so it fails against the old1.0.0.dotnet pack -c Releaseran before and after, and every.nupkgand.snupkgwas compared by nuspec and file list. The only difference is the two removed<dependency>entries inATProtoNet.0.6.0.nupkgand.snupkg. Authors, license, URLs, readme, tags, descriptions, the tool package type, and the file lists (DLLs, XML docs, README) are identical for all five packages.EnforceCodeStyleInBuildand IDE0005/0052/0060 promoted to warnings leaves IDE0005 hits only in the parallel-owned files listed below.127.0.0.1:5010:/,/loginand/not-foundreturn 200./does-not-existreturns 404 with the NotFound page.bootstrap.min.css,app.cssand the scoped CSS are served./profilewithout a session redirects 302 to/login?ReturnUrl=%2Fprofile./atproto/loginwithout a handle returns 400./atproto/login?handle=bsky.appruns the full PAR flow and redirects 302 tohttps://bsky.social/oauth/authorizewith the loopbackclient_idandredirect_uri=http://127.0.0.1:5010/atproto/callback. This is the same path BlazorOAuthSample took on port 5000./atproto/callback?error=…redirects to/login?error=….Deliberately deferred
SpacesSamplefromdocs/spaces.mdis left to the Spaces PR..github/workflows/ci.ymlandnuget.configare kept on the owner's instructions.src/ATProtoNet.Aspire.Hosting/ATProtoNet.Aspire.Hosting.csprojandsamples/SpacesSample/SpacesSample.csprojstill set properties that now come from the props files (TFM, nullable, usings, doc file,LangVersion, and so on). That is harmless but redundant, and a one-line trim for whichever PR touches them.Crypto/,Repo/,Serialization/,*Models.cs,Server/Spaces/,SpacesSample, and the matching tests.AtProtoAuthenticationHandler._client(IDE0052), whose file goes away in the package restructure.AtProtoOAuthServicecancellationTokenparameter.MerkleSearchTreedepth, owned by the Repo PR.bi-person-fill-nav-menuandbi-list-check-nav-menu, which no CSS defines, so those two entries render without icons.docs/architecture.md's samples tree still omitsJetstreamReplaySampleandSpacesSample. That is left to the docs overhaul.🤖 Generated with Claude Code
🤖 Reviewing this PR — the review will link the full session transcript.
📜 Live transcript — updating every ~5 minutes while the review runs.
✅ Verdict: approve — no blocking issues found.
A clean, well-verified chore. I spot-checked the substantive claims and they all hold:
src/,tests/andsamples/Directory.Build.propsfiles chain up to the root via$([MSBuild]::GetPathOfFileAbove(...)), so every project gets exactly one copy of the shared settings.$(WarningsAsErrors);CS1591is valid withTreatWarningsAsErrorsleft unset (the list is honored independently). The redundant settings that remain inATProtoNet.Aspire.Hosting.csprojandSpacesSample.csprojare the two disclosed deferred files, and they agree with the inherited values, so they're inert.IHttpClientFactorysurvives only inside<c>doc text;ILoggerFactoryusage is covered by the retainedLogging.Abstractions. I verified against theMicrosoft.Extensions.Http10.0.10 nuspec that it does transitively bringMicrosoft.Extensions.Logging(the implementation) on net10.0, so the CHANGELOG migration note mentioningLoggerFactoryis accurate.XrpcClient.RefreshToken,StandardSiteClient._xrpc/its ctor parameter, orcurrentNonceonSendWithDpopRetryAsync(the DPoP nonce now flows through anupdateNoncecallback at both call sites). The generator's trimmed signatures match their call sites.ServerIntegrationSamplehas the status-code pages handler, thegit mv-edappsettings*.json, the "Auth Method" row (and thepds_url/auth_methodclaim names it reads are whatAtProtoOAuthServicesets), noReconnectModal, and no dangling references to the removed template CSS or imports. Onlybootstrap.min.cssis vendored, with its license banner. TheATProtoNet.Serverreference is retained as explained. slnx and the doc links are updated; the only remainingBlazorOAuthSamplemention is a historical CHANGELOG entry, which is right to leave alone.atproto-lexgen --versionnow readsAssemblyInformationalVersionAttribute, and the new test compiles (the Tests project references the tool project);StartsWithcorrectly tolerates any informational-version suffix..idea/is still ignored (the duplicate line was the one removed) andnupkg/is added.Minor notes, none blocking: the
Console.SetOutswap inLexiconGeneratorProgramTestsis inherently racy with parallel tests, but the filteringAssert.Single(...)mitigates the visible symptom and the risk is contained to test output. Two deferred one-line trims (Aspire.Hosting, SpacesSample) remain as disclosed for their owning PRs.⏱ 6m 6s · 29 steps · $0.1455 · tokens: 519.7k in / 11.8k out (+2034.0k cache-read) · Go: 5h 17% · wk 93% · mo 79%
📜 Full session transcript