dart-lang / dart-lang/source_gen

When commenting out a `@GenerateNiceMocks` annotation with `//`, the `build_runner` still tries to process the annotation and generate mocks, causing unexpected errors.

Open
#755 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
494
Forks
115
Avg merge
12h 13m
Merged PRs (30d)
3

Description

// @GenerateNiceMocks([
// MockSpec(),
// ])

Contributor guide

Open the contributing guide

Research direction

The report names the commented @GenerateNiceMocks snippet and build_runner; start by reproducing it in a minimal Dart project and tracing how source_gen discovers annotations. Done means a line-commented annotation is ignored and no mock-generation error occurs, with a regression test covering the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.