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

Source maps? #602

Open
samreid opened this issue Aug 10, 2017 · 7 comments
Open

Source maps? #602

samreid opened this issue Aug 10, 2017 · 7 comments

Comments

@samreid
Copy link
Member

samreid commented Aug 10, 2017

See phetsims/phet-core#28

We are wondering if chipper 2.0 should provide source maps.

@jonathanolson
Copy link
Contributor

It would be nice to have, but may have some extra complexity (multiple source maps would be needed, they would need to be placed in a specific path so they could be read, etc).

@samreid
Copy link
Member Author

samreid commented Aug 11, 2017

Can you describe why multiple source maps would be needed? Would there be a single unmangled JS file before the mangle step that could be used as the sole sourcemap?

@jonathanolson
Copy link
Contributor

Can you describe why multiple source maps would be needed? Would there be a single unmangled JS file before the mangle step that could be used as the sole sourcemap?

Correct, unless we can figure out how to combine source maps (might be possible), we'd have one for each group of code we run uglify on (right now at least twice, once for preloads, once for require.js stuff).

@samreid
Copy link
Member Author

samreid commented Aug 11, 2017

Understood, thanks. We could potentially combine preload + requirejs before uglify or skip sourcemaps on preloads if we think it's less risky.

@jonathanolson
Copy link
Contributor

We could potentially combine preload + requirejs before uglify or skip sourcemaps on preloads if we think it's less risky.

Yes. Right now we have each preload split up (I believe) so we can identify which each one is, but I think having one source-map per HTML file would be significantly improved.

@samreid samreid removed their assignment Aug 11, 2017
@zepumph
Copy link
Member

zepumph commented Oct 12, 2017

@ariel-phet says we seem to not get enough bugs, and hard to replicate ones at that, for this to be worth the time.

Deferring until someone asks for one, or if we find a strong need for one. Removing chipper:2.0 label to go for it later.

@samreid
Copy link
Member Author

samreid commented Aug 26, 2018

From #701

Sam Reid [2:51 PM]
Babel transpile has implications for profiling, I took some notes here: #691 (comment)

Jonathan Olson [2:52 PM]
hmm, interesting. I wonder if there are flags we can provide that would give us better debugging information?

Sam Reid [2:52 PM]
Maybe something to name those anonymous functions?
key: “decayVertical”,
value: function(i0, sign, width) {

would become

key: “decayVertical”,
value: function decayVertical(i0, sign, width) {

Jonathan Olson [2:53 PM]
I know it was decided a while ago that we never wanted to use source maps, but it would help in this case

Sam Reid [2:53 PM]
Is it easy to generate source maps in the babel step?
Or will that obfuscate the profiling anyways?

Jonathan Olson [2:55 PM]
may slightly obfuscate profiling results, but Chrome might be able to show both with/without source maps. I’m not sure, I haven’t used them much
and I believe all of the tooling we use can generate source maps

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

No branches or pull requests

3 participants