filenames in dart2js sourcemaps shouldn't expose the location of the Dart SDK #20259
Labels
closed-obsolete
Closed as the reported issue is no longer relevant
dart2js-sourcemap
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
web-dart2js
This issue was originally filed by bslesinsk...@gmail.com
The filenames in sourcemaps use a relative path to the Dart SDK. This exposes the location of the Dart SDK on the local machine where the Dart app was built. For example:
"sources": ["../../../software/dart/dart-sdk/lib/_internal/lib/interceptors.dart","../../../software/dart/dart-sdk/lib/_internal/lib/js_array.dart","../../../software/dart/dart-sdk/lib/internal/iterable.dart","../../../software/dart/dart-sdk/lib/collection/list.dart",
It would be better hide the location by going through a symlink, as is already done for packages:
ln -s ../../../software/dart-sdk .
"sources": ["dart-sdk/lib/_internal/lib/interceptors.dart","dart-sdk/lib/_internal/lib/js_array.dart","dart-sdk/lib/internal/iterable.dart","dart-sdk/lib/collection/list.dart",
Then we can deploy the sourcemap by copying the dart.js.map file and all the source files it references to the website. This would allow the entire Dart app to be debuggable just by opening Chrome Dev Tools, even without the Dart SDK installed locally.
It would also make the output of the dart2js compiler more deterministic. Currently the sourcemap file will be different depending where the developer happens to install the SDK.
Followup to:
https://code.google.com/p/dart/issues/detail?id=7903
The text was updated successfully, but these errors were encountered: