-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for associating source-maps with assets in barback #12339
Comments
I think we'll ultimately want some sort of special URL for accessing intermediate (or at least source) versions of files. As long as we support in-place transforms, there's not going to be a natural URL for retrieving the source file. For example, if you run the observable transform on "package:myapp/myapp.dart" and it produces a post-transform "package:myapp/myapp.dart", accessing "/packages/myapp/myapp.dart" will always have to return the post-transformation version. Explicitly naming versions is tricky, because that can change from run to run if the configuration of transformers changes. We could just expose a black box URL, but that still screws with caching. Maybe the best option is to only support special access to the on-disk sources (since that's what users are editing anyway) via something like "/_sources/packages/myapp/myapp.dart", then use sourcemap composition to generate the correct sourcemaps for pipelined transformations. cc @munificent. |
Marked this as blocking #12340. |
What are your thoughts on an API to support source-maps. Maybe we can add the API and later do the implementation details? One idea from John: like 'addOutput' also have 'addSourceMap' so that barback has all the details it needs to recognize that the sourcemap is associated with a particular input? cc @jmesserly. |
I don't think we want to commit to an API before we have a comprehensive plan for source maps. I don't think it would provide much benefit anyway. |
fyi -- I made a change recently to Polymer, that made source maps less important for us. We now generate code that preserves line numbers. (Your @observable fields just become a long line w/ getter+setter+field) |
Added Accepted label. |
Removed Library-Barback label. |
This issue has been moved to dart-archive/barback#6. |
See comments in this CL:
https://codereview.chromium.org/22396004/diff2/3001:23001/pkg/observe/lib/transform.dart?column_width=80
Source-maps need to point to the asset before it was transformed, but barback doesn't necessarily expose intermediate assets.
I'm openinig this bug to brainstorm and track progress on this.
Some ideas:
- source-map composition (see issue #11783)
- exposing in pub-serve intermediate assets using a special URL (for instance, path?version=x)
The text was updated successfully, but these errors were encountered: