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

Include path in hash of file. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josephwarrick
Copy link

#3
This uses the path of the file in addition to the content of the file to ensure that each input file gets cached at a unique location.

It is possible for two separate files to have the same contents but
different data about the file, like path, what module it belongs
to, etc.

This includes the filename and the file contents in the hash that
we calculate to determine uniqueness, so that different files with
the same contents will be cached in different files.
Copy link
Owner

@martinheidegger martinheidegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. As per #3 (comment), i would ask for this PR to make the file hash as an option (default: true) and that option would need a little documentation.

@martinheidegger
Copy link
Owner

Even though #5 or #6 might be fixing the issue described in #3 I still think it might be a good idea to have caching per file-basis as an option. i.e.

console.log(__dirname)

Would need to result in a different output depending on the folder it was stored in.

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.

None yet

2 participants