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

Breakout #4

Merged
merged 2 commits into from
Jan 21, 2015
Merged

Breakout #4

merged 2 commits into from
Jan 21, 2015

Conversation

qrush
Copy link
Owner

@qrush qrush commented Jan 21, 2015

Broke out ports and commands to modules.

I don't know why I can't move the regexp extern lines to start.rs. I tried to download the nightly to see if it was resolved and rust-lang/rust#21456 happened. I think this is an OK start though, what say you @carols10cents ?

@steveklabnik
Copy link
Collaborator

I don't know why I can't move the regexp extern lines to start.rs

extern crate needs to go in the crate root, that way, Rust can know everything that you need to link to by just examining one file. It's possible that nowadays, Cargo might be able to figure it out anyway, but this behavior is pre-cargo. I think we have an RFC to relax this...

@qrush
Copy link
Owner Author

qrush commented Jan 21, 2015

Which extern crate exactly? Because if you put it in the root (main.rs) and take it out of ports.rs for example, it does not compile.

@steveklabnik
Copy link
Collaborator

All extern crates should be in the root, and Rust should warn you otherwise. Buutttttttt if you're not seeing that, time to look through the commit logs...

@qrush
Copy link
Owner Author

qrush commented Jan 21, 2015

Nope, it complains massively and won't compile at all if you attempt to move things out. Maybe I set up the packages/mod/folders wrong. I'd be happy to screenshare later tonight to show if that helps.

@steveklabnik
Copy link
Collaborator

let me actually grab the source and see what's up

@steveklabnik
Copy link
Collaborator

ahhh so rust-lang/rust#18219 and rust-lang/rust#20179 should certainly make the behavior i'm talking about nicer, but it's strange because it seems to already be behaving that way...

@qrush qrush merged commit 1e90af8 into master Jan 21, 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

Successfully merging this pull request may close these issues.

2 participants