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

std: Rename io to old_io #21543

Merged
merged 3 commits into from
Jan 27, 2015
Merged

std: Rename io to old_io #21543

merged 3 commits into from
Jan 27, 2015

Conversation

alexcrichton
Copy link
Member

In preparation for the I/O rejuvination of the standard library, this commit
renames the current io module to old_io in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each old_io module is replaced it will be deprecated in-place for new
structures in std::{io, fs, net} (as appropriate).

This commit does not leave a reexport of old_io as io as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from io to
old_io.

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

Note that this hasn't quite finished bootstrapping yet (lots of tests to take care of), but wanted to get this out there as I'll probably finish by the time it hits bors :)

@alexcrichton
Copy link
Member Author

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned brson Jan 23, 2015
@aturon
Copy link
Member

aturon commented Jan 23, 2015

@bors: r+ 0e646ce

And so it begins.

@flaper87
Copy link
Contributor

🎉

@sfackler
Copy link
Member

@alexcrichton would this be a good time to rename write to write_all as well?

@alexcrichton
Copy link
Member Author

@sfackler I talked with @aturon on IRC about this and we were basically on the fence about that now. Taking the strategy of old_io draws a clear line between the old readers/writers and it's less clear to me that the rename is needed. It is still a bit of a porting hazard either way, but it requires breaking many Writer implementations today (and then re-breaking them later).

@untitaker
Copy link
Contributor

Could anybody point me to design issues with the current io module? Which problems are so urgent that they would warrant a rewrite?

@aturon
Copy link
Member

aturon commented Jan 23, 2015

This is part of io reform.

It's not really a "rewrite", more a reorganization and slimming down of APIs (though there are a few deeper changes.)

@sfackler
Copy link
Member

@alexcrichton so my concern is that when IO reform lands, people are going to update their trait imports, see it compiles and call it a day. Even if someone's aware of the change to write, there's a nonzero chance they'll miss a write -> write_all change or two, which won't be noticed until it subtly breaks things.

@aturon
Copy link
Member

aturon commented Jan 23, 2015

@sfackler @alexcrichton OK, I'm basically persuaded by @sfackler's argument. It's another relatively easy breaking change (like the old_io change) but could help prevent much more aggravating breakage later.

Want to roll that into this PR before it hits bors?

@alexcrichton
Copy link
Member Author

@bors: r=aturon 7960221

@alexcrichton
Copy link
Member Author

@bors: r=aturon a1bfa26

@bors
Copy link
Contributor

bors commented Jan 24, 2015

⌛ Testing commit a1bfa26 with merge 618ec0e...

bors added a commit that referenced this pull request Jan 24, 2015
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
@bors
Copy link
Contributor

bors commented Jan 24, 2015

💔 Test failed - auto-mac-64-opt

@alexcrichton
Copy link
Member Author

@bors: r+ c4f1d89

bors added a commit that referenced this pull request Jan 25, 2015
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
@bors
Copy link
Contributor

bors commented Jan 25, 2015

⌛ Testing commit c4f1d89 with merge 55967d7...

@bors
Copy link
Contributor

bors commented Jan 25, 2015

💔 Test failed - auto-mac-64-opt

@alexcrichton
Copy link
Member Author

@bors: r=aturon 93d2352

@bors
Copy link
Contributor

bors commented Jan 26, 2015

⌛ Testing commit 93d2352 with merge 231825c...

@bors
Copy link
Contributor

bors commented Jan 26, 2015

💔 Test failed - auto-linux-64-nopt-t

@alexcrichton
Copy link
Member Author

@bors: r=aturon 39690eb

@bors
Copy link
Contributor

bors commented Jan 26, 2015

⌛ Testing commit 39690eb with merge dbc7ad0...

@bors
Copy link
Contributor

bors commented Jan 26, 2015

💔 Test failed - auto-mac-64-opt

@bors
Copy link
Contributor

bors commented Jan 26, 2015

💔 Test failed - auto-win-64-nopt-t

In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
In preparation for upcoming changes to the `Writer` trait (soon to be called
`Write`) this commit renames the current `write` method to `write_all` to match
the semantics of the upcoming `write_all` method. The `write` method will be
repurposed to return a `usize` indicating how much data was written which
differs from the current `write` semantics. In order to head off as much
unintended breakage as possible, the method is being deprecated now in favor of
a new name.

[breaking-change]
@alexcrichton
Copy link
Member Author

@bors: r=aturon 5d836cd

@bors
Copy link
Contributor

bors commented Jan 27, 2015

⌛ Testing commit 5d836cd with merge a6a6fad...

bors added a commit that referenced this pull request Jan 27, 2015
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
@bors bors merged commit 5d836cd into rust-lang:master Jan 27, 2015
renato-zannon added a commit to renato-zannon/racer that referenced this pull request Jan 27, 2015
This makes racer compile again as of rustc 1.0.0-dev (d77f6d536 2015-01-27 11:07:26 +0000)

See rust-lang/rust#21543 for details
renato-zannon added a commit to renato-zannon/racer that referenced this pull request Jan 27, 2015
This makes racer compile again as of rustc 1.0.0-dev (d77f6d536 2015-01-27 11:07:26 +0000)

See rust-lang/rust#21543 for details
@alexcrichton alexcrichton deleted the old-io branch February 4, 2015 18:04
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.

8 participants