Skip to content

DDC with kernel only uses the basename for the library  #36736

@jakemac53

Description

@jakemac53

Currently in the webdev vm service proxy we run an eval like this to get the library names for a module:

require('dart_sdk').dart.getModuleLibraries("example/hello_world/main") (this corresponds to an example/hello_world/main.dart file).

Previously, this would have given us a library uri of hello_world/main.dart, but in kernel mode it gives a library name of just main.dart (note that neither include the example top level directory).

This causes issues for the vm service because we report a uri for the root library that doesn't correspond to one on disk. That translates into the source failing to load in the debug pane in devtools.

It happens to work out nicely how it acted before (just trimming the first top level directory), because we only serve top level directories. However it feels weird for ddc to do anything specific to webdev/build_runner as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions