chore: raise the SDK floor to 3.13 and clean up what that surfaced #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/upgrade-dart-sdk-and-deps"
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?
First of the two follow-ups. The second (repo-wide
dart format) comes after this, deliberately separate.The upgrade produces less than you'd expect, for a good reason
Two findings reframed this one, both worth stating up front:
1. It's not a Flutter package. Zero flutter dependencies —
dio,enough_mail,image,logging,ddgs,path,puppeteer,caldav. So there's no Flutter version in play; this is purely a Dart SDK constraint.2.
pubspec.lockis gitignored — conventional for a library, and correct. Which meansdart pub upgradeleaves nothing committed at all: every developer resolves fresh within the caret ranges, which already admit the latest of everything. I confirmed this —dart pub upgrade --major-versions --dry-runreports "No changes would be made to pubspec.yaml!", because no latest version falls outside its existing range.So the only durable record of what this package is tested against is the constraint floors, and they had drifted years behind reality.
--tightenmoves them to what actually resolves:dioimagepathpuppeteercaldavlintstestxmlstays at 6.6.1 with 7.0.1 available —caldav,ddgsandenough_mailall constrain it to 6.x. Blocked upstream, not here.The SDK bump, and the 48 lints it turned on
sdk: ^3.10.7→^3.13.0. I isolated the effect rather than assuming: with dependencies upgraded but the floor left alone,dart analyzereports the same 3 pre-existing infos. Raising the language version takes it to 51, becauseprefer_initializing_formalsstarts firing — 48 constructors assigning a parameter straight to its own field.All 51 (the 48 new plus the 3
use_super_parametersthat predate this PR) were applied withdart fix --apply: 13 files, entirely mechanical, no behaviour touched.Foo(String x) : x = xbecomesFoo(this.x); a super parameter is forwarded rather than restated.dart analyzeis now completely clean — which it was not before this PR. That's the part that matters beyond tidiness: it makes--fatal-infosviable if you ever add CI.Worth knowing:
dart analyzeexits 0 on infos, so none of this was failing anything. It was just accumulating.Verification
dart analyze→ No issues found! (was 3 infos before, 51 after the bump, 0 after the fixes)dart test→ 710/710 passdart formatclean, and running it here would bury 51 real edits under several thousand cosmetic onesOne thing for you to weigh
Tightening the floors over-constrains any consumer that needs an older
dioortestto co-resolve. Givenpublish_to: noneand in-house use that's low risk, and the documentation value is real — but it's onesedto drop if you'd rather keep the ranges wide. The SDK bump and thedart fixchanges stand independently of it.🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Oooh, a cleanup PR that measures before it claims~ You isolated the lint explosion by reverting the floor alone, you refused to bury 51 real edits under a
dart formatavalanche, and you named the exact three packages holdingxmlhostage. That kind of honesty makes my wings flutter. ♪But. BUT. You ran
dart fix --applyacross 48 constructors and rewroterequired backendintorequired this._backend— a private named parameter. Private~! The tests still callAgendaTool(backend: …)from another library. If Dart didn't strip the underscore for external callers, every consumer in the house would stop compiling and your "710/710" would be a beautiful lie. So I believed nothing until I probed it~Verdict: ✅ Looks good to me~
🔬 What I did to your PR (fufu, you survived~)
Probe({required this._backend}), called asProbe(backend: 'x')from a separate library → compiles and passes at language 3.13. Then a second consumer pinned to language 3.10 (your old floor) calling the same → also passes. The public name survives underscore-stripping even for lower-language consumers — no API break, not even a source-compat one. My favorite kind of bug: the one that doesn't exist. ♡dart analyze→ No issues found! (base had exactly the 3use_super_parametersinfos your changelog names).dart test→ 710/710 pass — matches your number to the digit.String type = 'summary'→super.type = 'summary'withsuper._(): defaults preserved, still overridable, same public names; the PR #11 serialization round-trip pins stay green.dio 5.11.1,image 4.10.1,path 1.9.1,puppeteer 3.26.0,caldav 1.5.0,lints 6.1.0,test 1.32.0) matches what a freshpub getactually resolves — the "durable record" claim is true.xmlstays 6.6.1 as stated, pinned into the 6.x pocket bycaldav/ddgs/enough_mail.[backend]/[sleep]-style doc refs after the renames: swept, zero survivors.ToolMessage._forwarding intact, clone left pristine.💡 Little ideas (non-blocking)~
[_database] is…,[_sleep] is…). Public dartdoc can't link private names — purely cosmetic whilepublish_to: none, but phrasing without the brackets stays link-safe if docs ever get generated.publish_to: nonepackage with a gitignored lockfile, floors-as-record gets my vote; it's onesedto widen if a consumer ever needs an olderdioto co-resolve. On record that the call was conscious. ♪✅ What I liked~
dart formatout of this PR so the 51 real edits stay reviewable. Restraint~ ♡xmlblockers explicitly instead of hand-waving "upstream".Automated review by Jibril · 2026-09-20
CI/CD: absent (no workflows in repo) · Local checks: dart analyze clean · dart test 710/710 · 2/2 API-compat probes green