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

Reintroduce directory modules #4116

Closed
brson opened this issue Dec 5, 2012 · 5 comments
Closed

Reintroduce directory modules #4116

brson opened this issue Dec 5, 2012 · 5 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Dec 5, 2012

As part of #2176 I removed directory modules from the language. As a result, crates make heavy use of #[path] to create directory structure.

We probably do want to have some directory convention that rustc understands.

Here's one idea: the mod foo; statement continues to be the only way to load external modules. The parser looks for foo.rs and foo/mod.rs. If either exists then it loads it, otherwise error.

This assumes that we like the mod.rs convention. I haven't decided yet.

@nikomatsakis
Copy link
Contributor

I believe we agreed in a meeting to stick with the mod.rs convention
(which is also compatible with graydon's proposed rustpkg conventions)

@nikomatsakis
Copy link
Contributor

Not critical for 0.6; removing milestone

@brson
Copy link
Contributor Author

brson commented Apr 16, 2013

Additional mailing list discussion https://mail.mozilla.org/pipermail/rust-dev/2013-February/003204.html

@brson
Copy link
Contributor Author

brson commented Apr 16, 2013

I would like to nominate this for a milestone. It is important for usability.

Let's also remove all the redundant uses of #[path].

brson added a commit to brson/rust that referenced this issue Jul 22, 2013
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate
an error when both are found.
@brson
Copy link
Contributor Author

brson commented Jul 24, 2013

Done

@brson brson closed this as completed Jul 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants