Skip to content

Feat/migrate to dart 3.7 analyzer 9#3

Open
abdalraheemKshinba wants to merge 4 commits into
erabti:mainfrom
abdalraheemKshinba:feat/migrate-to-dart-3.7-analyzer-9
Open

Feat/migrate to dart 3.7 analyzer 9#3
abdalraheemKshinba wants to merge 4 commits into
erabti:mainfrom
abdalraheemKshinba:feat/migrate-to-dart-3.7-analyzer-9

Conversation

@abdalraheemKshinba

Copy link
Copy Markdown

No description provided.

@mohn93 mohn93 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mnawer ya champ

Comment thread jserializer/pubspec.yaml Outdated
type_plus:
git:
url: https://github.com/erabti/jserializer_library.git
url: https://github.com/abdalraheemKshinba/jserializer_library.git

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's better to reference the main repo in here

final ModelConfig modelConfig;

String get className => classElement.name;
String get className => classElement.name ?? '';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this affects the behavoir of what is depending on this, @erabti i guess this needs your review

name: jserializer_generator
description: A starting point for Dart libraries or applications.
version: 1.1.1
description: Code generator for jserializer - serialization done right.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one

path: jserializer/
merging_builder:
git:
url: https://github.com/abdalraheemKshinba/jserializer_library.git

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be careful of referencing different repos in the same repo

build_runner: ">=2.4.4<3.0.0"
dart_style: ^3.0.1
analyzer: ">=8.0.0 <10.0.0"
build: ">=3.0.0 <5.0.0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's better

- Update all packages to SDK >=3.7.0 <4.0.0
- Migrate to analyzer >=8.0.0 <10.0.0
- Update source_gen to >=4.0.0 <5.0.0
- Update build to >=3.0.0 <5.0.0
- Fix all breaking API changes:
  - TypeChecker.fromRuntime -> TypeChecker.fromUrl
  - Element.name returns String? (add null assertions)
  - parameters -> formalParameters
  - enclosingElement3 -> enclosingElement
  - getDisplayString(withNullability:) -> getDisplayString()
  - PropertyAccessorElement -> GetterElement
  - ParameterElement -> FormalParameterElement
  - library.definingCompilationUnit -> library.firstFragment
  - param.metadata -> param.metadata.annotations
- Add caching optimizations to generator and type resolver
- Remove tracked IDE and system files, add .gitignore
- Internal git refs point to erabti:main

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abdalraheemKshinba abdalraheemKshinba force-pushed the feat/migrate-to-dart-3.7-analyzer-9 branch from a93a3b4 to 56591cc Compare May 19, 2026 14:46
Internal jserializer and merging_builder git refs now point to the
fork's migration branch instead of erabti:main, since the migration
changes haven't been merged upstream yet. Once PRs erabti#3 and erabti#5 are
merged into erabti/jserializer_library main, these refs should be
updated back to erabti:main.
The generator code references safeLookup for safe field lookup
configuration, but the annotation class was missing this parameter.
The caching optimization from the perf PR could miss annotated classes
from libraries loaded after stabilization. Revert to always loading
the full library list for each annotated file.
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.

2 participants