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

Have "stack init" accept a list of sub-directories #1593

Closed
mgsloan opened this issue Jan 3, 2016 · 4 comments
Closed

Have "stack init" accept a list of sub-directories #1593

mgsloan opened this issue Jan 3, 2016 · 4 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Jan 3, 2016

Currently, there's no way to selectively consider cabal files for init. I think it makes sense to have it take a list of sub-directories to search in, defaulting to .. This'd be consistent with stack build taking a list of sub-directories and building all projects in those sub-directories.

The --ignore-subdirs flag would still work - it'd mean that cabal files in sub-directories of the specified dirs are ignored.

I'd hope that this would work with bash expansion, so that if you do stack init --ignore-subdirs *, it'd build all the packages that are immediate subdirs (to faciliate this, merely warn when a path to a file is specified).

@harendra-kumar
Copy link
Collaborator

That's cool!

@hackeryarn
Copy link
Contributor

@mgsloan Is there any difference between how build would handle the --ignore-subdirs flab and the expected init handling of this flag?

If there are no differences, I will go ahead and get started on this one over the weekend.

@mgsloan
Copy link
Contributor Author

mgsloan commented Jan 8, 2016

Well, build doesn't take --ignore-subdirs. It's not very useful for build, because usually you only use directory arguments when you have a dir that contains lots of packages (but not all of them). In the case where you'd use --ignore-subdirs with init, you may as well just specify the target normally, using the package name.

But, yes, how build 's handles directory arguments is the same as how this would. I doubt there will be opportunity for code reuse there, but I could be wrong (haven't looked).

Great, certainly feel free to work on this! Particularly timely, as @harendra-kumar 's large set of changes to init / solver just got merged.

@harendra-kumar
Copy link
Collaborator

Fixed by PR #1780 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants