-
-
Notifications
You must be signed in to change notification settings - Fork 746
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest #7353
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
Conversation
|
Thanks for your pull request and interest in making D better, @alexandrumc! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#7353" |
|
Won't this break compiling user programs with |
No, because parsing doesn't have anything to do with valid definitions. Semantic analysis checks if the referred symbols are defined or not, but it is not done on the |
Sorry for using the wrong term :)
Meaning, DMD will not look inside Then, the question is, why not make |
Sure, a design decision must be made. However, we have to take into account the fact that |
…essary overhead when compiling with -unittest
30a20a5 to
bb62aac
Compare
| endif | ||
|
|
||
| UDFLAGS=-unittest | ||
| UDFLAGS=-unittest -version=StdUnittest -version=CoreUnittest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why include druntime's unittests with CoreUnittest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phobos uses https://github.com/dlang/druntime/blob/9baf9735c923a9bbb72b8e4ee05f513ea0499bbc/src/core/time.d#L120-L123 to run its unittests. But that version (unittest) will change into version (CoreUnittest) (dlang/druntime#2902), so the flag has to be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, -unittest cascades into druntime. Thanks for the explaination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should now be not necessary with my changes to dlang/druntime#2902.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in #7356.
Related to dlang/druntime#2888