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

Stop DirectoryWatcher from watching the destination directory #862

Merged
merged 6 commits into from
Mar 17, 2013

Conversation

parkr
Copy link
Member

@parkr parkr commented Mar 16, 2013

@svnpenn noticed that the change in 7457cba didn't actually fix the problem it was meant to. The mix of absolute and relative paths in the method caused the issue. I believe my fix here works and I added a couple tests to ensure the method runs as intended.

@mattr-, any input on the tests would be awesome. I'm used to Rspec's "describe-context" mix so the "context-should" was a bit awkward for me. :)

There was often a mix between absolute and relative paths and in the
previous version, the destination argument was usually an absolute
path where the glob array (from Dir['*']) was a relative path.
parkr added a commit that referenced this pull request Mar 17, 2013
Stop DirectoryWatcher from watching the destination directory
@parkr parkr merged commit 6c1a08c into master Mar 17, 2013
@parkr parkr deleted the fix-autogen-dest-prob branch March 17, 2013 19:48
parkr added a commit that referenced this pull request Mar 17, 2013
@jwebcat
Copy link

jwebcat commented Mar 24, 2013

@parkr this is still happening with Jekyll beta using ruby 2.0.0 on Windows 7

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn I will post a screenshot in a minute. The weirdest thing is sometimes it works fine until you change a file then it starts regenerating the files over and over it never stops. What's crazy is if you only change one file it regenerates a hunk of files like 50-70 but all different amounts every regeneration every two seconds. After I post my screenshot you well see what I mean.
Then sometimes it just regenerates the same number of files (60) in a continuous loop.

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@parkr @svnpenn when I run Jekyll beta latest with ruby 2.0.0 it gives me the following warning before executing any command.
DL is deprecated please use fiddle
I Have fiddle gem installed. That doesn't fix the warning.
Everything else seems to work perfectly Jekyll build and serve are working as expected. Just the --watch command is acting crazy and regenerating in an endless loop.
Do you think it has something to do with this run time warning?
Jekyll latest stable is working perfectly with ruby 2.0.0 on the same machine.

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn my bad :( I do want tohelp. I will post the full version numbers along with a screenshot as soon as I get home.

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn OK.

by Jekyll beta latest, I mean jekyll 1.0.0.beta1
by Jekyll stable latest I mean, Jekyll 0.12.1

I will refer to them in full from now on anyways just for clarity.

I am using jekyll 1.0.0.beta1 with Ruby 2.0.0 on Windows 7

If I run jekyll serve -w then it generates the site starts the server then gets stuck in a loop.

jekyll-1 0 1-beta-1-onstart

If I run jekyll build then it generates the site fine.

then I run jekyll serve -w and it generates the site starts the server and waits for changes.

jekyll-1 0 1-beta-1-afterbuild

But, Then If I make a change to any file it will regenerate that file then get stuck in the loop like

jekyll-1 0 1-beta-1-afterbuild-afterchange

The weird part is that it keeps regenerating a different number of files sometimes.

here is my _config.yml

config-snapshot

and here is my local gem list for ruby 2.0.0 (in three parts there are no repetitions in any photo)

jekyll-partial-gem-list-1

jekyll-partial-gem-list-2

jekyll-partial-gem-list-3

When I was using Jekyll 0.12.1 with Ruby 2.0.0 everything was working fine.

If I use Ruby 1.9.3 with Jekyll 0.l2.1 on the same project it works perfectly.

-- If I use jekyll 1.0.0.beta1 with Ruby 1.8.7 then it does the same thing as Ruby 2.0.0 except for no warning about: DL is deprecated please use Fiddle here is the output from Ruby 1.8.7 with jekyll 1.0.0.beta1

jekyll-1 0 1-beta-1-ruby-1 8 7

Another Thing. How are you supposed to exclude folders that are not in the root of the project?

in my _config.yml if I try to exclude the assets/sass like below

exclude: [assets/sass, mixture.json]

then it doesn't work and it generates the sass folder in _site

if I leave off the assets directory then it works as expected like:

exclude: [sass, mixture.json]

Then it excludes the sass folder inside assets/sass. This is what I am trying to achieve, yet this doesn't seem right.

Now If I have a folder named sass in the root of my project and a folder named sass at assets/sass it excludes them both. Neither of the sass folders are generated to _site on build.

If try to just exclude the assets/sass directory like below Jekyll ignores me and includes them both

exclude: [assets/sass, mixture.json]

I have also tried the following variations of the exclude

exclude: [assets/sass/, mixture.json]

#and

exclude: ["assets/sass", "mixture.json"]

#and

exclude: ["/assets/sass/", "mixture.json"]

the quotes didn't seem to make a difference. In the wiki it show the exclude with no quotes.

What is the correct way to exclude a directory that isn't in the root and keep the one that is in the root with the same name? It seems strange that if you specify a file or folder that Jekyll will exclude it from every directory that is in the root folder. Is this the expected behavior of exclude?

Am I missing something? Thanks for all your hard work guys I appreciate ya'll

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn ok I fixed the above here is the version copy and pasted from my shell

jekyll 1.0.0.beta1

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn you happy? can I be taken seriously now?

I am new to GitHub and would like to be helpful.

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn thanks for your help.

anyways I am installing jekyll 1.0.0.beta2 now I will see if the problem is fixed.

@jwebcat
Copy link

jwebcat commented Mar 25, 2013

@svnpenn the re generation problem is fixed in jekyll 1.0.0.beta2
The exclude issue is still happening though. Perhaps I should move that to its own issue?
@parkr @svnpenn thanks for all your work on this project you guys :)

@parkr
Copy link
Member Author

parkr commented Mar 25, 2013

@jwebcat If there is another problem, let's talk about that in a new issue :-)

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants