Create interface for module names and paths
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
**Background**
The debugger needs to keep track of module data to store and retrieve informations about js modules, such as module names, their relative paths as served by the asset server, matching script ids in chrome, paths for dart sources, source maps, and locations in dart code. Module name and dart file server path are often used as keys in debugger's internal tables.
**The issue**
Some of module information comes from chrome, and some from the compiler, and depending on asset server configuration, the paths might not necessarily match and need to be converted from one representation to another, with some information needed for conversion not readily available.
For example, we record script ids by module name, but need to guess the module name from js file path at the time when we store moduleName->scriptId record.
Currently debugger is tuned to understand build_runner configuration so table keys agree, but changing to another scenario (such as frontend server in flutter or tests) breaks that balance, requiring "re-tuning" of the debugger to work in all scenarios.
**Suggestion**
Define interface that supplies module information that debugger needs, and implement it for every distinctive configuration.
**Related issues**
https://github.com/dart-lang/sdk/issues/41852
Contributor guide
Research direction
No files or tests are named. Start by tracing the debugger's module data and how Chrome and the compiler provide names, paths, script IDs, source maps, and Dart locations, then read related issue 41852. Done means a defined module-information interface has implementations for each distinctive configuration and avoids configuration-specific key retuning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, javascript
- Domain
- developer-experience, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100