Skip to content

Comments

std.math and std.stdio: use more selective imports#4361

Merged
DmitryOlshansky merged 1 commit intodlang:masterfrom
joakim-noah:imports
May 27, 2016
Merged

std.math and std.stdio: use more selective imports#4361
DmitryOlshansky merged 1 commit intodlang:masterfrom
joakim-noah:imports

Conversation

@joakim-noah
Copy link
Contributor

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.

void test(Terminator)(string txt, in string[] witness,
KeepTerminator kt, Terminator term, bool popFirstLine = false)
{
import std.array : array;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DmitryOlshansky
Copy link
Member

LGTM

1 similar comment
@JackStouffer
Copy link
Contributor

LGTM

…he current symbols imported at the module level, done by checking with ddmd.
@joakim-noah
Copy link
Contributor Author

Removed comment about whether test was worthwhile, passes auto-tester.

@wilzbach
Copy link
Contributor

LGTM, let's go?

@DmitryOlshansky
Copy link
Member

Auto-merge toggled on

@DmitryOlshansky DmitryOlshansky merged commit b173b32 into dlang:master May 27, 2016
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.

4 participants