"The Rust Programming Language," Take II #19897

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
10 participants
@steveklabnik
Member

steveklabnik commented Dec 15, 2014

An updated version of #19461

This version vendors steveklabnik/rustbook@731f7bf and builds it when building the docs. This is almost great, except my make-foo is poor, so I have my own personal paths in mk/docs.mk. How should I best get around that?

/cc @brson

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 16, 2014

Member

Oh, and post make-fu, I need to actually update the source text with various fixes that have landed. I'll do that right before the merge.

Member

steveklabnik commented Dec 16, 2014

Oh, and post make-fu, I need to actually update the source text with various fixes that have landed. I'll do that right before the merge.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 16, 2014

Member

(and change the links on the homepage, etc)

Member

steveklabnik commented Dec 16, 2014

(and change the links on the homepage, etc)

src/doc/trpl/src/looping.md
+
+In slightly more abstract terms,
+
+```{ignore,notrust}

This comment has been minimized.

@sinistersnare

sinistersnare Dec 16, 2014

Contributor

why isn't this block marked as rust? It is technically valid (if var expression, and code are valid identifiers)

@sinistersnare

sinistersnare Dec 16, 2014

Contributor

why isn't this block marked as rust? It is technically valid (if var expression, and code are valid identifiers)

This comment has been minimized.

@steveklabnik

steveklabnik Dec 16, 2014

Member

this is a question that's not relevant to the pull request, so let's not discuss it more here.

the answer is because i didn't do it that way ;) PR accepted.

@steveklabnik

steveklabnik Dec 16, 2014

Member

this is a question that's not relevant to the pull request, so let's not discuss it more here.

the answer is because i didn't do it that way ;) PR accepted.

This comment has been minimized.

@sinistersnare

sinistersnare Dec 16, 2014

Contributor

How is it not part of the PR, It is code review? does this PR exist solely to be accepted without modification?

@sinistersnare

sinistersnare Dec 16, 2014

Contributor

How is it not part of the PR, It is code review? does this PR exist solely to be accepted without modification?

This comment has been minimized.

@steveklabnik

steveklabnik Dec 16, 2014

Member

All of this content is imported from the existing guides. So the text isn't what's under review here.

Please make a new issue or a PR to discuss the content.

@steveklabnik

steveklabnik Dec 16, 2014

Member

All of this content is imported from the existing guides. So the text isn't what's under review here.

Please make a new issue or a PR to discuss the content.

mk/docs.mk
+RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD))
+
+rustbook: $(S)/src/rust-book/src/main.rs $(S)/src/rust-book/target/rustbook rustc-stage2-H-$(CFG_BUILD)
+ $(RUSTC) $(S)/src/rust-book/src/main.rs --crate-name rustbook --crate-type bin -g --out-dir $(S)/src/rust-book/target --dep-info $(S)/src/rust-book/target/.fingerprint/rustbook-f5f226ca671d7986/dep-bin-rustbook -L $(S)/src/rust-book/target -L $(S)/src/rust-book/target/deps

This comment has been minimized.

@huonw

huonw Dec 16, 2014

Member

This invocation seems a little strange? What's with the hashes and --dep-info etc?

@huonw

huonw Dec 16, 2014

Member

This invocation seems a little strange? What's with the hashes and --dep-info etc?

This comment has been minimized.

@steveklabnik

steveklabnik Dec 16, 2014

Member

I ran cargo build --verbose and copied it.

@steveklabnik

steveklabnik Dec 16, 2014

Member

I ran cargo build --verbose and copied it.

This comment has been minimized.

@brson

brson Dec 18, 2014

Contributor

There are a few things here that need to change. Let me see if I can explain it in a coherent way.

rustbook needs to be added to the TOOLS variable which lists all the exes produced by the build (The existing compiletest tool is a good one to compare rustbook to - it's just an exe, not an exe and lib like rustdoc, and it's internal-only for now). Tools are built by this macro. Now you need no explicit rule for building 'rustbook'.

Define the variable for calling rustbook as the one for RUSTDOC:

# The rustbook executable...
RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
# ...with rpath included in case --disable-rpath was provided to
# ./configure              
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)

I know.

So:

trpl: $(RUSTBOOK)

trpl also depends on the source documentation so maybe more like

trpl: $(RUSTBOOK) $(wildcard $(SRC)/doc/trpl/*.md)

You might factor out that wildcard that is also used in TEST_DOCS.

+trpl: rustbook
+ cd src/doc/trpl; ../../../src/rust-book/target/rustbook build; cd ../../..;
+ cp -r src/doc/trpl/_book doc/book

This looks like it will not support an out-of-tree build, and currently rustbook doesn't itself, so I'd suggest copying all of rustbook to a temporary directory to build it and then to the final destination, maybe like

trpl: ...
  $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
  $(Q) cp $(S)src/doc/trpl tmp/trpl
  $(Q) (cd tmp/trpl && $(RUSTBOOK) build)
  $(Q) cp tmp/trpl/_book doc/book

$(Q) means 'quiet' and suppresses output w/o VERBOSE=1. The parens before the cd start a subshell after which the cwd will change back.

@brson

brson Dec 18, 2014

Contributor

There are a few things here that need to change. Let me see if I can explain it in a coherent way.

rustbook needs to be added to the TOOLS variable which lists all the exes produced by the build (The existing compiletest tool is a good one to compare rustbook to - it's just an exe, not an exe and lib like rustdoc, and it's internal-only for now). Tools are built by this macro. Now you need no explicit rule for building 'rustbook'.

Define the variable for calling rustbook as the one for RUSTDOC:

# The rustbook executable...
RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
# ...with rpath included in case --disable-rpath was provided to
# ./configure              
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)

I know.

So:

trpl: $(RUSTBOOK)

trpl also depends on the source documentation so maybe more like

trpl: $(RUSTBOOK) $(wildcard $(SRC)/doc/trpl/*.md)

You might factor out that wildcard that is also used in TEST_DOCS.

+trpl: rustbook
+ cd src/doc/trpl; ../../../src/rust-book/target/rustbook build; cd ../../..;
+ cp -r src/doc/trpl/_book doc/book

This looks like it will not support an out-of-tree build, and currently rustbook doesn't itself, so I'd suggest copying all of rustbook to a temporary directory to build it and then to the final destination, maybe like

trpl: ...
  $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
  $(Q) cp $(S)src/doc/trpl tmp/trpl
  $(Q) (cd tmp/trpl && $(RUSTBOOK) build)
  $(Q) cp tmp/trpl/_book doc/book

$(Q) means 'quiet' and suppresses output w/o VERBOSE=1. The parens before the cd start a subshell after which the cwd will change back.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Thank you for all this, @brson . For some reason, GitHub wasn't really showing it to me. I blame AJAX. Anyway, patch incoming to fix this.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Thank you for all this, @brson . For some reason, GitHub wasn't really showing it to me. I blame AJAX. Anyway, patch incoming to fix this.

@huonw

This comment has been minimized.

Show comment
Hide comment
@huonw

huonw Dec 16, 2014

Member

Just double checking: this PR changes none of the actual content?

(I guess we/you need to be careful to incorporate any changes that happen between now and when it finally merges.)

Member

huonw commented Dec 16, 2014

Just double checking: this PR changes none of the actual content?

(I guess we/you need to be careful to incorporate any changes that happen between now and when it finally merges.)

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 16, 2014

Member

Yes, the intention is that it changes none of the content.

We will need to be careful. and that's what I meant with #19897 (comment) . The text here is a little bit old, but as soon as we're happy with the rest of it, I'll update it and hold off on merging PRs till this is in.

Member

steveklabnik commented Dec 16, 2014

Yes, the intention is that it changes none of the content.

We will need to be careful. and that's what I meant with #19897 (comment) . The text here is a little bit old, but as soon as we're happy with the rest of it, I'll update it and hold off on merging PRs till this is in.

@aturon

This comment has been minimized.

Show comment
Hide comment
@aturon

aturon Dec 17, 2014

Member

I'm so excited about this, @steveklabnik!

I think after this is merged, my rust-book repo should go into hibernation -- this should be the place to develop on rust-book.

Member

aturon commented Dec 17, 2014

I'm so excited about this, @steveklabnik!

I think after this is merged, my rust-book repo should go into hibernation -- this should be the place to develop on rust-book.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 17, 2014

Member

@brson what do you think we need to do to land this?

Member

steveklabnik commented Dec 17, 2014

@brson what do you think we need to do to land this?

src/etc/licenseck.py
+ "src/rust-book/src/serve.rs", # imported
+ "src/rust-book/src/subcommand.rs", # imported
+ "src/rust-book/src/term.rs", # imported
+ "src/rust-book/src/test.rs", # imported

This comment has been minimized.

@brson

brson Dec 17, 2014

Contributor

Let's not make these exceptions and fix the licensing of the files. Besides one patch that I would claim is non-copyrightable @aturon is the only author and he won't mind.

@brson

brson Dec 17, 2014

Contributor

Let's not make these exceptions and fix the licensing of the files. Besides one patch that I would claim is non-copyrightable @aturon is the only author and he won't mind.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 17, 2014

Member

They're all covered by Apache, so I guess this involves copying this at the top of each file?

@steveklabnik

steveklabnik Dec 17, 2014

Member

They're all covered by Apache, so I guess this involves copying this at the top of each file?

This comment has been minimized.

@brson

brson Dec 18, 2014

Contributor

Put this at the top of each file:

// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

It is adding the MIT license as well.

@brson

brson Dec 18, 2014

Contributor

Put this at the top of each file:

// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

It is adding the MIT license as well.

This comment has been minimized.

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Dec 17, 2014

Contributor

Can we put rustbook under the directory 'src/rustbook' to match the name of the crate?

Contributor

brson commented Dec 17, 2014

Can we put rustbook under the directory 'src/rustbook' to match the name of the crate?

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Dec 17, 2014

Contributor

src/rust-book/LICENSE-APACHE doesn't need to come along I think.

Contributor

brson commented Dec 17, 2014

src/rust-book/LICENSE-APACHE doesn't need to come along I think.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 17, 2014

Member

@brson prefer that name too, only kept it with the dash because https://github.com/aturon/rust-book spelled it that way.

Member

steveklabnik commented Dec 17, 2014

@brson prefer that name too, only kept it with the dash because https://github.com/aturon/rust-book spelled it that way.

@liigo

This comment has been minimized.

Show comment
Hide comment
@liigo

liigo Dec 17, 2014

Contributor

Could "trpl" be renamed to something else with more meaningful? Maybe just
"book"?

Contributor

liigo commented Dec 17, 2014

Could "trpl" be renamed to something else with more meaningful? Maybe just
"book"?

- rustdoc guide-unsafe guide-strings reference
+DOCS := index intro tutorial complement-bugreport \
+ complement-lang-faq complement-design-faq complement-project-faq \
+ rustdoc reference

This comment has been minimized.

@brson

brson Dec 17, 2014

Contributor

The DOCS variable is used both to generate these docs but also to test them. I don't see in this patch a mechanism that keeps the book tested.

I might suggest adding a variable TEST_DOCS=$DOCS $(wildcard $src/doc/trpl/*) and using TEST_DOCS in test.mk to drive the doc testing (though istm that rustbook might want to learn to --test itself someday).

@brson

brson Dec 17, 2014

Contributor

The DOCS variable is used both to generate these docs but also to test them. I don't see in this patch a mechanism that keeps the book tested.

I might suggest adding a variable TEST_DOCS=$DOCS $(wildcard $src/doc/trpl/*) and using TEST_DOCS in test.mk to drive the doc testing (though istm that rustbook might want to learn to --test itself someday).

mk/docs.mk
@@ -243,7 +240,7 @@ doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
endef
-$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
+$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang))))

This comment has been minimized.

@brson

brson Dec 17, 2014

Contributor

Looks like with this there is no more doc localization at all, so I think you might as well delete the entire preceding block of code. Somebody will have to investing in localization again in the future.

@brson

brson Dec 17, 2014

Contributor

Looks like with this there is no more doc localization at all, so I think you might as well delete the entire preceding block of code. Somebody will have to investing in localization again in the future.

mk/docs.mk
@@ -298,3 +295,12 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
docs-l10n: $(DOC_L10N_TARGETS)
.PHONY: docs-l10n

This comment has been minimized.

@brson

brson Dec 17, 2014

Contributor

Two more localization targets that do nothing now can be deleted.

@brson

brson Dec 17, 2014

Contributor

Two more localization targets that do nothing now can be deleted.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 18, 2014

Member

should I mix localization change stuff into this? Seems like something that should be independent

@steveklabnik

steveklabnik Dec 18, 2014

Member

should I mix localization change stuff into this? Seems like something that should be independent

This comment has been minimized.

@brson

brson Dec 18, 2014

Contributor

Your choice.

@brson

brson Dec 18, 2014

Contributor

Your choice.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 18, 2014

Member

Cool. I'll deal with that separately.

@steveklabnik

steveklabnik Dec 18, 2014

Member

Cool. I'll deal with that separately.

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Dec 18, 2014

Contributor

This rule needs to be updated to tell the installer not to install rustbook https://github.com/rust-lang/rust/blob/master/mk/prepare.mk#L73

Contributor

brson commented Dec 18, 2014

This rule needs to be updated to tell the installer not to install rustbook https://github.com/rust-lang/rust/blob/master/mk/prepare.mk#L73

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 18, 2014

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 18, 2014

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 18, 2014

Member

This is now conceptually good to go, I think. The last issue is removing the dependency on regexes, but that's internal to the rustbook code. I'd be interested in getting feedback on the makefile stuff, and then i can squash, fix regexes, import current guides and such, and then we should be good to go

/cc @aturon @alexcrichton @brson

Member

steveklabnik commented Dec 18, 2014

This is now conceptually good to go, I think. The last issue is removing the dependency on regexes, but that's internal to the rustbook code. I'd be interested in getting feedback on the makefile stuff, and then i can squash, fix regexes, import current guides and such, and then we should be good to go

/cc @aturon @alexcrichton @brson

mk/docs.mk
+
+trpl: $(RUSTBOOK)
+ cd src/doc/trpl; $(S)/$(RUSTBOOK) build; cd ../../..;
+ cp -r src/doc/trpl/_book doc/book

This comment has been minimized.

@brson

brson Dec 19, 2014

Contributor

This still does not look like it will support an out-of-tree build: 'src/doc/trpl' will not contain the source for rustbook in that case. These comments are still relevant. If that is implemented then the three additions to the .gitignore file are unnecessary. Out of tree build can be tested like

mkdir build && cd build && ../configure && make docs
@brson

brson Dec 19, 2014

Contributor

This still does not look like it will support an out-of-tree build: 'src/doc/trpl' will not contain the source for rustbook in that case. These comments are still relevant. If that is implemented then the three additions to the .gitignore file are unnecessary. Out of tree build can be tested like

mkdir build && cd build && ../configure && make docs

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Ahh, sorry, my instincts are still 'it doesn't matter where you build,' out of tree always feels wasteful. I guess I just haven't spent enough time building things.=

@steveklabnik

steveklabnik Dec 19, 2014

Member

Ahh, sorry, my instincts are still 'it doesn't matter where you build,' out of tree always feels wasteful. I guess I just haven't spent enough time building things.=

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Dec 19, 2014

Contributor

This latest revision includes a directory 'src/rustbook/target' that should not be checked in.

Contributor

brson commented Dec 19, 2014

This latest revision includes a directory 'src/rustbook/target' that should not be checked in.

mk/tests.mk
@@ -311,6 +311,7 @@ tidy:
| grep '^$(S)src/doc' -v \
| grep '^$(S)src/compiler-rt' -v \
| grep '^$(S)src/libbacktrace' -v \
+ | grep '^$(S)src/rustbook' -v \

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

I don't think this line should be added (we should check this directory for binaries)

@alexcrichton

alexcrichton Dec 19, 2014

Member

I don't think this line should be added (we should check this directory for binaries)

This comment has been minimized.

@alexcrichton

alexcrichton Dec 21, 2014

Member

(I think this is still relevant)

@alexcrichton

alexcrichton Dec 21, 2014

Member

(I think this is still relevant)

This comment has been minimized.

@steveklabnik

steveklabnik Dec 29, 2014

Member

removed

@@ -0,0 +1,2 @@
+/home/steve/src/rust/src/rustbook/target/rustbook: /home/steve/src/rust/src/rustbook/src/main.rs /home/steve/src/rust/src/rustbook/src/term.rs /home/steve/src/rust/src/rustbook/src/error.rs /home/steve/src/rust/src/rustbook/src/book.rs /home/steve/src/rust/src/rustbook/src/subcommand.rs /home/steve/src/rust/src/rustbook/src/help.rs /home/steve/src/rust/src/rustbook/src/build.rs /home/steve/src/rust/src/rustbook/src/serve.rs /home/steve/src/rust/src/rustbook/src/test.rs /home/steve/src/rust/src/rustbook/src/css.rs
+

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

This looks like you're checking in some generated files?

@alexcrichton

alexcrichton Dec 19, 2014

Member

This looks like you're checking in some generated files?

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

Looks like there's also a binary down below

@alexcrichton

alexcrichton Dec 19, 2014

Member

Looks like there's also a binary down below

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Yeah that's just wrong 😅

On Dec 18, 2014, at 21:20, Alex Crichton notifications@github.com wrote:

In src/rustbook/target/.fingerprint/rustbook-ef15939ef756fdd3/dep-bin-rustbook:

@@ -0,0 +1,2 @@
+/home/steve/src/rust/src/rustbook/target/rustbook: /home/steve/src/rust/src/rustbook/src/main.rs /home/steve/src/rust/src/rustbook/src/term.rs /home/steve/src/rust/src/rustbook/src/error.rs /home/steve/src/rust/src/rustbook/src/book.rs /home/steve/src/rust/src/rustbook/src/subcommand.rs /home/steve/src/rust/src/rustbook/src/help.rs /home/steve/src/rust/src/rustbook/src/build.rs /home/steve/src/rust/src/rustbook/src/serve.rs /home/steve/src/rust/src/rustbook/src/test.rs /home/steve/src/rust/src/rustbook/src/css.rs
+
This looks like you're checking in some generated files?


Reply to this email directly or view it on GitHub.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Yeah that's just wrong 😅

On Dec 18, 2014, at 21:20, Alex Crichton notifications@github.com wrote:

In src/rustbook/target/.fingerprint/rustbook-ef15939ef756fdd3/dep-bin-rustbook:

@@ -0,0 +1,2 @@
+/home/steve/src/rust/src/rustbook/target/rustbook: /home/steve/src/rust/src/rustbook/src/main.rs /home/steve/src/rust/src/rustbook/src/term.rs /home/steve/src/rust/src/rustbook/src/error.rs /home/steve/src/rust/src/rustbook/src/book.rs /home/steve/src/rust/src/rustbook/src/subcommand.rs /home/steve/src/rust/src/rustbook/src/help.rs /home/steve/src/rust/src/rustbook/src/build.rs /home/steve/src/rust/src/rustbook/src/serve.rs /home/steve/src/rust/src/rustbook/src/test.rs /home/steve/src/rust/src/rustbook/src/css.rs
+
This looks like you're checking in some generated files?


Reply to this email directly or view it on GitHub.

src/rustbook/src/test.rs
@@ -0,0 +1,23 @@
+//! Implementation of the `test` subcommand. Just a stub for now.

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

These files should require a license, can you make sure that make tidy is catching these?

@alexcrichton

alexcrichton Dec 19, 2014

Member

These files should require a license, can you make sure that make tidy is catching these?

src/rustbook/src/main.rs
@@ -0,0 +1,66 @@
+#![feature(slicing_syntax)]

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

This repository has a bit of a different layout than Cargo ones, could the intermediate src folder be removed?

@alexcrichton

alexcrichton Dec 19, 2014

Member

This repository has a bit of a different layout than Cargo ones, could the intermediate src folder be removed?

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

So I'm not totally opposed, but @aturon wants to just make this the authoritative Rustbook, so I was thinking keeping it Cargo-build able would help WRT easier building. Maybe not.

On Dec 18, 2014, at 21:22, Alex Crichton notifications@github.com wrote:

In src/rustbook/src/main.rs:

@@ -0,0 +1,66 @@
+#![feature(slicing_syntax)]
This repository has a bit of a different layout than Cargo ones, could the intermediate src folder be removed?


Reply to this email directly or view it on GitHub.

@steveklabnik

steveklabnik Dec 19, 2014

Member

So I'm not totally opposed, but @aturon wants to just make this the authoritative Rustbook, so I was thinking keeping it Cargo-build able would help WRT easier building. Maybe not.

On Dec 18, 2014, at 21:22, Alex Crichton notifications@github.com wrote:

In src/rustbook/src/main.rs:

@@ -0,0 +1,66 @@
+#![feature(slicing_syntax)]
This repository has a bit of a different layout than Cargo ones, could the intermediate src folder be removed?


Reply to this email directly or view it on GitHub.

src/rustbook/README.md
@@ -0,0 +1,49 @@
+# rustbook

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

This may want to be either deleted or updated.

@alexcrichton

alexcrichton Dec 19, 2014

Member

This may want to be either deleted or updated.

src/rustbook/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

We could probably avoid adding a new license.

@alexcrichton

alexcrichton Dec 19, 2014

Member

We could probably avoid adding a new license.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Agreed.

On Dec 18, 2014, at 21:22, Alex Crichton notifications@github.com wrote:

In src/rustbook/LICENSE-APACHE:

@@ -0,0 +1,201 @@

  •                          Apache License
    
    We could probably avoid adding a new license.


Reply to this email directly or view it on GitHub.

@steveklabnik

steveklabnik Dec 19, 2014

Member

Agreed.

On Dec 18, 2014, at 21:22, Alex Crichton notifications@github.com wrote:

In src/rustbook/LICENSE-APACHE:

@@ -0,0 +1,201 @@

  •                          Apache License
    
    We could probably avoid adding a new license.


Reply to this email directly or view it on GitHub.

src/rustbook/Cargo.toml
@@ -0,0 +1,5 @@
+[package]

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

Do we want to add a Cargo.toml to this repo?

@alexcrichton

alexcrichton Dec 19, 2014

Member

Do we want to add a Cargo.toml to this repo?

src/doc/guide-crates.md
@@ -1,569 +0,0 @@
-% The Rust Crates and Modules Guide

This comment has been minimized.

@alexcrichton

alexcrichton Dec 19, 2014

Member

These files look like they were all deleted, were they supposed to be moved instead?

@alexcrichton

alexcrichton Dec 19, 2014

Member

These files look like they were all deleted, were they supposed to be moved instead?

This comment has been minimized.

@steveklabnik

steveklabnik Dec 19, 2014

Member

They end up all going into the final build. This ends up replacing the Crates section of guide.md

On Dec 18, 2014, at 21:23, Alex Crichton notifications@github.com wrote:

In src/doc/guide-crates.md:

@@ -1,569 +0,0 @@
-% The Rust Crates and Modules Guide
These files look like they were all deleted, were they supposed to be moved instead?


Reply to this email directly or view it on GitHub.

@steveklabnik

steveklabnik Dec 19, 2014

Member

They end up all going into the final build. This ends up replacing the Crates section of guide.md

On Dec 18, 2014, at 21:23, Alex Crichton notifications@github.com wrote:

In src/doc/guide-crates.md:

@@ -1,569 +0,0 @@
-% The Rust Crates and Modules Guide
These files look like they were all deleted, were they supposed to be moved instead?


Reply to this email directly or view it on GitHub.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 19, 2014

Member

@sinistersnare @aturon @japaric

Are you all okay with your https://github.com/aturon/rust-book/graphs/contributors being under the Rust license?

I'm going to remove the license stuff for now, but we can't merge until you three sign off :)

Member

steveklabnik commented Dec 19, 2014

@sinistersnare @aturon @japaric

Are you all okay with your https://github.com/aturon/rust-book/graphs/contributors being under the Rust license?

I'm going to remove the license stuff for now, but we can't merge until you three sign off :)

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 19, 2014

@aturon

This comment has been minimized.

Show comment
Hide comment
@aturon

aturon Dec 19, 2014

Member

Yes, I'm fine for this to go under the Rust license.

Member

aturon commented Dec 19, 2014

Yes, I'm fine for this to go under the Rust license.

@japaric

This comment has been minimized.

Show comment
Hide comment
@japaric

japaric Dec 19, 2014

Member

Are you all okay with your https://github.com/aturon/rust-book/graphs/contributors being under the Rust license?

Yes, I'm OK with putting my 7 line contribution under the Rust license.

Member

japaric commented Dec 19, 2014

Are you all okay with your https://github.com/aturon/rust-book/graphs/contributors being under the Rust license?

Yes, I'm OK with putting my 7 line contribution under the Rust license.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 19, 2014

Member

Whew. I think I've addressed almost everything but tests. I want to teach rustbook how to do it, but I'm having problems compiling Rustbook with HEAD Rust. Something's changed somewhere and I can't track it down :(

Member

steveklabnik commented Dec 19, 2014

Whew. I think I've addressed almost everything but tests. I want to teach rustbook how to do it, but I'm having problems compiling Rustbook with HEAD Rust. Something's changed somewhere and I can't track it down :(

mk/docs.mk
+trpl: $(RUSTBOOK) $(wildcard $(SRC)/doc/trpl/*.md)
+ $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
+ $(Q) cp $(S)src/doc/trpl tmp/trpl
+ $(Q) (cd tmp/trpl && $(RUSTBOOK) build)

This comment has been minimized.

@alexcrichton

alexcrichton Dec 21, 2014

Member

Could rustbook be taught to do an out-of-tree build to avoid all this copying/changing of directories? If it's too hard we could keep this for now, but this seems somewhat awkward.

@alexcrichton

alexcrichton Dec 21, 2014

Member

Could rustbook be taught to do an out-of-tree build to avoid all this copying/changing of directories? If it's too hard we could keep this for now, but this seems somewhat awkward.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 29, 2014

Member

I thought this was for doing an out of tree build :/

@steveklabnik

steveklabnik Dec 29, 2014

Member

I thought this was for doing an out of tree build :/

This comment has been minimized.

@alexcrichton

alexcrichton Dec 29, 2014

Member

I meant more for teaching rustbook something like $(RUSTBOOK) build --input $(S)src/doc/trpl --output tmp/trpl or something like that.

@alexcrichton

alexcrichton Dec 29, 2014

Member

I meant more for teaching rustbook something like $(RUSTBOOK) build --input $(S)src/doc/trpl --output tmp/trpl or something like that.

.gitignore
@@ -92,3 +92,6 @@ tmp.*.rs
version.md
version.ml
version.texi
+src/doc/_book/*
+src/doc/trpl
+src/rustbook/target

This comment has been minimized.

@alexcrichton

alexcrichton Dec 21, 2014

Member

This last line and the line with _book can be removed, right?

@alexcrichton

alexcrichton Dec 21, 2014

Member

This last line and the line with _book can be removed, right?

This comment has been minimized.

@steveklabnik

steveklabnik Dec 29, 2014

Member

correct, removing

@steveklabnik

steveklabnik Dec 29, 2014

Member

correct, removing

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Dec 21, 2014

Member

@steveklabnik All the makefile stuff looks pretty good to me, just a few nits.

Can you also remind me where all the guides are going? Are we going to pick up a new submodule to pull them all in? Just want to make sure they don't disappear!

Member

alexcrichton commented Dec 21, 2014

@steveklabnik All the makefile stuff looks pretty good to me, just a few nits.

Can you also remind me where all the guides are going? Are we going to pick up a new submodule to pull them all in? Just want to make sure they don't disappear!

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 22, 2014

mk/docs.mk
+
+trpl: $(RUSTBOOK_EXE) $(wildcard $(S)/doc/trpl/*.md)
+ $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
+ $(Q) cp $(S)src/doc/trpl tmp/trpl

This comment has been minimized.

@alexcrichton

alexcrichton Dec 29, 2014

Member

I think this or the cp command below need a recursive -r flag.

@alexcrichton

alexcrichton Dec 29, 2014

Member

I think this or the cp command below need a recursive -r flag.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 29, 2014

Member

Okay! @alexcrichton , @brson , this now actually builds. Woo!

If everything looks okay on the make side, I'm going to teach rustbook how to test, and then we import the latest copy of all the guides, and then we're good to go!

Member

steveklabnik commented Dec 29, 2014

Okay! @alexcrichton , @brson , this now actually builds. Woo!

If everything looks okay on the make side, I'm going to teach rustbook how to test, and then we import the latest copy of all the guides, and then we're good to go!

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 30, 2014

Member

steveklabnik/rustbook#15 is the wip 'test' implementation.

Member

steveklabnik commented Dec 30, 2014

steveklabnik/rustbook#15 is the wip 'test' implementation.

mk/docs.mk
+trpl: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
+ $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
+ $(Q) cp -r $(S)src/doc/trpl tmp/trpl
+ $(Q) (cd tmp/trpl && ../../$(RUSTBOOK_EXE) build)

This comment has been minimized.

@alexcrichton

alexcrichton Dec 30, 2014

Member

I think that this needs to use the RUSTBOOK variable which notably includes information about LD_LIBRARY_PATH and friends. In general this is where I think avoiding this rm/cp/cd chain would be best by teaching rustbook a bit about source roots and such.

@alexcrichton

alexcrichton Dec 30, 2014

Member

I think that this needs to use the RUSTBOOK variable which notably includes information about LD_LIBRARY_PATH and friends. In general this is where I think avoiding this rm/cp/cd chain would be best by teaching rustbook a bit about source roots and such.

This comment has been minimized.

@steveklabnik

steveklabnik Dec 30, 2014

Member

Changing it to that leads to

/bin/sh: 1: ../../LD_LIBRARY_PATH=/home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib:/home/steve/lib:: not found
/bin/sh: 1: ../../LD_LIBRARY_PATH=/home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib:/home/steve/lib:: not found
@steveklabnik

steveklabnik Dec 30, 2014

Member

Changing it to that leads to

/bin/sh: 1: ../../LD_LIBRARY_PATH=/home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib:/home/steve/lib:: not found
/bin/sh: 1: ../../LD_LIBRARY_PATH=/home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib:/home/steve/lib:: not found

This comment has been minimized.

@steveklabnik

steveklabnik Dec 30, 2014

Member

oh i'm an idiot, i should actually read errors 😅

@steveklabnik

steveklabnik Dec 30, 2014

Member

oh i'm an idiot, i should actually read errors 😅

This comment has been minimized.

@steveklabnik

steveklabnik Dec 30, 2014

Member

Yeah, so, that does look like I need to teach rustbook that. 😦

@steveklabnik

steveklabnik Dec 30, 2014

Member

Yeah, so, that does look like I need to teach rustbook that. 😦

This comment has been minimized.

@steveklabnik

steveklabnik Dec 30, 2014

Member

This shouldn't be that hard to do.

@steveklabnik

steveklabnik Dec 30, 2014

Member

This shouldn't be that hard to do.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 30, 2014

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Dec 31, 2014

Member

Okay! I think I've got out-of-tree builds going. Check out the new makfile. But:

error: 
rustdoc: symbol lookup error: /home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib/librustc_borrowck-4e7c5e5c.so: undefined symbol: _ZN3vec31Vec$LT$u8$GT$.fmt..FormatWriter5write20hafba16047642a1ae40jE

make: warning:  Clock skew detected.  Your build may be incomplete

O_O

Member

steveklabnik commented Dec 31, 2014

Okay! I think I've got out-of-tree builds going. Check out the new makfile. But:

error: 
rustdoc: symbol lookup error: /home/steve/src/rust/x86_64-unknown-linux-gnu/stage2/lib/librustc_borrowck-4e7c5e5c.so: undefined symbol: _ZN3vec31Vec$LT$u8$GT$.fmt..FormatWriter5write20hafba16047642a1ae40jE

make: warning:  Clock skew detected.  Your build may be incomplete

O_O

mk/docs.mk
+
+RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD))
+
+trpl: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)

This comment has been minimized.

@alexcrichton

alexcrichton Dec 31, 2014

Member

Oh one thing I now remember is that this makefile target doesn't seem to have a condition where it will stop running. The result, "trpl", doesn't exist, so I think that this rule may execute on all invocations of make. Can you make sure that this doesn't happen at least? One method is making a tmp/foo.ok file which is touched at the end of this rule (we do this in lots of places elsewhere).

@alexcrichton

alexcrichton Dec 31, 2014

Member

Oh one thing I now remember is that this makefile target doesn't seem to have a condition where it will stop running. The result, "trpl", doesn't exist, so I think that this rule may execute on all invocations of make. Can you make sure that this doesn't happen at least? One method is making a tmp/foo.ok file which is touched at the end of this rule (we do this in lots of places elsewhere).

This comment has been minimized.

@alexcrichton

alexcrichton Dec 31, 2014

Member

It also doesn't look like this makefile rule is referenced anywhere else, and we probably want to include it in make somehow

@alexcrichton

alexcrichton Dec 31, 2014

Member

It also doesn't look like this makefile rule is referenced anywhere else, and we probably want to include it in make somehow

This comment has been minimized.

@steveklabnik

steveklabnik Jan 8, 2015

Member

okay, so i pushed a commit that does the tmp/trpl.ok stuff, but I accidentally forgot to touch mk/docs.mk, and it's late, so I'm not gonna do an actual re-build right now.

what's the best way to include it into make, do you think? And, I need to make the mirror test rule too.

@steveklabnik

steveklabnik Jan 8, 2015

Member

okay, so i pushed a commit that does the tmp/trpl.ok stuff, but I accidentally forgot to touch mk/docs.mk, and it's late, so I'm not gonna do an actual re-build right now.

what's the best way to include it into make, do you think? And, I need to make the mirror test rule too.

mk/docs.mk
+trpl: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
+ $(Q) rm -Rf tmp/trpl && rm -Rf doc/book
+ $(Q) mkdir tmp/trpl
+ $(Q) $(RUSTBOOK) build $(S)src/doc/trpl tmp/trpl

This comment has been minimized.

@alexcrichton

alexcrichton Dec 31, 2014

Member

Could this just just be:

$(Q)rm -rf doc/book
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book

(avoiding the tmp/trpl dir)

@alexcrichton

alexcrichton Dec 31, 2014

Member

Could this just just be:

$(Q)rm -rf doc/book
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book

(avoiding the tmp/trpl dir)

This comment has been minimized.

@steveklabnik

steveklabnik Jan 1, 2015

Member

I thought that was part of the out of tree bit.

@steveklabnik

steveklabnik Jan 1, 2015

Member

I thought that was part of the out of tree bit.

src/doc/trpl/Makefile
+all: _book
+
+_book: SUMMARY.md README.md src
+ rustbook build

This comment has been minimized.

@alexcrichton

alexcrichton Dec 31, 2014

Member

can be removed now? (along with README below)

@alexcrichton

alexcrichton Dec 31, 2014

Member

can be removed now? (along with README below)

This comment has been minimized.

@steveklabnik

steveklabnik Jan 8, 2015

Member

The README is the root page, so it can't, but it should have real text.

@steveklabnik

steveklabnik Jan 8, 2015

Member

The README is the root page, so it can't, but it should have real text.

src/rustbook/build.rs
+
+ try!(fs::mkdir_recursive(&out_path, io::USER_DIR));
+
+ let output_result = Command::new("rustdoc")

This comment has been minimized.

@alexcrichton

alexcrichton Dec 31, 2014

Member

I think your weird error is coming from this spot. The actual rustdoc executable being used is one you have installed on your system, which depends on an entirely different librustc.so than is being found (it depends on the installed library, not the one LD_LIBRARY_PATH is pointing to in-tree).

Options include:

  • Have the rustbook executable depend on the rustdoc executable in-tree. This would involve tweaking the makefiles as well as this code to figure out where rustdoc is actually located.
  • Use extern crate rustdoc; and invoke it from in-process. This is probably the easier of the two routes as you can call main_args with this array and it's easier to modify the makefiles to set up the dependencies.

Both ways aren't super easy, sadly :(

@alexcrichton

alexcrichton Dec 31, 2014

Member

I think your weird error is coming from this spot. The actual rustdoc executable being used is one you have installed on your system, which depends on an entirely different librustc.so than is being found (it depends on the installed library, not the one LD_LIBRARY_PATH is pointing to in-tree).

Options include:

  • Have the rustbook executable depend on the rustdoc executable in-tree. This would involve tweaking the makefiles as well as this code to figure out where rustdoc is actually located.
  • Use extern crate rustdoc; and invoke it from in-process. This is probably the easier of the two routes as you can call main_args with this array and it's easier to modify the makefiles to set up the dependencies.

Both ways aren't super easy, sadly :(

This comment has been minimized.

This comment has been minimized.

@steveklabnik

steveklabnik Jan 1, 2015

Member

@aturon what do you think?

@steveklabnik

steveklabnik Jan 1, 2015

Member

@aturon what do you think?

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jan 7, 2015

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jan 8, 2015

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

Okay! This is almost there. One error I'm not sure about:

rustc: x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/bin/rustbook
cp: x86_64-unknown-linux-gnu/stage2/bin/rustbook
1. Introduction
error opening ` tmp/trpl/README.html` for writing: couldn't create file (no such file or directory (No such file or directory); path= tmp/trpl/README.html; mode=truncate; access=write)

any ideas, @brson or @alexcrichton ?

Member

steveklabnik commented Jan 8, 2015

Okay! This is almost there. One error I'm not sure about:

rustc: x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/bin/rustbook
cp: x86_64-unknown-linux-gnu/stage2/bin/rustbook
1. Introduction
error opening ` tmp/trpl/README.html` for writing: couldn't create file (no such file or directory (No such file or directory); path= tmp/trpl/README.html; mode=truncate; access=write)

any ideas, @brson or @alexcrichton ?

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Jan 8, 2015

Contributor

There appears to be an extra space in the path rustbook is trying to open "{space}tmp/trpl..."

Contributor

brson commented Jan 8, 2015

There appears to be an extra space in the path rustbook is trying to open "{space}tmp/trpl..."

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jan 8, 2015

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

This is getting close to being good to go. Left to do:

  1. write the makefile rule that calls rustbook test
  2. integrate make trpl and make trpl-test into make docs.

Anything else?

Member

steveklabnik commented Jan 8, 2015

This is getting close to being good to go. Left to do:

  1. write the makefile rule that calls rustbook test
  2. integrate make trpl and make trpl-test into make docs.

Anything else?

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jan 8, 2015

Member

I've rebased this branch on the current master here: alexcrichton@6a5b558

In that commit I've also integrated tests into the default build (not via rustbook test though), and I've also integrated the docs into the regular build.

Some other agenda items I saw:

  • The main landing page needs to have many links updated
  • The guides need to be all brought back up to date as a bunch of changes have happened since they were moved.
  • A quick pass to make sure everything looks as expected.

Can't wait for this to land!

Member

alexcrichton commented Jan 8, 2015

I've rebased this branch on the current master here: alexcrichton@6a5b558

In that commit I've also integrated tests into the default build (not via rustbook test though), and I've also integrated the docs into the regular build.

Some other agenda items I saw:

  • The main landing page needs to have many links updated
  • The guides need to be all brought back up to date as a bunch of changes have happened since they were moved.
  • A quick pass to make sure everything looks as expected.

Can't wait for this to land!

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

Ah yes. I'm going to eat breakfast, and then I'll tackle that.

Member

steveklabnik commented Jan 8, 2015

Ah yes. I'm going to eat breakfast, and then I'll tackle that.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

Okay! This should be good to go, I think. I'd imagine we'd want to sqaush some of this, yeah?

Member

steveklabnik commented Jan 8, 2015

Okay! This should be good to go, I think. I'd imagine we'd want to sqaush some of this, yeah?

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

2015-01-08-112123_1022x59_scrot

😢 it is done

Member

steveklabnik commented Jan 8, 2015

2015-01-08-112123_1022x59_scrot

😢 it is done

src/doc/trpl/SUMMARY.md
+ * [Compiler Plugins](src/plugins.md)
+* [Conclusion](src/conclusion.md)
+
+vim src/doc/trpl/src/installing-rust.md src/doc/trpl/src/hello-world.md src/doc/trpl/src/hello-cargo.md src/doc/trpl/src/variable-bindings.md src/doc/trpl/src/if.md src/doc/trpl/src/functions.md src/doc/trpl/src/comments.md src/doc/trpl/src/compound-data-types.md src/doc/trpl/src/match.md src/doc/trpl/src/looping.md src/doc/trpl/src/strings.md src/doc/trpl/src/arrays-vectors-and-slices.md src/doc/trpl/src/standard-input.md src/doc/trpl/src/guessing-game.md

This comment has been minimized.

@alexcrichton

alexcrichton Jan 8, 2015

Member

odd line?

@alexcrichton

alexcrichton Jan 8, 2015

Member

odd line?

This comment has been minimized.

@steveklabnik

steveklabnik Jan 8, 2015

Member

lol i suck at vim

@steveklabnik

steveklabnik Jan 8, 2015

Member

lol i suck at vim

src/doc/trpl/src/basic.md
@@ -0,0 +1,3 @@
+% Basics
+
+Basic Rust stuff.

This comment has been minimized.

@alexcrichton

alexcrichton Jan 8, 2015

Member

Just confirming this is intended.

@alexcrichton

alexcrichton Jan 8, 2015

Member

Just confirming this is intended.

This comment has been minimized.

@steveklabnik

steveklabnik Jan 8, 2015

Member

all these addressed

@steveklabnik

steveklabnik Jan 8, 2015

Member

all these addressed

src/doc/trpl/src/advanced.md
@@ -0,0 +1,3 @@
+% Advanced
+
+Advanced Rust stuff.

This comment has been minimized.

@alexcrichton

alexcrichton Jan 8, 2015

Member

Just confirming this is intended.

@alexcrichton

alexcrichton Jan 8, 2015

Member

Just confirming this is intended.

src/doc/trpl/src/closures.md
+
+let p = proc() { x * x };
+println!("{}", p()); // prints 25
+```

This comment has been minimized.

@alexcrichton

alexcrichton Jan 8, 2015

Member

Hm, do the tests pass? This looks like a testable example but I would kinda hope we reject this!

@alexcrichton

alexcrichton Jan 8, 2015

Member

Hm, do the tests pass? This looks like a testable example but I would kinda hope we reject this!

This comment has been minimized.

@steveklabnik

steveklabnik Jan 8, 2015

Member

oh no, this makes me question my rebasing skillz

@steveklabnik

steveklabnik Jan 8, 2015

Member

oh no, this makes me question my rebasing skillz

"The Rust Programming Language"
This pulls all of our long-form documentation into a single document,
nicknamed "the book" and formally titled "The Rust Programming
Language."

A few things motivated this change:

* People knew of The Guide, but not the individual Guides. This merges
  them together, helping discoverability.
* You can get all of Rust's longform documentation in one place, which
  is nice.
* We now have rustbook in-tree, which can generate this kind of
  documentation. While its style is basic, the general idea is much
  better: a table of contents on the left-hand side.
* Rather than a almost 10,000-line guide.md, there are now smaller files
  per section.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015

rollup merge of #19897: steveklabnik/trpl
An updated version of rust-lang#19461

This version vendors steveklabnik/rustbook@731f7bf and builds it when building the docs. This is almost great, except my `make`-foo is poor, so I have my own personal paths in `mk/docs.mk`. How should I best get around that?

/cc @brson
@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jan 8, 2015

Member

Merged in #20760

Member

alexcrichton commented Jan 8, 2015

Merged in #20760

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Jan 8, 2015

Member

Can't wait to see this on doc.rust-lang.org, really nice work here @steveklabnik!

Member

alexcrichton commented Jan 8, 2015

Can't wait to see this on doc.rust-lang.org, really nice work here @steveklabnik!

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Jan 8, 2015

Member

😍 🎊

Member

steveklabnik commented Jan 8, 2015

😍 🎊

@Gankro

This comment has been minimized.

Show comment
Hide comment
@Gankro

Gankro Jan 8, 2015

Contributor

Woaaah! Congrats!

Contributor

Gankro commented Jan 8, 2015

Woaaah! Congrats!

+
+## Advanced
+
+In a similar fashion to "Intermediate," this setion is full of individual,

This comment has been minimized.

@asterite

asterite Jan 9, 2015

Should be 'section'

@asterite

asterite Jan 9, 2015

Should be 'section'

This comment has been minimized.

@steveklabnik

steveklabnik Jan 9, 2015

Member

Totally! Please open an issue or PR about this. Thanks :)

@steveklabnik

steveklabnik Jan 9, 2015

Member

Totally! Please open an issue or PR about this. Thanks :)

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

auto merge of #20782 : iKevinY/rust/trpl-formatting, r=steveklabnik
Here's my PR for the changes discussed in #19823. I decided to leave `_these_` types of italics the way there were because it differentiates the use of italics for emphasis from `*key term*` italics. Otherwise, bolded terms have been changed to italics, and single and double quotes have been changed appropriately, depending on their context (my judgement may not be the best, though).

r? @steveklabnik (congratulations on #19897 being finalized and merged, by the way!)

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

auto merge of #20782 : iKevinY/rust/trpl-formatting, r=steveklabnik
Here's my PR for the changes discussed in #19823. I decided to leave `_these_` types of italics the way there were because it differentiates the use of italics for emphasis from `*key term*` italics. Otherwise, bolded terms have been changed to italics, and single and double quotes have been changed appropriately, depending on their context (my judgement may not be the best, though).

r? @steveklabnik (congratulations on #19897 being finalized and merged, by the way!)

@steveklabnik steveklabnik deleted the steveklabnik:trpl branch Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment