fix: Lock socket_io_client version to 3.1.2 to fix breaking compiler …#507
fix: Lock socket_io_client version to 3.1.2 to fix breaking compiler …#507Mahdijamebozorg wants to merge 2 commits into
Conversation
| pdfrx: ^2.4.3 | ||
| flutter_inappwebview: ^6.1.5 | ||
| socket_io_client: ^3.1.2 | ||
| socket_io_client: 3.1.2 |
There was a problem hiding this comment.
pubspec.lock still resolves 3.1.4, not 3.1.2
The committed pubspec.lock still pins socket_io_client to 3.1.4 (the sha256 and version fields are unchanged from the base commit). Any CI pipeline running dart pub get --enforce-lockfile — which many reproduce-build setups use — will fail immediately because 3.1.4 doesn't satisfy the new exact constraint 3.1.2. The lock file must be regenerated with flutter pub get and committed alongside this change for the fix to be complete and for the lock file to match what the PR description claims was already done.
| pdfrx: ^2.4.3 | ||
| flutter_inappwebview: ^6.1.5 | ||
| socket_io_client: ^3.1.2 | ||
| socket_io_client: 3.1.2 |
There was a problem hiding this comment.
Using an exact pin (
3.1.2) completely blocks any future patch releases that fix unrelated bugs. A tighter upper bound accomplishes the same goal of excluding the broken 3.1.5 while still allowing safe earlier patches.
| socket_io_client: 3.1.2 | |
| socket_io_client: ">=3.1.2 <3.1.5" |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…k output size by 20 MB

Description
This PR hard-locks the
socket_io_clientdependency to exactly version3.1.2by removing the caret (^) prefix inpubspec.yaml.The Problem
We were previously using
socket_io_client: ^3.1.2. Due to the caret notation,flutter pub getwas silently pulling the latest minor patch version (3.1.5).However, the package maintainers introduced a severe SemVer violation in
3.1.5by completely removing or hiding the publicHttpClientAdapterarchitecture and thesetHttpClientAdapterhelper method onOptionBuilder. This was causing local and CI/CD builds to fail with compilation errors:The method 'setHttpClientAdapter' isn't defined for the type 'OptionBuilder'The name 'HttpClientAdapter' isn't definedThe Solution
^fromsocket_io_clientinpubspec.yamlto lock it strictly to3.1.2.pubspec.lockto ensure the correct working version is pinned for all environment setups.Type of Change
How Has This Been Tested?
flutter pub get, and verified that version3.1.2is successfully pulled.Greptile Summary
This PR's stated goal is to hard-pin
socket_io_clientto3.1.2to avoid a breaking change introduced in3.1.5, but it also bundles a significant Android toolchain migration (Gradle 8→9, AGP 8→9, Kotlin 2.2→2.3) and several undocumented dependency changes.socket_io_clientcaret removed to lock version to exactly3.1.2;pubspec.lockshould be verified to match (see existing thread).flutter_inappwebviewsilently upgraded from stable^6.1.5to beta^6.2.0-beta.3without documentation, introducing a pre-release dependency into production.kotlinOptionsmoved to a top-levelkotlin { compilerOptions }block andpackagingOptionsadded;META-INF/LICENSE*exclusion anduseLegacyPackaging = truewarrant review.Confidence Score: 4/5
The core socket_io_client pin is straightforward, but the undocumented bump of flutter_inappwebview to a beta release introduces a pre-release dependency into production that warrants attention before merging.
The flutter_inappwebview upgrade from stable ^6.1.5 to beta ^6.2.0-beta.3 is undocumented and ships a pre-release library in production — this is the main risk. The Android toolchain jump (AGP 8→9, Gradle 8→9) is significant but appears self-consistent.
pubspec.yaml (undocumented beta upgrade to flutter_inappwebview); android/app/build.gradle.kts (useLegacyPackaging and license exclusions)
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[pubspec.yaml] -->|socket_io_client| B["3.1.2 (exact pin, was ^3.1.2)"] A -->|flutter_inappwebview| C["^6.2.0-beta.3 ⚠️\n(was ^6.1.5 stable)"] D[settings.gradle.kts] -->|AGP| E["9.0.1 (was 8.11.1)"] D -->|Kotlin Android| F["2.3.20 (was 2.2.20)"] G[gradle-wrapper.properties] -->|Gradle| H["9.1.0 (was 8.14.3)"] I[build.gradle.kts] -->|ndkVersion| J["flutter.ndkVersion\n(was hardcoded 29.0.14206865)"] I -->|kotlinOptions| K["Commented out\nMoved to top-level kotlin {}"] I -->|packagingOptions added| L["META-INF exclusions\njniLibs useLegacyPackaging=true ⚠️"] M[gradle.properties] -->|kotlin.incremental| N["false (build slowdown)"]Reviews (2): Last reviewed commit: "feat: added flutter 3.44 compatibility c..." | Re-trigger Greptile