Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport alternative frontends #191
Conversation
euclio
force-pushed the
euclio:frontend
branch
from
857e098
to
3df5ef6
Oct 15, 2017
This comment has been minimized.
This comment has been minimized.
|
I am psyched about this! Will probably not get to a review until tomorrow though. Thanks! |
euclio
force-pushed the
euclio:frontend
branch
from
3df5ef6
to
a9f7f2b
Oct 15, 2017
This comment has been minimized.
This comment has been minimized.
|
@euclio This is great! |
euclio
force-pushed the
euclio:frontend
branch
from
a9f7f2b
to
2fd98a2
Oct 15, 2017
steveklabnik
reviewed
Oct 16, 2017
|
thanks a ton, overall this looks great! two inline questions for discussion |
| conforms to a particular interface. | ||
|
|
||
| - The frontend must allow a single positional argument. This argument will be | ||
| the path to the documentation JSON generated by the backend. |
This comment has been minimized.
This comment has been minimized.
steveklabnik
Oct 16, 2017
Owner
yeah, I wonder if maybe streaming over stdin isn't better. I feel like it's a tradeoff; my frontend would need to take that stdin and write it to a file anyway, whereas your implementation currently needs to read the file outputted.
I think I'm going to argue that it should be over stdin, because in that case, it only needs to write a file if it actually needs to write a file, otherwise we've left an extraneous file around. Thoughts?
This comment has been minimized.
This comment has been minimized.
euclio
Oct 17, 2017
Author
Contributor
Yeah, I think stdin makes more sense. Certainly if we want to support streaming output.
| @@ -0,0 +1,85 @@ | |||
| #[macro_use] | |||
This comment has been minimized.
This comment has been minimized.
steveklabnik
Oct 16, 2017
Owner
what do you think about making this a workspace, with rustdoc-ember as a crate inside of it? This would let us get rid of the build script for the main rustdoc crate, which feels cleaner to me.
This comment has been minimized.
This comment has been minimized.
euclio
Oct 17, 2017
•
Author
Contributor
I'd prefer a workspace as well, but I don't think it's possible to force all crates be built? I'm trying to avoid the situation where you only build the backend and then the frontend can't be found. Though, this does already happen if you just cargo run --bin rustdoc without cargo build. With a workspace you'll have to remember to cargo build --all instead of just cargo build. If that's acceptable I'm happy to make it into a separate crate.
This comment has been minimized.
This comment has been minimized.
euclio
force-pushed the
euclio:frontend
branch
from
3baada9
to
5d95021
Oct 17, 2017
euclio
added some commits
Oct 15, 2017
euclio
force-pushed the
euclio:frontend
branch
from
5d95021
to
ca4b39c
Oct 17, 2017
This comment has been minimized.
This comment has been minimized.
|
Rebased and ready for review. |
steveklabnik
approved these changes
Oct 17, 2017
|
Awesome, thank you! So pumped about this. |
euclio commentedOct 15, 2017
•
edited
This PR extracts the ember-specific logic into a
rustdoc-emberbinary. Alternative frontends may be used by setting theRUSTDOC_FRONTENDenvironment variable.I've also updated the README. Does the proposed interface for frontends make sense? I also considered sending
data.jsonthrough stdin.Fixes #52.