Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Dependencies script triggers infinite loop #1

Closed
samaretti opened this Issue · 4 comments

3 participants

@samaretti

I'm seeing Closure's base.js doing an import of deps.js. This, in turn, seems to trigger a loop, whereby deps.js is being imported infinitely. I can get around it by setting CLOSURE_NO_DEPS to true.

Wondering if you had encountered this? I used your readme example on a bare Rails project.

@igrigorik
Owner

Hmm, that's an odd one - nope, haven't stumbled into that one myself. What do your main rails configs look like? (gist?)

@sutherland

It's a fresh Rails app. All of the configs are default, except the Gemfile which I trimmed down.

I've published the app here: https://github.com/sutherland/blog

(FYI: Same guy, different Github account)

@igrigorik
Owner

Hmm, well not sure if there really is a clean fix for this. If we also include the closure-compiler gem then it should work transparently when it processes the results of the pipeline (when set to advanced optimization). Otherwise, I think we just have to add the solution you highlighted:

    <script type="text/javascript">
      var CLOSURE_NO_DEPS = true;
    </script>

That should go in application.html.erb above the javascript_include tag.

@igrigorik
Owner

Added a note about this in readme, closing.

@igrigorik igrigorik closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.