std.math and std.stdio: use more selective imports#4361
Merged
DmitryOlshansky merged 1 commit intodlang:masterfrom May 27, 2016
joakim-noah:imports
Merged
std.math and std.stdio: use more selective imports#4361DmitryOlshansky merged 1 commit intodlang:masterfrom joakim-noah:imports
DmitryOlshansky merged 1 commit intodlang:masterfrom
joakim-noah:imports
Conversation
| void test(Terminator)(string txt, in string[] witness, | ||
| KeepTerminator kt, Terminator term, bool popFirstLine = false) | ||
| { | ||
| import std.array : array; |
Contributor
Author
There was a problem hiding this comment.
This was being pulled in by a public import inside the import of std.range above, got rid of that import and made this explicit here.
Member
|
LGTM |
1 similar comment
Contributor
|
LGTM |
…he current symbols imported at the module level, done by checking with ddmd.
Contributor
Author
|
Removed comment about whether test was worthwhile, passes auto-tester. |
Contributor
|
LGTM, let's go? |
Member
|
Auto-merge toggled on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea is that once leaking of symbols from module-level selective imports is considered fixed, ie in all downstream code too, and its use is enabled, someone can make the commented out symbols at the top selective and these modules won't have the compiler searching for any symbols afterwards. These changes were made by hacking ldc to dump all the symbols that it had to search for (as described previously with dmd and done before for
std.stdio), and then making them either selective or adding them to the commented out list at the top of the module, if the symbol was needed at module scope.