-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
FileStore caching under Sprockets 4.x / Issue with digest_path
#642
Comments
Do you have a site I can use to replicate the former issue? As the only way to trace that is to introspect it since there can be a lot of t hings that hit that particular area! |
You said former but since you have a PR I guess for the Upstream caching, I guess you mean the Thanks for the Upstream fix, hope the stuff you've been dealing with is ... going well . Thanks Jordon |
I didn't know I had a PR for the caching issue, that's already fixed on master at bc42508 yes, I do mean the latter with digest_path. |
i'm running into the same digest_path issue with sprockets 4. I narrowed it down to using as far as I can tell, this is what sets jekyll-assets/lib/jekyll/assets/patches/cached_environment.rb Lines 35 to 41 in 056d2c8
so the |
Description
I opened a branch on my blog to try to upgrade jekyll , jekyll-assets and sprockets along with it and I've stumbled onto two issues that I want to run by you. We can split this into two separate issues (sic) but I need to put this down while I remember the details :)
First of all, the important gems I'm running are:
sprockets (~> 4.0.beta7)
jekyll-assets (4.0.0.alpha)
(rev:47fc845853e27af1877691efceba991f20f46526
)jekyll (4.0.0)
Issue with
FileStore
Now, the first issue I got was with the compile time , the whole thing was taking much much much longer than usual, so I took a look at the verbose output.
Turned out that for each post in my blog all the assets were recompiling, which pilled up of course. I opened both
sprockets
andjekyll-assets
gems and narrowed it down to the cache store.The short story is that
Sprockets::Cache
was running withNullStore
despite me having file caching enabled. Digging as to why, it seems that the initialiser there stores a wrapper around the given cache store, but at the selection time it was always pickingNullStore
. The problem there is thatSprockets
was expecting an instance of a cache store, butJekyll-assets
gives it a class instead . So locally what I did was replacewith
And now
Sprockets::Cache
is getting an initialisedFileStore
and caching worked as expected. I assume the issue is the same forMemoryStore
,NullStore
same but the overall effect is the sameIssue with
digest_path
The second issue I got was when
Jekyll::Assets::Env
calledwrite_all
, I was gettingmethod asset_config called on nil class
. Now for this one I didn't dig down enough, but the gist of it is hereThis class overrides the
digest_path
method and does a little test, but for one reason or another, theenvironment
was never set so that would fail. I actually commented it out the method just to get over the line, which it did, but I don't know the consequence of this.I can try to give you more info, this issue is a little bit more undefined , but might be worth sharing just the same!
The text was updated successfully, but these errors were encountered: