Skip to content

Fix for issue #4366, plug leaking of glob imports #5113

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

Closed
wants to merge 3 commits into from

Conversation

alexcrichton
Copy link
Member

The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler.

The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules.

There was quite a lot of fallout, and it all passes make check locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed.

I plan on making another patch soon which changes the default level of unused_imports to warn which will hopefully reduce a lot of the use noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of warn is actually really usable.

@catamorphism
Copy link
Contributor

Sorry @alexcrichton , but do you mind rebasing?

@alexcrichton
Copy link
Member Author

No problem, just rebased.

@catamorphism
Copy link
Contributor

Lovely, thanks!

@catamorphism
Copy link
Contributor

I'll rebase it for you this time, since you've already had to do it once :-)

@alexcrichton
Copy link
Member Author

Oh it's fine, I've been rebasing as things have been pushing to incoming, I just pushed a rebased version of the commits again.

@catamorphism
Copy link
Contributor

Thanks!

bors added a commit that referenced this pull request Feb 28, 2013
The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler.

The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules.

There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed.

I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.
@bors bors closed this Mar 1, 2013
@alexcrichton
Copy link
Member Author

I think that #4366 can also be closed now?

@catamorphism
Copy link
Contributor

Yes, and thanks for your effort!

@alexcrichton
Copy link
Member Author

Thanks for the awesome language and being so open to contributions :)

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