Ack 2.0: primary-constructor models (analyzer 13.3, generator on Dart 3.13)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reviewing PR #184 and the generator’s existing tests; the issue calls for tests covering /// @description on a primary-constructor parameter and on the class. Check the Minimum Dart SDK CI job and the cited annotation files, ack_model.dart:16 and schemable.dart:11, before the Dart 3.13 generator job. Done means the PR contains only the primary-constructor and analyzer changes, the required checks pass, and the changelog and formatter updates are included.
Written by the indexing model from the issue text.
Description
Tracking issue for primary-constructor models, deferred from 1.7 to 2.0.
The work
#184 adds @Schemable() on a Dart primary constructor:
/// @description Which habit a screen is about.
@Schemable()
final class HabitDto({
/// @description A saved habit's id.
required final String habitId,
}) with _$HabitDtoAck;
Reading a primary constructor requires analyzer ^13.3.0, which moves ack_generator to Dart 3.13. Core ack keeps its Dart 3.9 minimum. That move is why this is held for 2.0.
What 1.7 takes from #184 instead
The analyzer-independent part lands separately in the 1.7 line: the annotations move into ack, the ack_annotations package is removed, and @Schemable() is the single annotation. #184 stays open for the rest.
Before this can merge
- Rebase #184 onto
mainonce the 1.7 part has landed, so it contains only the primary-constructor and analyzer changes. - Fix the "Minimum Dart SDK" check: Dart 3.9 flags doc-comment links to the deprecated annotations (
ack_model.dart:16,schemable.dart:11). Until it passes, the Dart 3.13 generator job never runs in CI. - Add a generator test for a
/// @descriptiontag on a primary-constructor parameter and on the class. - Record in the changelog that the generated mixin's abstract getters require
@overrideon a model's fields. - Format the branch with the Dart 3.13 formatter. About half of #184's current diff is that reformat; a first commit with only the toolchain bump and
dart formatkeeps the rest reviewable. - Consumers that share a workspace with another generator need that generator on analyzer 13.3 too.
mix_generator2.2.0 declaresanalyzer >=9.0.0 <11.0.0, and it does not compile on 13.3 as is:FieldElement.isSyntheticwas removed in analyzer 11 (mix_generator/lib/src/modifier_generator.dart:64).
Related
- #184: the pull request.
- #185: types that carry their own schema.
- #186: JSON Schema Draft 2020-12, also 2.0.
- Dominant language
- Dart
- Stars
- 64
- Forks
- 3
- Avg merge
- 17h 32m
- Merged PRs (30d)
- 33
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from btwld/ack
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
2.0 enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
2.0 enhancement
Difficulty 5/5 Over a week Newbie friendliness 18/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
ccch1mneyyy/dsh-Go#1682 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 1/5 Under an hour Newbie friendliness 76/100
pesaclarity/ujumbe-parsers#64 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
patarapolw/lingua_srs#278 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dreautall/waterfly-iii#890 · 1 comment ·
Maintainers usually reply within 1 day