Skip to content

Fix DartMappable parser compilation error via version alignment - #884

Closed
trevorwang with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-retrofit-parser-error
Closed

Fix DartMappable parser compilation error via version alignment#884
trevorwang with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-retrofit-parser-error

Conversation

Copilot AI commented Dec 28, 2025

Copy link
Copy Markdown
Contributor

retrofit_generator 10.2.1 references Parser.DartMappable enum value that doesn't exist in published retrofit 4.9.0, causing build failures.

Changes

  • retrofit: Bump to 4.9.1, finalize DartMappable parser support in changelog
  • retrofit_generator: Bump to 10.2.3, require retrofit: ^4.9.1 to ensure compatible version

The Parser enum already contains DartMappable in source; this aligns published package versions so the generator doesn't reference missing enum values.

// Parser enum in retrofit/lib/http.dart (already present)
enum Parser {
  JsonSerializable,
  MapSerializable,
  DartJsonMapper,
  DartMappable,  // Referenced by generator but missing in published 4.9.0
  FlutterCompute,
}
Original prompt

This section details on the original issue you should resolve

<issue_title>case retrofit.Parser.DartMappable</issue_title>
<issue_description>Describe the bug
Flutter version:
Flutter 3.38.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f6ff1529fd (12 days ago) • 2025-12-11 11:50:07 -0500
Engine • hash c108a94d7a8273e112339e6c6833daa06e723a54 (revision 1527ae0ec5) (11 days ago) • 2025-12-11 15:04:31.000Z
Tools • Dart 3.10.4 • DevTools 2.51.1

retrofit: ^4.9.1
retrofit_generator: ^10.2.0
build_runner: ^2.10.4

I run the command dart run build_runner watch --delete-conflicting-outputs then it is throwing an error

dart run build_runner watch --delete-conflicting-outputs
build_runner
E ../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:1140:36: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:1225:36: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:1303:36: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:1512:34: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:2135:36: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:2178:32: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/retrofit_generator-10.2.1/lib/src/generator.dart:2234:36: Error: Member not found: 'DartMappable'.
case retrofit.Parser.DartMappable:
...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…tor to 10.2.3

Co-authored-by: trevorwang <121966+trevorwang@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix case retrofit.Parser.DartMappable issue Fix DartMappable parser compilation error via version alignment Dec 28, 2025
Copilot AI requested a review from trevorwang December 28, 2025 03:15
@trevorwang

Copy link
Copy Markdown
Owner

@copilot relbase to latest master

Copilot AI commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot relbase to latest master

The rebase cannot be completed cleanly because master already includes the DartMappable fix in versions 4.9.2 (retrofit) and 10.2.4 (generator) with the proper dependency retrofit: ^4.9.2.

This PR attempted to add versions 4.9.1 and 10.2.3, which are now superseded by the versions already in master. The issue has been resolved in master, so this PR can be closed.

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.

case retrofit.Parser.DartMappable

2 participants