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: Deprecate std::old_io::fs #22873

Merged
merged 1 commit into from
Mar 5, 2015
Merged

Conversation

alexcrichton
Copy link
Member

This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called old_fs. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new std::fs and std::path APIs where
appropriate as part of this change.

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @huonw

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

@aturon aturon mentioned this pull request Feb 27, 2015
91 tasks
@alexcrichton alexcrichton force-pushed the deprecate-fs branch 4 times, most recently from 4d41a82 to 44af1b3 Compare February 27, 2015 23:07
@huonw
Copy link
Member

huonw commented Feb 28, 2015

Travis is failing.

@alexcrichton alexcrichton force-pushed the deprecate-fs branch 3 times, most recently from 49ad452 to 6b9ad41 Compare February 28, 2015 02:25
@alexcrichton
Copy link
Member Author

Ah oops, should be taken care of now

@bors
Copy link
Contributor

bors commented Feb 28, 2015

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

@bors
Copy link
Contributor

bors commented Mar 1, 2015

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

@alexcrichton alexcrichton force-pushed the deprecate-fs branch 2 times, most recently from a16abfc to b10b656 Compare March 2, 2015 17:05
@@ -273,11 +273,13 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
trpl: doc/book/index.html

doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
@$(call E, rustbook: $@)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended? Seems unrelated to the goal of the PR...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes I figured I'd just clean up the output here to be a little more consistent with the rest of the build (now that it doesn't print the chapters to stdout by default)

@aturon
Copy link
Member

aturon commented Mar 2, 2015

LGTM

@alexcrichton
Copy link
Member Author

@bors: r+ b10b656c8a802cd6260ddacb0edfb1dfc9bdbc1b p=1

@alexcrichton
Copy link
Member Author

@bors: r=aturon b10b656c8a802cd6260ddacb0edfb1dfc9bdbc1b

@bors
Copy link
Contributor

bors commented Mar 2, 2015

⌛ Testing commit b10b656 with merge 25ad046...

@bors
Copy link
Contributor

bors commented Mar 2, 2015

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

@alexcrichton
Copy link
Member Author

@bors: r=aturon b30b276

@bors
Copy link
Contributor

bors commented Mar 3, 2015

⌛ Testing commit b30b276 with merge a8aa138...

@bors
Copy link
Contributor

bors commented Mar 4, 2015

⌛ Testing commit 0daf8ca with merge b3b8ce3...

@bors
Copy link
Contributor

bors commented Mar 4, 2015

💔 Test failed - auto-mac-32-opt

@Manishearth
Copy link
Member

/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:237:42: 237:54 error: mismatched types:
 expected `&mut core::ops::FnMut() -> std::path::PathBuf`,
    found `[closure /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:237:42: 237:54]`
(expected &-ptr,
    found closure) [E0308]
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:237             get_install_prefix_lib_path: || panic!(),
                                                                                                                                       ^~~~~~~~~~~~
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:238:30: 238:45 error: the type of this value must be known in this context
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:238             realpath: |p| Ok(p.to_path_buf())
                                                                                                                           ^~~~~~~~~~~~~~~
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:238:23: 238:46 error: mismatched types:
 expected `&mut for<'r> core::ops::FnMut(&'r std::path::Path) -> core::result::Result<std::path::PathBuf, std::io::error::Error>`,
    found `[closure /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:238:23: 238:46]`
(expected &-ptr,
    found closure) [E0308]
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:238             realpath: |p| Ok(p.to_path_buf())

@bors
Copy link
Contributor

bors commented Mar 4, 2015

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

@alexcrichton
Copy link
Member Author

@bors: r=aturon cbb2ea1 p=1

@bors
Copy link
Contributor

bors commented Mar 4, 2015

⌛ Testing commit cbb2ea1 with merge 0ccc0b8...

@bors
Copy link
Contributor

bors commented Mar 4, 2015

💔 Test failed - auto-mac-32-opt

@Manishearth
Copy link
Member

/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:204:46: 204:58 error: mismatched types:
 expected `&mut core::ops::FnMut() -> std::path::PathBuf`,
    found `[closure /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:204:46: 204:58]`
(expected &-ptr,
    found closure) [E0308]
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:204                 get_install_prefix_lib_path: || panic!(),
                                                                                                                                           ^~~~~~~~~~~~
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:205:34: 205:49 error: the type of this value must be known in this context
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:205                 realpath: |p| Ok(p.to_path_buf())
                                                                                                                               ^~~~~~~~~~~~~~~
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:205:27: 205:50 error: mismatched types:
 expected `&mut for<'r> core::ops::FnMut(&'r std::path::Path) -> core::result::Result<std::path::PathBuf, std::io::error::Error>`,
    found `[closure /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:205:27: 205:50]`
(expected &-ptr,
    found closure) [E0308]
/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/librustc_back/rpath.rs:205                 realpath: |p| Ok(p.to_path_buf())
                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
make: *** [i686-apple-darwin/stage2/test/rustc_backtest-i686-apple-darwin] Error 101

@alexcrichton
Copy link
Member Author

@bors: r=aturon 4419219 p=1

bors added a commit that referenced this pull request Mar 4, 2015
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.

[breaking-change]
@bors
Copy link
Contributor

bors commented Mar 4, 2015

⌛ Testing commit 4419219 with merge 37dbde9...

@bors
Copy link
Contributor

bors commented Mar 4, 2015

💔 Test failed - auto-mac-32-opt

@Manishearth
Copy link
Member

Bunch of lldb debuginfo failures


thread '[debuginfo-lldb] debuginfo/shadowed-argument.rs' panicked at 'explicit panic', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/compiletest/runtest.rs:1483


---- [debuginfo-lldb] debuginfo/shadowed-variable.rs stdout ----
    NOTE: compiletest thinks it is using LLDB version 310

error: line not found in debugger output: [...]$0 = false
status: exit code: 0
command: "python" "/Users/rustbuild/src/rust-buildbot/slave/auto-mac-32-opt/build/src/etc/lldb_batchmode.py" "i686-apple-darwin/test/debuginfo-lldb/shadowed-variable.stage2-i686-apple-darwin" "i686-apple-darwin/test/debuginfo-lldb/shadowed-variable.debugger.script"

This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.
@alexcrichton
Copy link
Member Author

@bors: r=aturon 95d9046 p=1

@bors
Copy link
Contributor

bors commented Mar 5, 2015

⌛ Testing commit 95d9046 with merge cc722a4...

bors added a commit that referenced this pull request Mar 5, 2015
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.

[breaking-change]
@bors bors merged commit 95d9046 into rust-lang:master Mar 5, 2015
@eddyb
Copy link
Member

eddyb commented Mar 11, 2015

I see no explanation for the changes in pretty-printing, i.e. writing to a buffer and then saving that buffer to disk (or printing it out).
I guess I can work with that in #23017, if I move some things around... but I find it rather odd.

@alexcrichton alexcrichton deleted the deprecate-fs branch March 11, 2015 18:34
@alexcrichton
Copy link
Member Author

@eddyb oh sorry about that, I initially didn't want to migrate the pretty printer just yet to the new I/O traits so it was easiest to just throw it all into a Vec and then print that to a std::fs::File for example. I wound up having to migrate the pretty printer, though, and I just forgot to go back and fixup what previously changed. Please feel free to revert back to what it previously was though!

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