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

Split channel.rs into mpsc and ipc files #597

Merged
merged 2 commits into from Nov 27, 2016

Conversation

@dignifiedquire
Copy link
Contributor

dignifiedquire commented Nov 25, 2016

Fixes #573


This change is Reviewable

Fixes #573
}
}
#[cfg(feature = "ipc")]
include!("channel_ipc.rs");

This comment has been minimized.

@emilio

emilio Nov 25, 2016

Member

I'm definitely fine with this, though maybe this could be a bit more idiomatic doing something like:

#[cfg(feature = "ipc")]
mod channel_ipc;
#[cfg(feature = "ipc")]
pub use channel_ipc::*;

(And the same with the mpsc).

It duplicates the cfg, but avoids macros (which may be a bit nicer IMO). What do you think? Happy to concede if people have different opinions on it :)

Also, if you could add a line to .travis.yml to test both configs as part of this PR, that would be awesome.

Thanks!

This comment has been minimized.

@dignifiedquire

dignifiedquire Nov 26, 2016

Author Contributor

Added tests to travis :)

I'm happy to change the imports. I saw the include! already being used in lib.rs so I thought it would be fine (and it was the first way I figured out to make the compiler happy :)
I don't have any strong opinions either way as I am just starting to figure out my way around Rust .

This comment has been minimized.

@dignifiedquire

dignifiedquire Nov 26, 2016

Author Contributor

I am getting error: cannot declare a new module at this location when trying to use the declarations suggested above in channel.rs. Not sure how to make this work, any tips?

This comment has been minimized.

@emilio

emilio Nov 27, 2016

Member

Huh... Well, doesn't matter, as you said, we also use that for serde.

@dignifiedquire dignifiedquire force-pushed the dignifiedquire:refactor/split-channel branch from 7ee7832 to c7de564 Nov 26, 2016
.travis.yml Outdated
- (cd webrender && cargo test --verbose)
- (cd webrender && cargo test --verbose --features "ipc")

This comment has been minimized.

@emilio

emilio Nov 26, 2016

Member

webrender and sample don't have the ipc feature, this is only a webrender_traits thing, so this line and the one below you added should go away.

This comment has been minimized.

@dignifiedquire

dignifiedquire Nov 26, 2016

Author Contributor

done

.travis.yml Outdated
@@ -12,6 +12,9 @@ addons:
- libgles2-mesa-dev
script:
- (cd webrender_traits && cargo test --verbose)
- (cd webrender_traits && cargo test --verbose --features "ipc")

This comment has been minimized.

@emilio

emilio Nov 26, 2016

Member

Please put this line the first one in the script to avoid unnecessary recompiles.

This comment has been minimized.

@dignifiedquire

dignifiedquire Nov 26, 2016

Author Contributor

done

@dignifiedquire dignifiedquire force-pushed the dignifiedquire:refactor/split-channel branch from c7de564 to 7911812 Nov 26, 2016
@emilio
emilio approved these changes Nov 27, 2016
Copy link
Member

emilio left a comment

Looks good, thanks!

}
}
#[cfg(feature = "ipc")]
include!("channel_ipc.rs");

This comment has been minimized.

@emilio

emilio Nov 27, 2016

Member

Huh... Well, doesn't matter, as you said, we also use that for serde.

@emilio
Copy link
Member

emilio commented Nov 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

📌 Commit 7911812 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2016

Test exempted - status

@bors-servo bors-servo merged commit 7911812 into servo:master Nov 27, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test exempted
Details
bors-servo added a commit that referenced this pull request Nov 27, 2016
Split channel.rs into mpsc and ipc files

Fixes #573

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/597)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.