-
Notifications
You must be signed in to change notification settings - Fork 33
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
Anchor excludes to start of string. Fixes #44. #46
base: master
Are you sure you want to change the base?
Conversation
Before this change, excluding a directory (`bin`) would also exclude posts that include that name (`scrubbing`), which is very unexpected. While this may start listening to files that were previously ignored, it more closely matches the behaviour of jekyll on it's initial build (which _would_ include `scrubbing`). The consequences of being overly aggressive on listening to changes seem less important than missing something. This change is a bandaid. A proper fix would be to unify with Jekyll's exclusion logic (Jekyll::EntryFilter maybe?) to ensure they will always be the same. In the meantime, it _may_ be advisable to not include Jekyll's `exclude` config in the watchers ignore list and take the hit of overly aggressive reloads. I leave that decision to someone more experienced than I.
Can you please add a test case where you assert that a file is left alone that you intend to leave alone? |
yeah I'll have a go, might not be until the weekend though |
Please take a look now. There wasn't any prior art for this so I had to make something up. I changed the existing adjacent spec to be consistent with new method, though didn't change the entire file. (In general it does a lot of "check the config is set to what I wanted" rather than "does this config achieve the behaviour I want"). |
Yeesh, we really let this sit here a while. Sorry about that! My initial hesitation (which is maybe why I didn't respond) is how this affects files in a subdirectory. If I want to ignore If you're still interested in this PR, I'd gladly accept it if you can clarify my question above ☝️ . Thanks for your patience! |
Before this change, excluding a directory (
bin
) would also exclude poststhat include that name (
scrubbing
), which is very unexpected.While this may start listening to files that were previously ignored, it
more closely matches the behaviour of jekyll on it's initial build
(which would include
scrubbing
). The consequences of being overlyaggressive on listening to changes seem less important than missing
something.
This change is a bandaid. A proper fix would be to unify with Jekyll's
exclusion logic (Jekyll::EntryFilter maybe?) to ensure they will always
be the same. In the meantime, it may be advisable to not include
Jekyll's
exclude
config in the watchers ignore list and take the hitof overly aggressive reloads. I leave that decision to someone more
experienced than I.