Skip to content

"pub serve" should provide the ability to look up mappings between source and output lines #16061

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

Closed
nex3 opened this issue Jan 13, 2014 · 9 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@nex3
Copy link
Member

nex3 commented Jan 13, 2014

It should be possible (via the "pub serve" websocket API) to provide the server with a source file and line number and get the corresponding output URL and line number, and vice versa.

This particular bug is intended to track the bare minimum feature set necessary to provide parity with the editor's current server. Specifically, it only needs to support Dart inputs and outputs with no transformers in between. Issue #12339 is tracking the broader use of this with all transformers.

@nex3
Copy link
Member Author

nex3 commented Jan 13, 2014

Marked this as blocking #15830.

@munificent
Copy link
Member

Removed Priority-Unassigned label.
Added Priority-Medium label.

@munificent
Copy link
Member

Set owner to @munificent.
Removed Type-Defect label.
Added Type-Enhancement, Started labels.

@munificent
Copy link
Member

Hey, Keerti and/or Devon!

Can you sketch out what kind of Web Socket API you'd like to see for this?

Do you want a mapping from source file to served URL, or vice versa? Both? Do you need column information or just lines?


cc @keertip.
cc @devoncarew.

@munificent
Copy link
Member

Added NeedsInfo label.

@munificent
Copy link
Member

Talked about it with Keerti this morning. My understanding is that the Editor needs mapping in both directions:

  1. Given a package name, a relative path to a source file on disc within that package, and a line number, return the URL to the corresponding output for that file as is served by pub serve along with the matching line number in the output file.
  2. Given a URL for an output asset and a line number, return the package name, relative path and line number for the source file that corresponds to that asset.

Ex. package "foo", path: "some/path.dart" <-> "/packages/foo/some/path.dart"

We're OK with only supporting .dart files that are not transformed (or at least not transformed in a way that affects line numbering) for a first-pass implementation of this.

Keerti, does that sound right? Do you need column information too, or just lines?

@munificent
Copy link
Member

Added Started label.

@munificent
Copy link
Member

Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#813.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants