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

Seriously maybe no absolute paths in cache #111

Merged
merged 1 commit into from
Aug 26, 2015

Conversation

schneems
Copy link
Member

Previous pull requests (#92 & #101) did not properly "compress": links, stubbed, or required keys in the metadata. Also external processors can put arbitrary in the metadata hash, we now have a convention where anything that ends in _dependencies such as sass_dependencies will also be compressed. This change properly compresses and expand uris.

Targeted at 4.x

We also need to expand uris in the fetch_asset_from_dependency_cache before they are resolved to generate a digest. We must also make sure to compress them before they are stored back in the cache. There might be a better place to put this logic somewhere in the future, but for now it makes sense to put both expansion and compression in the same method, though this does mean we have to "compress" the dependencies twice.

Tests are written that will fail without this patch and pass with it. The "stubbed" and "required" sets in the metadata are not directly exposed, we must use private methods to observe them. I think it is better to do this for now, I believe this file has some refactor potential in the future, but don't want to mix bug fixes with refactoring.

Previous pull requests (#92 & #101) did not properly "compress": `links`, `stubbed`, or `required` keys in the metadata. Also external processors can put arbitrary in the metadata hash, we now have a convention where anything that ends in `_dependencies` such as `sass_dependencies` will also be compressed. This change properly compresses and expand uris.

We also need to expand uris in the `fetch_asset_from_dependency_cache` before they are resolved to generate a digest. We must also make sure to compress them before they are stored back in the cache. There might be a better place to put this logic somewhere in the future, but for now it makes sense to put both expansion and compression in the same method, though this does mean we have to "compress" the dependencies twice.

Tests are written that will fail without this patch and pass with it. The "stubbed" and "required" sets in the metadata are not directly exposed, we must use private methods to observe them. I think it is better to do this for now, I believe this file has some refactor potential in the future, but don't want to mix bug fixes with refactoring.
schneems added a commit that referenced this pull request Aug 26, 2015
Seriously maybe no absolute paths in cache
@schneems schneems merged commit b7ec65b into master Aug 26, 2015
@rafaelfranca rafaelfranca deleted the schneems/fix-metadata-relative-4.x branch November 11, 2015 17:35
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

Successfully merging this pull request may close these issues.

1 participant