Skip to content

Add Dart and Flutter - #8

Open
MaurizioSodano wants to merge 9 commits into
unclebob:masterfrom
Engage-srl:dart-support
Open

MaurizioSodano wants to merge 9 commits into
unclebob:masterfrom
Engage-srl:dart-support

Conversation

@MaurizioSodano

Copy link
Copy Markdown

Adds Dart (and Flutter) to dryer.

  • Candidates match the functions crapper scores (see the crapper PR): functions, methods, getters, setters, operators and factory constructors; no generative constructors, abstract or external members, locals or closures.
  • Dart's signature and body are sibling nodes; the entry spans both.
  • Method and constructor names stay in the fingerprint, including const Padding(...), cascades (..add(1)) and super.initState(). ?. is part of the shape. A string with ${} is not a plain literal.
  • Generated files, .dart_tool, integration_test/ and *_test.dart are skipped; the Dart-only test folders do not affect other languages.

Run on a Flutter monorepo (packages + apps): 1,842 pairs in 16 s.

Tests: tests/test_dart.py (95 total pass). It pins the fingerprints of Java, TypeScript and Python samples, so this change does not alter them. The parse_args CRAP 16 is on master already.

https://claude.ai/code/session_01L2LePAtan3pdyUWbr64gpS

MaurizioSodano and others added 6 commits October 28, 2026 10:46
The Dart commits were written on top of Kotlin: define _INTERPOLATIONS and
the string_literal check, import child_of_type, and drop the Kotlin
fingerprint pins.
Dart and Swift were added at the same insertion points. Kept both, and took
master's consolidated shape where master simplified the code the Dart branch
extended:

- discover.py: master's single _TEST_SUFFIXES list, with `_test.dart` added;
  kept DART_TEST_DIRS and DART_GENERATED_SUFFIXES because Dart's test folders
  and generated files are Dart-only rules.
- astnorm.py: kept master's _INTERPOLATED and _is_literal. Dart's
  `template_substitution` is a separate set scoped to `string`, because folding
  it into _INTERPOLATED would stop treating TypeScript template strings as
  literals and changes their fingerprints.
- extract.py, cli.py, pyproject.toml, README.md: both languages listed.
mathieurousseau and others added 3 commits December 1, 2026 13:54
Brings upstream Swift support into dart-support and fixes the Dart merge typos.

Co-authored-by: Mathieu Rousseau <mathieu.rousseau.31@gmail.com>
The full definition follows _dart_holder; the stub had a docstring and no
body, so Python rebound it silently.

Claude-Session: https://claude.ai/code/session_019tjHW6DS2TihFZdCwmwQnc
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