On Tue, Mar 21, 2017 at 08:28:53AM +0100, Sebastien Marie wrote: > On Mon, Mar 20, 2017 at 10:11:29PM +0000, Edd Barrett wrote: > > On Mon, Mar 20, 2017 at 02:43:58PM +0100, Sebastien Marie wrote: > > > On Sun, Mar 19, 2017 at 03:55:26PM +0000, Edd Barrett wrote: > > > > > > > > How about a separate port for docs that depends on lang/rust? Would that > > > > be more palatable? > > > > > > I assume it could be possible, but I am unsure if rustbuild will be able > > > to > > > generate only the documentation (and not just binary + doc). Testing is > > > required :) > > > > I've been prodding around. There's a 'doc' target in the top-level > > Makefile.in, but we don't have a Makefile, presumably because we didn't > > use the configure script. > > > > If I run the configure script, then run `make doc` then it will try to > > build again (including failing to get a bootstrap binary from rustup). I > > think we'd need to use the configure script from the start, and I > > appreciate there is probably a good reason not to do that. > > configure script and Makefile are the legacy way to build rustc. There > are only keep for compatibility reason. The Makefile is done in a way to > call rustbuild. > > The lang/rust port uses rustbuild directly (it is more flexible for the > build options). The configuration is done by generating a config.toml > (see 'configure' target in the port). And call rustbuild directly for > the build (see 'do-build' target in the port). > > > But wait, earlier you said: > > > > > the main problem with shipping doc subpackages is now it requires > > > rustdoc binary to be present in the bootstrap archive too. > > > > Are you sure? We are already removing the rustdoc binary from the > > bootstrap tarball in the in-tree 0.15.x version, so how does the in-tree > > version make docs? It must be using it's own rustdoc? > > > > The bootstrap is generated in the same way that the port itself (and if > you read 'bootstrap' target in the port, you will see it reused the fake > framework but in different directory). So all files are installed in the > bootstrap directory, and it removes all unneeded files. Since the > beginning, rustdoc is removed from the required files to be present in > bootstrap. > > In 1.15.1, the rustbuild used the generated rustdoc binary for compiling > docs. It isn't the case anymore and it is why it is a problem.
>From what i understand, it's more work to keep rustdoc in the bootstrap so that we can generate the docs at package build time, so to make things simpler sebastien wants to drop the -docs subpackage, which i fully agree with (less work for the maintainer). I havent tested the diff yet but the direction in which this is going makes sense to me. We're in 2017, docs are available online - and if they're really needed, maybe provide a separate port for them, without all the bootstrapping stuff that makes the rust port already quite complicated. Landry