-
-
Notifications
You must be signed in to change notification settings - Fork 747
Remove version(unittest) imports to avoid extra imports in user code. #6450
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, @schveiguy! 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#6450" |
| assert(r[0 .. lo].all!(x => !lt(p, x))); | ||
| assert(r[hi + 1 .. r.length].all!(x => !lt(x, p))); | ||
| // this used to import std.algorithm.all, but we want to save | ||
| // imports when unittests are enabled if possible. |
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.
I added the comment here to prevent regression.
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.
Shouldn't this be version (StdUnittest) anyway?
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.
StdUnittest was reverted because apparently -deps includes all unittests and thus usage of StdUnittest caused breakage for projects using -deps
|
ping @marler8997 here's the first one. |
|
4cfe9bc to
f2e5222
Compare
|
@JackStouffer fixed Edit: also fixed missing style space (grrr....) |
f2e5222 to
adaba54
Compare
|
FYI @marler8997 I have a few more modules to do, they are the tougher/more controversial ones. Will get to them next week. |
Having imports in
version(unittest)blocks means that user code being unit tested will also import these files incurring a compile-time penalty.Should help with dlang/dmd#8124 a bit, at least for the
version(unittest)portion.I will submit more PRs for the rest of Phobos, I wanted to make these PRs small and reviewable.