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

Infinite .couscous/generated loop + excludes ignored #183

Open
geekish opened this issue Nov 18, 2016 · 5 comments
Open

Infinite .couscous/generated loop + excludes ignored #183

geekish opened this issue Nov 18, 2016 · 5 comments

Comments

@geekish
Copy link

geekish commented Nov 18, 2016

I'm getting an infinite loop of directories e.g. .couscous/generated/.couscous/generated/....

Couscous also appears to be ignoring my excludes, e.g. bower_components. I tried both the %gitignore% and listing every directory/file and neither worked. I'm not sure if this is the cause of the infinite loop, a side effect, or an unrelated bug.

I tried using both my global install and a fresh, local couscous.phar. Same result.

@mnapoli
Copy link
Member

mnapoli commented Nov 20, 2016

@geekish that's weird, .couscous is added manually here: https://github.com/CouscousPHP/Couscous/blob/master/src/Model/Project.php#L136 Is that a public repository that I could try? Are you running the command with the --target option or with a different directory specified (i.e. running the command outside of the repository directory)?

@geekish
Copy link
Author

geekish commented Nov 20, 2016

I did a bit of retesting yesterday and I seem to be able to prevent the infinite loop from happening if I run couscous clear before couscous preview/generate. I was using the default directory.

I'm noticing though that excludes are not taken into account in the LoadAssets step or the ProcessTwigFiles step, where new instances of Finder are used.

@mnapoli
Copy link
Member

mnapoli commented Nov 21, 2016

Right because (IIRC) the template is in a sub-directory, so excludes apply to the root directory, do you have customized the template directory? And what about the 2 other questions?

@geekish
Copy link
Author

geekish commented Nov 22, 2016

I was trying to preview a template in its own directory using template: ., so it wasn't in a subdirectory. I can definitely see how that could cause problems, but I saw it in the repo for Template-Light so I thought I'd see if it worked.

As for running the command I was used a global composer install of couscous, and couscous.phar, both from directly inside the template repository, with no special options/flags.

The repository isn't public because it's a WIP, but I will be sure to test template: ., and actually copying the template directory into the project I'm designing it for.

@indrakaw
Copy link

indrakaw commented Jun 9, 2017

Same here. I was testing https://github.com/CouscousPHP/Template-Basic
And here the result:
screenshot from 2017-06-09 14-07-19

Pretty big. You may check the disk usage: du -h . @ https://u.teknik.io/EvACG.txt

As @geekish said, after I removed these on couscous.yml

template:
    directory: .

It works fine.

$ ./vendor/bin/couscous preview 
Generating /home/indrakaw/workplace/Template-Basic to /home/indrakaw/workplace/Template-Basic/.couscous/generated
[notice] Fetching template from https://github.com/CouscousPHP/Template-Light.git
Server running on http://127.0.0.1:8000

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

No branches or pull requests

3 participants