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

Re-frame is leaking metadata, perhaps? #365

Closed
stoeckley opened this issue Jul 14, 2017 · 3 comments
Closed

Re-frame is leaking metadata, perhaps? #365

stoeckley opened this issue Jul 14, 2017 · 3 comments

Comments

@stoeckley
Copy link

This does not happen with a vanila reagent build, but it does with reframe. I get lines like this in the compiled advanced compilation:

(ce,"/Users/andrew/projects/ajs/NONCPP/cljstest/reframe3/target/cljsbuild-compiler-1/cljs/core.cljc")

David Nolen via Slack suggested that this is a leak of meta data happening in re-frame, and that I should post an issue here.

This happens with a hello-world reframe build, no logic of my own added.

@mike-thompson-day8
Copy link
Contributor

Can you give more information on what you mean by "A hello-world re-frame build" ? Does that mean you used a template?

@stoeckley
Copy link
Author

stoeckley commented Jul 14, 2017

I'm using the re-frame lein template. I've narrowed down the problem. Observe:

~/projects/ajs/NONCPP/cljstest lein new re-frame metaleak
Generating re-frame project.
~/projects/ajs/NONCPP/cljstest cd metaleak/
~/projects/ajs/NONCPP/cljstest/metaleak lein cljsbuild once min
Compiling ClojureScript...
Compiling "resources/public/js/compiled/app.js" from ["src/cljs"]...
Successfully compiled "resources/public/js/compiled/app.js" in 14.405 seconds.

Then also:

~/projects/ajs/NONCPP/cljstest lein new re-frame metaleak2 +re-frisk
Generating re-frame project.
~/projects/ajs/NONCPP/cljstest cd metaleak2/
~/projects/ajs/NONCPP/cljstest/metaleak2 lein cljsbuild once min
Compiling ClojureScript...
Compiling "resources/public/js/compiled/app.js" from ["src/cljs"]...
Jul 14, 2017 3:23:09 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/andrew/projects/ajs/NONCPP/cljstest/metaleak2/target/cljsbuild-compiler-1/cljs/compiler.js:559: WARNING - References to the global RegExp object prevents optimization of regular expressions.
cljs.compiler.emit_constant.cljs$core$IMultiFn$_add_method$arity$3(null,RegExp,(function (x){
                                                                        ^

Jul 14, 2017 3:23:09 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s)
Successfully compiled "resources/public/js/compiled/app.js" in 193.626 seconds.

Note the huge difference in compilation time: wow!

But -- the metadata leakage does not happen in the first build, without re-frisk. It does appear in the second build (along with the odd compiler warning).

So perhaps I should move this issue to re-frisk?

@stoeckley
Copy link
Author

closing this issue since it will be handled by the re-frisk repo

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

2 participants