This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Error while building TRPL second edition: #51
Comments
Can you post the stack trace? (Run it like `env RUST_BACKTRACE=1 cargo run --release`)
… Am 20.01.2018 um 18:39 schrieb Nabarun Pal ***@***.***>:
I am trying to build the second edition of the book. I have copied over the source files from trpl/second-edition/src in the TRPL source code repository on Github.
***@***.***:~/codesl/trpl-ebook (git:master) $ ls trpl
appendix-00.md ch08-01-vectors.md ch15-01-box.md
appendix-01-keywords.md ch08-02-strings.md ch15-02-deref.md
appendix-02-operators.md ch08-03-hash-maps.md ch15-03-drop.md
appendix-03-derivable-traits.md ch09-00-error-handling.md ch15-04-rc.md
appendix-04-macros.md ch09-01-unrecoverable-errors-with-panic.md ch15-05-interior-mutability.md
appendix-05-translation.md ch09-02-recoverable-errors-with-result.md ch15-06-reference-cycles.md
appendix-06-newest-features.md ch09-03-to-panic-or-not-to-panic.md ch16-00-concurrency.md
ch01-00-introduction.md ch10-00-generics.md ch16-01-threads.md
ch01-01-installation.md ch10-01-syntax.md ch16-02-message-passing.md
ch01-02-hello-world.md ch10-02-traits.md ch16-03-shared-state.md
ch02-00-guessing-game-tutorial.md ch10-03-lifetime-syntax.md ch16-04-extensible-concurrency-sync-and-send.md
ch03-00-common-programming-concepts.md ch11-00-testing.md ch17-00-oop.md
ch03-01-variables-and-mutability.md ch11-01-writing-tests.md ch17-01-what-is-oo.md
ch03-02-data-types.md ch11-02-running-tests.md ch17-02-trait-objects.md
ch03-03-how-functions-work.md ch11-03-test-organization.md ch17-03-oo-design-patterns.md
ch03-04-comments.md ch12-00-an-io-project.md ch18-00-patterns.md
ch03-05-control-flow.md ch12-01-accepting-command-line-arguments.md ch18-01-all-the-places-for-patterns.md
ch04-00-understanding-ownership.md ch12-02-reading-a-file.md ch18-02-refutability.md
ch04-01-what-is-ownership.md ch12-03-improving-error-handling-and-modularity.md ch18-03-pattern-syntax.md
ch04-02-references-and-borrowing.md ch12-04-testing-the-librarys-functionality.md ch19-00-advanced-features.md
ch04-03-slices.md ch12-05-working-with-environment-variables.md ch19-01-unsafe-rust.md
ch05-00-structs.md ch12-06-writing-to-stderr-instead-of-stdout.md ch19-02-advanced-lifetimes.md
ch05-01-defining-structs.md ch13-00-functional-features.md ch19-03-advanced-traits.md
ch05-02-example-structs.md ch13-01-closures.md ch19-04-advanced-types.md
ch05-03-method-syntax.md ch13-02-iterators.md ch19-05-advanced-functions-and-closures.md
ch06-00-enums.md ch13-03-improving-our-io-project.md ch20-00-final-project-a-web-server.md
ch06-01-defining-an-enum.md ch13-04-performance.md ch20-01-single-threaded.md
ch06-02-match.md ch14-00-more-about-cargo.md ch20-02-slow-requests.md
ch06-03-if-let.md ch14-01-release-profiles.md ch20-03-designing-the-interface.md
ch07-00-modules.md ch14-02-publishing-to-crates-io.md ch20-04-storing-threads.md
ch07-01-mod-and-the-filesystem.md ch14-03-cargo-workspaces.md ch20-05-sending-requests-via-channels.md
ch07-02-controlling-visibility-with-pub.md ch14-04-installing-binaries.md ch20-06-graceful-shutdown-and-cleanup.md
ch07-03-importing-names-with-use.md ch14-05-extending-cargo.md img
ch08-00-common-collections.md ch15-00-smart-pointers.md SUMMARY.md
However, when I try to build the book, I encounter the following error:
***@***.***:~/codesl/trpl-ebook (git:crate-update) $ cargo run --release
Finished release [optimized] target(s) in 0.0 secs
Running `target/release/compile-trpl`
Reading book.thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', libcore/resul
t.rs:916:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
I also tried with:
***@***.***:~/codesl/trpl-ebook (git:crate-update) $ ./target/release/compile-trpl --source=/home/nabarun/codesl/trpl-ebook/trpl
Reading book.thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', libcore/resul
t.rs:916:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
and I get the same error.
Did anybody else try to do the same?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@killercup Here is the stacktrace
|
Okay, damn, that's really unhelpful stack trace! The only thing of note here is Since it says "No such file or directory", I'd just go looking for trpl-ebook/src/helpers/file.rs Lines 6 to 11 in f612176
Could be changed to report some more info, something like this. |
Fixed by #52 |
That is awesome. Thank you. @abcdev |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to build the second edition of the book. I have copied over the source files from
trpl/second-edition/src
in the TRPL source code repository on Github.However, when I try to build the book, I encounter the following error:
I also tried with:
and I get the same error.
Did anybody else try to do the same?
The text was updated successfully, but these errors were encountered: