Skip to content

Extract code into external files#1949

Closed
carols10cents wants to merge 42 commits intomasterfrom
extract-files
Closed

Extract code into external files#1949
carols10cents wants to merge 42 commits intomasterfrom
extract-files

Conversation

@carols10cents
Copy link
Member

@carols10cents carols10cents commented May 7, 2019

Fixes #1889.

Can't be merged until rust-lang/mdBook#1003 is merged and released and the released version of mdbook is available in rust-lang/rust, and the following are completed:

TODO

  • Switch from line numbers to anchors throughout
    • rg rustdoc_include.*\\.rs:[0-9] src/*.md
  • Get tests passing using my fork of mdbook for the moment
  • Write a script that extracts:
    • anchor comments
    • "snip" comments
    • empty fn main() {}s in src/lib.rss
      and produces a github "release" artifact that's just the listings to download
  • Document the github releases somewhere, and what they correspond to (print, rust version, etc)
  • Update the nostarch generation script to process the includes before concatenating the markdown

In future PRs (this is just for my own brain parking lot to keep me on task)

> ```rust,ignore,does_not_compile
> {{#include ../listings/ch05-using-structs-to-structure-related-data/no-listing-02-ownership-of-struct-data/src/main.rs}}
> ```

@carols10cents carols10cents added the blocked upstream Blocked on a change that needs to happen in a different repo first label May 7, 2019
@steveklabnik
Copy link
Contributor

Triage: mdbook PR is still open.

@carols10cents
Copy link
Member Author

Closing in favor of a new PR I've organized differently.

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

Labels

blocked upstream Blocked on a change that needs to happen in a different repo first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Please use complete programs rather than code snippets.

2 participants