DartProject.current doesn't work within a unit test.
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 265
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
The problem is that DartProject.current first calls Script.current.
When we are running in a unit test Script.current returns 'test.dart' which results in a bogus
DartProject.
Need to review how we detect the project as we have several different operation modes:
From local source
Compiled script
Running under a unit test.
Contributor 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.
Research direction
Start by tracing DartProject.current and its call to Script.current. Reproduce the behavior in a unit test, then compare project detection for local source, compiled scripts, and unit-test execution. Done means DartProject.current identifies the correct project in all three operation modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100