Skip to content

pub build: javascript lacks release information and sourceMappingURL #765

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 · 19 comments
Closed
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

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


Using Pub version 1.1.0-edge.31027

But with the attached installed dependencies

I'm getting the map files generated, which is great, but I need to manually add sourceMappingURL at the bottom of the generated JS to get Chrome to see them

...also nice to have the compiler version at the top, but that's less important


Attachment:
pubspec.lock (2.37 KB)

@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


Bouncing over to dart2js since this is a request to add something to the generated JS.


Removed Library-Barback label.
Added Area-Dart2JS label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


FYI: when I do a normal dart2js (even minimized) I still get the build info at the top and sourceMappingURL at the bottom.

Curious why the output from pub/barback would lack this.

Is it something w/ options passed (or not passed) into dart2js?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5689005?v=3" align="left" width="48" height="48"hspace="10"> Comment by peter-ahe-google


Removed Area-Dart2JS label.
Added Area-Pub label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5689005?v=3" align="left" width="48" height="48"hspace="10"> Comment by peter-ahe-google


The user of the compiler library decides were to put the source maps. Consequently, the compiler library expects that the user appends the sourceMappingURL.

@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


Consequently, the compiler library expects that the user appends the sourceMappingURL.

Ah, OK. We can handle that then. Thanks for clarifying!

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) Fixed labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5689005?v=3" align="left" width="48" height="48"hspace="10"> Comment by peter-ahe-google


I should probably mention that this is the current behavior.

Right now, the compiler API uses a "CompilerOutputProvider" to return an EventSink<String>. It would make sense to change the API so that the compiler library also becomes aware of the URI corresponding to this EventSink so that it can information such as sourceMappingURL.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5689005?v=3" align="left" width="48" height="48"hspace="10"> Comment by peter-ahe-google


Filed issue dart-lang/sdk#15607.

@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


Marked this as being blocked by dart-lang/sdk#15607.

@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


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

@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


Issue #839 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Can I ask us to consider this issue for Milestone 1.2? I'm trying to integrate pub serve into my workflow, but this bug makes it very hard to do so. Without source maps, debugging is very difficult. Thanks for the consideration!

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Also, trying to get a good mobile dev workflow, and pub serve could be a real win. But I extra-need source maps for mobile since we don't produce builds of Dartium for Android. :)

@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


Seth: You might want to make this plea on issue dart-lang/sdk#15607, since that's where work needs to happen to get this supported.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Roger that, thanks for the pointer.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5689005?v=3" align="left" width="48" height="48"hspace="10"> Comment by peter-ahe-google


Marked this as being blocked by dart-lang/sdk#17259.
Unmarked this as being blocked by dart-lang/sdk#15607.

@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.
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


This is fixed now.

It should work with both pub serve and pub build. Note that with pub build, you'll need to do --mode debug to get our Dart source files copied over to the build output where the browser can find them.


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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


Thanks Bob!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants