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

Add --all-subpackages option on test command #1876

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

shoo
Copy link
Contributor

@shoo shoo commented Feb 12, 2020

Related: #1873
I'd rather test subpackages recursively.

This will conflict with #1873. Therefore, further editing is required after merging #1873.
Maybe it needs to have a consistent command name as well.

@dlang-bot
Copy link
Collaborator

Thanks for your pull request and interest in making D better, @shoo! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

@andre2007
Copy link
Contributor

andre2007 commented Feb 13, 2020

I am not sure whether I understand the new functionality. The term recurse confuses me because I thought a dub root package can only have a flat list of sub packages, no hierarchy.

Also if I am not completely wrong, by executing dub test on a root package, the unittests of sub packages will already run today.

@shoo
Copy link
Contributor Author

shoo commented Feb 14, 2020

I am not sure whether I understand the new functionality. The term recurse confuses me because I thought a dub root package can only have a flat list of sub packages, no hierarchy.

I propose --all-subpackages as the next idea.

Also if I am not completely wrong, by executing dub test on a root package, the unittests of sub packages will already run today.

Unfortunately, it doesn't seem to be the case. The test I wrote shows that.
https://github.com/shoo/dub/blob/7891ab47fd98df0b385ef7800069248dec4df770/test/test-recurse-subpackages.sh#L28

If the root package depends on a subpackage, and build with --build-mode=allAtOnce, the subpackage will be tested as well. And also, in that case, it can test with #1873.
But, the root package does not always depend on subpackages.


PS. It doesn't matter much about this pull request, but please let me know for later study. Why are subpackages flat? Is there a design reason for not having a nested structure like sub-sub-package?

@shoo shoo changed the title Add --recurse-subpackages option on test command Add --all-subpackages option on test command Feb 26, 2020
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.

3 participants