Skip to content

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

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
DartBot opened this issue Jun 5, 2015 · 8 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="96" height="96"hspace="10"> Issue by nex3
Originally opened as dart-lang/sdk#16061


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 dart-archive/barback#6 is tracking the broader use of this with all transformers.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Marked this as blocking dart-lang/sdk#15830.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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

@DartBot DartBot added type-enhancement A request for a change that isn't a bug Fixed labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added NeedsInfo label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added Started label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added Fixed label.

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

2 participants