Skip to content

Conversation

@markus1189
Copy link
Contributor

Currently stack init takes into account all .cabal files in the cwd as well as non-ignored sub directories. If I run it on the stack project it will for example also pick up the new-template.cabal
and refuse all of the available build plans due to unresolved packages like acme-dont that are used in some of the integration tests.

With the new flag stack init --ignore-subdirs it will only consider stack.cabal and not recurse into sub directories.

To allow this I added a boolean flag to findCabalFiles which I don't like that much but I avoided to define a data type for the argument (e.g data FindCabalRecurse = DoRecurse | Don'tRecurse) for simplicity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just passed in True here, can someone have a look if this might be problematic if init was called with the --ignore-subdirs flag?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, this looks completely correct to me.

snoyberg added a commit that referenced this pull request Jun 27, 2015
Add --ignore-subdirs flag to init command
@snoyberg snoyberg merged commit 7db9424 into commercialhaskell:master Jun 27, 2015
@snoyberg
Copy link
Contributor

Thank you!

snoyberg added a commit that referenced this pull request Jun 27, 2015
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.

2 participants