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

Conversation

Projects
None yet
8 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jan 23, 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]

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 23, 2015

r? @brson

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

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2015

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

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2015

r? @aturon

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

@alexcrichton alexcrichton force-pushed the alexcrichton:old-io branch 5 times, most recently from ebfbdf9 to 0e646ce Jan 23, 2015

@aturon

This comment has been minimized.

Copy link
Member

aturon commented Jan 23, 2015

@bors: r+ 0e646ce

And so it begins.

@flaper87

This comment has been minimized.

Copy link
Contributor

flaper87 commented Jan 23, 2015

🎉

@sfackler

This comment has been minimized.

Copy link
Member

sfackler commented Jan 23, 2015

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

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2015

@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

This comment has been minimized.

Copy link
Contributor

untitaker commented Jan 23, 2015

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

@aturon

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

sfackler commented Jan 23, 2015

@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

This comment has been minimized.

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

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2015

@bors: r=aturon 7960221

@alexcrichton alexcrichton force-pushed the alexcrichton:old-io branch from 7960221 to a1bfa26 Jan 23, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 23, 2015

@bors: r=aturon a1bfa26

@bors

This comment has been minimized.

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

Auto merge of #21543 - alexcrichton:old-io, r=aturon
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

This comment has been minimized.

Copy link
Contributor

bors commented Jan 24, 2015

💔 Test failed - auto-mac-64-opt

@alexcrichton alexcrichton force-pushed the alexcrichton:old-io branch from e222b44 to c4f1d89 Jan 24, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 24, 2015

bors added a commit that referenced this pull request Jan 25, 2015

Auto merge of #21543 - alexcrichton:old-io, r=alexcrichton
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

This comment has been minimized.

Copy link
Contributor

bors commented Jan 25, 2015

⌛️ Testing commit c4f1d89 with merge 55967d7...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 25, 2015

💔 Test failed - auto-mac-64-opt

@alexcrichton alexcrichton force-pushed the alexcrichton:old-io branch from c4f1d89 to 93d2352 Jan 26, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 26, 2015

@bors: r=aturon 93d2352

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2015

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

bors added a commit that referenced this pull request Jan 26, 2015

Auto merge of #21543 - alexcrichton:old-io, r=aturon
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

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2015

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

@alexcrichton alexcrichton force-pushed the alexcrichton:old-io branch from 93d2352 to 39690eb Jan 26, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 26, 2015

@bors: r=aturon 39690eb

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2015

⌛️ Testing commit 39690eb with merge dbc7ad0...

bors added a commit that referenced this pull request Jan 26, 2015

Auto merge of #21543 - alexcrichton:old-io, r=aturon
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

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2015

💔 Test failed - auto-mac-64-opt

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2015

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

alexcrichton added some commits Jan 23, 2015

std: Rename io to old_io
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]
std: Rename Writer::write to Writer::write_all
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 alexcrichton force-pushed the alexcrichton:old-io branch from 39690eb to 5d836cd Jan 27, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jan 27, 2015

@bors: r=aturon 5d836cd

@bors

This comment has been minimized.

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

Auto merge of #21543 - alexcrichton:old-io, r=aturon
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

2 checks passed

continuous-integration/travis-ci The Travis CI build passed
Details
homu Test successful
Details

renato-zannon added a commit to renato-zannon/racer that referenced this pull request Jan 27, 2015

The 'io' module was renamed to 'old_io'
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

The 'io' module was renamed to 'old_io'
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

@ianbollinger ianbollinger referenced this pull request Jan 28, 2015

Merged

Replace io with old_io #87

@alexcrichton alexcrichton deleted the alexcrichton:old-io branch Feb 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.