Skip to content

Avoid recompiling std when tests change in std::net#75108

Closed
tesuji wants to merge 6 commits into
rust-lang:masterfrom
tesuji:seprate-tests
Closed

Avoid recompiling std when tests change in std::net#75108
tesuji wants to merge 6 commits into
rust-lang:masterfrom
tesuji:seprate-tests

Conversation

@tesuji

@tesuji tesuji commented Aug 3, 2020

Copy link
Copy Markdown
Contributor

I moved ui tests to their own files.
It's best when review commit by commit.

I could squash them all if requested.
r? @KodrAus

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 3, 2020
@tesuji tesuji changed the title Avoid recompilation when tests change in std::net Avoid recompiling std when tests change in std::net Aug 3, 2020
@KodrAus

KodrAus commented Aug 4, 2020

Copy link
Copy Markdown
Contributor

Thanks @lzutao!

It looks like we don’t have a really consistent approach to organizing tests here in std, is there anything special about these ones to move them into separate files or is the plan to work through other modules and do the same thing?

@tesuji

tesuji commented Aug 4, 2020

Copy link
Copy Markdown
Contributor Author

I am modifying things in #75110 . It is kind of painful when I only change tests to investigate fall outs in that PR
but std is recompiled.

@tesuji

tesuji commented Aug 6, 2020

Copy link
Copy Markdown
Contributor Author

@KodrAus Should I open an MCP on compiler team repo to enforce tests module in separate file?

@bors

bors commented Aug 12, 2020

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #75019) made this pull request unmergeable. Please resolve the merge conflicts.

@KodrAus

KodrAus commented Aug 12, 2020

Copy link
Copy Markdown
Contributor

Should I open an MCP on compiler team repo to enforce tests module in separate file?

I wasn't actually aware that moving #[cfg(test)] modules into a separate file could save recompiling the main crate when only that test file changes. If that's the case then it seems like that would be worth doing! We could try re-organize more of std's tests to resemble the way they're done in core?

@tesuji

tesuji commented Aug 27, 2020

Copy link
Copy Markdown
Contributor Author

Reopened the proposal in #75979.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants