Skip to content
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

HelloWorld sample source maps support #10

Open
axls opened this issue Nov 15, 2018 · 6 comments
Open

HelloWorld sample source maps support #10

axls opened this issue Nov 15, 2018 · 6 comments

Comments

@axls
Copy link
Contributor

axls commented Nov 15, 2018

Does the current version of j2cl support sourcemaps?

Chrome's DevTool doesn't show HelloWorld.java in sources list. Also I see next log output in terminal when launching dev server through ibazel:

INFO: 750µs /0:0:0:0:0:0:0:1:38796 404 GET /HelloWorld.js.map

It seems like reference to the sources presents in js, but the web server cannot find requested resource.

@jDramaix
Copy link
Member

Yes, J2CL has sourcemaps support. The web server used in the example is serving correctly the file. We will fix that.

@jDramaix jDramaix added the bug label Nov 15, 2018
@jDramaix jDramaix self-assigned this Nov 15, 2018
@gkdn
Copy link
Member

gkdn commented Nov 16, 2018

@jDramaix making source map work is not a small project. web_library in rules_closure needs to understand and serve files from zip files first.

Let's leave this to contributors for now. If nobody takes care of it by the time and eventually that part of the problem will go away with the tree artifacts.

@gkdn
Copy link
Member

gkdn commented Nov 8, 2019

As an update; we are actively working switching from zip files to TreeArtifacts so after that this should be easier to address.

@niloc132
Copy link
Contributor

niloc132 commented Nov 8, 2019

Worth pointing out perhaps that closure-compiler's BUNDLE mode presently doesn't handle sourcemaps at all, see google/closure-compiler#3247. In that issue, I link the patch we're using in our closure-compiler fork so that j2cl-maven-plugin can provide sourcemaps in dev mode. This is not a perfect solution, but probably will suffice until BUNDLE gets to be more efficient or is replaced in the maven plugin.

@treblereel
Copy link
Contributor

@gkdn maybe you have any updates? Thanks

@niloc132
Copy link
Contributor

For what its worth, with only very minor changes, our patch to closure-compiler has cleanly rebased over the last several years so that this always works in maven/gradle. Bazel adoption seems light, due at least to this and j2cl unit tests still being no-ops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants