rails/sass-rails — comment on commit 0b435834bc37e26c016f2d29885ca3bfe08ae827
File:  line 0
By jeremy:

Happens when precompiling assets. Frustratingly, it's easy to repro in my app, but I couldn't get a minimal repro going in sass-rails tests or in a sample app.

I'm referencing an asset path in `foo.js.erb`: `<%= asset_path 'application.css' %>`. This JavaScript is compiled before the stylesheet, so, after this commit, referencing the asset path forces `application.css` to be compiled.

Any import in `application.css` throws a circular require error. With just `@import "foo";` in `application.css`, I see asset lookups for both `foo` and `foo.css` logical paths. These resolve to the same path, hence the error.

Pretty confusing; I'll need to step through in a debugger to see what's actually going on.