Skip to content

std: Rename io to old_io - #21543

Merged
bors merged 3 commits into
rust-lang:masterfrom
alexcrichton:old-io
Jan 27, 2015
Merged

std: Rename io to old_io#21543
bors merged 3 commits into
rust-lang:masterfrom
alexcrichton:old-io

Conversation

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @brson

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

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
Member Author

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned brson Jan 23, 2015
@alexcrichton
alexcrichton force-pushed the old-io branch 5 times, most recently from ebfbdf9 to 0e646ce Compare January 23, 2015 06:02
@aturon

aturon commented Jan 23, 2015

Copy link
Copy Markdown
Contributor

@bors: r+ 0e646ce

And so it begins.

@flaper87

Copy link
Copy Markdown
Contributor

🎉

@sfackler

Copy link
Copy Markdown
Member

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

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
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

aturon commented Jan 23, 2015

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

aturon commented Jan 23, 2015

Copy link
Copy Markdown
Contributor

@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
alexcrichton force-pushed the old-io branch 5 times, most recently from e139a3a to 7960221 Compare January 23, 2015 19:26
@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=aturon 7960221

@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=aturon a1bfa26

@bors

bors commented Jan 24, 2015

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Jan 24, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@alexcrichton

Copy link
Copy Markdown
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

bors commented Jan 25, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c4f1d89 with merge 55967d7...

@bors

bors commented Jan 25, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=aturon 93d2352

@bors

bors commented Jan 26, 2015

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Jan 26, 2015

Copy link
Copy Markdown
Collaborator

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

@alexcrichton

Copy link
Copy Markdown
Member Author

@bors: r=aturon 39690eb

@bors

bors commented Jan 26, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 39690eb with merge dbc7ad0...

@bors

bors commented Jan 26, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@bors

bors commented Jan 26, 2015

Copy link
Copy Markdown
Collaborator

💔 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
Copy Markdown
Member Author

@bors: r=aturon 5d836cd

@bors

bors commented Jan 27, 2015

Copy link
Copy Markdown
Collaborator

⌛ 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 commented Jan 27, 2015

Copy link
Copy Markdown
Collaborator

@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