Skip to content
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

Remove all pub use globs #2131

Closed
Manishearth opened this issue Apr 16, 2014 · 7 comments
Closed

Remove all pub use globs #2131

Manishearth opened this issue Apr 16, 2014 · 7 comments

Comments

@Manishearth
Copy link
Member

So Rust seems to be close to removing pub use something::somethingelse::*, where a glob is reexported.

We probably should get onto this quickly and start removing globs.

The globs are listed below:

components/style/properties.rs:14:pub use cssparser::*;
components/style/properties.rs:15:pub use cssparser::ast::*;
components/style/properties.rs:18:pub use parsing_utils::*;
components/style/properties.rs:19:pub use self::common_types::*;
components/style/properties.rs:29:    pub use super::*;
components/style/properties.rs:60:            pub use self::computed_value::*;
components/style/properties.rs:104:            pub use self::computed_value::*;
components/style/properties.rs:148:            pub use self::computed_value::*;
components/style/properties.rs:192:            pub use self::computed_value::*;
components/style/properties.rs:239:            pub use self::computed_value::*;
components/style/properties.rs:283:            pub use self::computed_value::*;
components/style/properties.rs:327:            pub use self::computed_value::*;
components/style/properties.rs:371:            pub use self::computed_value::*;
components/style/properties.rs:418:            pub use self::computed_value::*;
components/style/properties.rs:462:            pub use self::computed_value::*;
components/style/properties.rs:506:            pub use self::computed_value::*;
components/style/properties.rs:550:            pub use self::computed_value::*;
components/style/properties.rs:597:            pub use self::computed_value::*;
components/style/properties.rs:662:            pub use self::computed_value::*;
components/style/properties.rs:692:            pub use self::computed_value::*;
components/style/properties.rs:722:            pub use self::computed_value::*;
components/style/properties.rs:772:            pub use self::computed_value::*;
components/style/properties.rs:817:            pub use self::computed_value::*;
components/style/properties.rs:862:            pub use self::computed_value::*;
components/style/properties.rs:907:            pub use self::computed_value::*;
components/style/properties.rs:957:            pub use self::computed_value::*;
components/style/properties.rs:1001:            pub use self::computed_value::*;
components/style/properties.rs:1045:            pub use self::computed_value::*;
components/style/properties.rs:1089:            pub use self::computed_value::*;
components/style/properties.rs:1139:            pub use self::computed_value::*;
components/style/properties.rs:1244:            pub use self::computed_value::*;
components/style/properties.rs:1309:            pub use self::computed_value::*;
components/style/properties.rs:1372:            pub use self::computed_value::*;
components/style/properties.rs:1439:            pub use self::computed_value::*;
components/style/properties.rs:1482:            pub use self::computed_value::*;
components/style/properties.rs:1537:            pub use self::computed_value::*;
components/style/properties.rs:1581:            pub use self::computed_value::*;
components/style/properties.rs:1626:            pub use self::computed_value::*;
components/style/properties.rs:1670:            pub use self::computed_value::*;
components/style/properties.rs:1716:            pub use self::computed_value::*;
components/style/properties.rs:1791:            pub use self::computed_value::*;
components/style/properties.rs:1839:            pub use self::computed_value::*;
components/style/properties.rs:1953:            pub use self::computed_value::*;
components/style/properties.rs:2018:            pub use self::computed_value::*;
components/style/properties.rs:2081:            pub use self::computed_value::*;
components/style/properties.rs:2157:            pub use self::computed_value::*;
components/style/properties.rs:2201:            pub use self::computed_value::*;
components/style/properties.rs:2253:            pub use self::computed_value::*;
components/style/properties.rs:2351:            pub use self::computed_value::*;
components/style/properties.rs:2417:            pub use self::computed_value::*;
components/style/properties.rs:2477:            pub use self::computed_value::*;
components/style/properties.rs:2516:            pub use self::computed_value::*;
components/style/properties.rs:2622:            pub use self::computed_value::*;
components/style/properties.rs:2685:            pub use self::computed_value::*;
components/style/properties.rs:2743:            pub use self::computed_value::*;
components/style/properties.rs:2884:            pub use self::computed_value::*;
components/style/properties.rs:2949:            pub use self::computed_value::*;
components/style/properties.rs:3014:            pub use self::computed_value::*;
components/style/properties.rs:3087:            pub use self::computed_value::*;
components/style/properties.rs:3152:            pub use self::computed_value::*;
components/style/properties.rs:3211:    pub use super::*;
components/style/properties.rs:3212:    pub use super::longhands::*;
components/style/properties.rs.mako:14:pub use cssparser::*;
components/style/properties.rs.mako:15:pub use cssparser::ast::*;
components/style/properties.rs.mako:18:pub use parsing_utils::*;
components/style/properties.rs.mako:19:pub use self::common_types::*;
components/style/properties.rs.mako:79:    pub use super::*;
components/style/properties.rs.mako:98:            pub use self::computed_value::*;
components/style/properties.rs.mako:963:    pub use super::*;
components/style/properties.rs.mako:964:    pub use super::longhands::*;
components/script/script.rs:45:            pub use self::BindingDeclarations::*;
components/script/script.rs:56:        pub use super::bindings::codegen::InterfaceTypes::*;

And in the submodules:

support/azure/rust-azure/azure.rc:24:pub use azure::*;
support/encoding/rust-encoding/src/lib.rs:20:pub use self::types::*; // reexport
compiler/rust/src/test/compile-fail/privacy1.rs:16:    pub use self::glob::*;
compiler/rust/src/test/compile-fail/privacy2.rs:17:    pub use self::glob::*;
compiler/rust/src/test/compile-fail/privacy3.rs:18:    pub use self::glob::*;
compiler/rust/src/test/compile-fail/privacy4.rs:18:    pub use self::glob::*;
compiler/rust/src/test/compile-fail/lint-missing-doc.rs:158:    pub use internal_impl::globbed::*;
compiler/rust/src/test/run-pass/reexport-star.rs:23:    pub use a::*;
compiler/rust/src/doc/rust.md:855:    pub use quux::foo::*;
compiler/rust/src/libstd/os.rs:1280:    pub use os::consts::unix::*;
compiler/rust/src/libstd/os.rs:1283:    pub use os::consts::windows::*;
compiler/rust/src/libstd/os.rs:1286:    pub use os::consts::macos::*;
compiler/rust/src/libstd/os.rs:1289:    pub use os::consts::freebsd::*;
compiler/rust/src/libstd/os.rs:1292:    pub use os::consts::linux::*;
compiler/rust/src/libstd/os.rs:1295:    pub use os::consts::android::*;
compiler/rust/src/libstd/os.rs:1298:    pub use os::consts::win32::*;
compiler/rust/src/libstd/os.rs:1301:    pub use os::consts::x86::*;
compiler/rust/src/libstd/os.rs:1304:    pub use os::consts::x86_64::*;
compiler/rust/src/libstd/os.rs:1307:    pub use os::consts::arm::*;
compiler/rust/src/libstd/os.rs:1310:    pub use os::consts::mips::*;
compiler/rust/src/libstd/libc.rs:18:* so `pub use std::libc::*` will import the available
compiler/rust/src/libstd/libc.rs:73:pub use libc::types::common::c95::*;
compiler/rust/src/libstd/libc.rs:74:pub use libc::types::common::c99::*;
compiler/rust/src/libstd/libc.rs:75:pub use libc::types::common::posix88::*;
compiler/rust/src/libstd/libc.rs:76:pub use libc::types::common::posix01::*;
compiler/rust/src/libstd/libc.rs:77:pub use libc::types::common::posix08::*;
compiler/rust/src/libstd/libc.rs:78:pub use libc::types::common::bsd44::*;
compiler/rust/src/libstd/libc.rs:79:pub use libc::types::os::common::posix01::*;
compiler/rust/src/libstd/libc.rs:80:pub use libc::types::os::common::bsd44::*;
compiler/rust/src/libstd/libc.rs:81:pub use libc::types::os::arch::c95::*;
compiler/rust/src/libstd/libc.rs:82:pub use libc::types::os::arch::c99::*;
compiler/rust/src/libstd/libc.rs:83:pub use libc::types::os::arch::posix88::*;
compiler/rust/src/libstd/libc.rs:84:pub use libc::types::os::arch::posix01::*;
compiler/rust/src/libstd/libc.rs:85:pub use libc::types::os::arch::posix08::*;
compiler/rust/src/libstd/libc.rs:86:pub use libc::types::os::arch::bsd44::*;
compiler/rust/src/libstd/libc.rs:87:pub use libc::types::os::arch::extra::*;
compiler/rust/src/libstd/libc.rs:89:pub use libc::consts::os::c95::*;
compiler/rust/src/libstd/libc.rs:90:pub use libc::consts::os::c99::*;
compiler/rust/src/libstd/libc.rs:91:pub use libc::consts::os::posix88::*;
compiler/rust/src/libstd/libc.rs:92:pub use libc::consts::os::posix01::*;
compiler/rust/src/libstd/libc.rs:93:pub use libc::consts::os::posix08::*;
compiler/rust/src/libstd/libc.rs:94:pub use libc::consts::os::bsd44::*;
compiler/rust/src/libstd/libc.rs:95:pub use libc::consts::os::extra::*;
compiler/rust/src/libstd/libc.rs:96:pub use libc::consts::os::sysconf::*;
compiler/rust/src/libstd/libc.rs:98:pub use libc::funcs::c95::ctype::*;
compiler/rust/src/libstd/libc.rs:99:pub use libc::funcs::c95::stdio::*;
compiler/rust/src/libstd/libc.rs:100:pub use libc::funcs::c95::stdlib::*;
compiler/rust/src/libstd/libc.rs:101:pub use libc::funcs::c95::string::*;
compiler/rust/src/libstd/libc.rs:103:pub use libc::funcs::posix88::stat_::*;
compiler/rust/src/libstd/libc.rs:104:pub use libc::funcs::posix88::stdio::*;
compiler/rust/src/libstd/libc.rs:105:pub use libc::funcs::posix88::fcntl::*;
compiler/rust/src/libstd/libc.rs:106:pub use libc::funcs::posix88::dirent::*;
compiler/rust/src/libstd/libc.rs:107:pub use libc::funcs::posix88::unistd::*;
compiler/rust/src/libstd/libc.rs:108:pub use libc::funcs::posix88::mman::*;
compiler/rust/src/libstd/libc.rs:110:pub use libc::funcs::posix01::stat_::*;
compiler/rust/src/libstd/libc.rs:111:pub use libc::funcs::posix01::unistd::*;
compiler/rust/src/libstd/libc.rs:112:pub use libc::funcs::posix01::glob::*;
compiler/rust/src/libstd/libc.rs:113:pub use libc::funcs::posix01::mman::*;
compiler/rust/src/libstd/libc.rs:114:pub use libc::funcs::posix08::unistd::*;
compiler/rust/src/libstd/libc.rs:116:pub use libc::funcs::bsd43::*;
compiler/rust/src/libstd/libc.rs:117:pub use libc::funcs::bsd44::*;
compiler/rust/src/libstd/libc.rs:118:pub use libc::funcs::extra::*;
compiler/rust/src/libstd/libc.rs:121:pub use libc::funcs::extra::kernel32::*;
compiler/rust/src/libstd/libc.rs:123:pub use libc::funcs::extra::msvcrt::*;
compiler/rust/src/libstd/rt/local_ptr.rs:26:pub use self::native::*;
compiler/rust/src/libstd/rt/local_ptr.rs:29:pub use self::compiled::*;
compiler/rust/src/libsyntax/ext/quote.rs:38:    pub use ast::*;
compiler/rust/src/libsyntax/ext/quote.rs:39:    pub use parse::token::*;
compiler/rust/src/libsyntax/ext/deriving/generic.rs:192:pub use self::ty::*;
@jdm
Copy link
Member

jdm commented Apr 16, 2014

I think it's probably worth splitting this effort up into several issues (#2127 and #2125 to start; I didn't investigate submodules, but it looks like that's very simple since we can ignore rustc), since the work for script could be fairly involved.

@Manishearth
Copy link
Member Author

I'm doing rust-azure right now.

@Manishearth
Copy link
Member Author

Azure is done, opened a PR for rust-encoding. With that one the submodule work will be over.

What's left:

I might try the mako template later. (Have studying to do tough, don't count on it 😄 )

@frewsxcv
Copy link
Contributor

As far as I know, I don't think public reexported globs are going to be removed in Rust 1.0, so I don't think this issue is necessarily needed anymore.

@jdm
Copy link
Member

jdm commented Apr 26, 2015

Well, I'm still generally in favour of being explicit about these things, so there's no harm in leaving it open for further work.

@frewsxcv
Copy link
Contributor

For what it's worth, I don't think there are anymore cases of these in the tree anyways (unless my method here is wrong)

~/D/r/servo (master|✔) $ find components -name "*.rs" | xargs grep -r "pub use.*\*" | wc
       0       0       0

@jdm
Copy link
Member

jdm commented Apr 27, 2015

Oh, good point!

@jdm jdm closed this as completed Apr 27, 2015
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

No branches or pull requests

3 participants