Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work out how we're going to rustdoc #1

Open
kentfredric opened this issue Sep 25, 2019 · 0 comments
Open

Work out how we're going to rustdoc #1

kentfredric opened this issue Sep 25, 2019 · 0 comments
Labels
discussion ideas, thoughts and meta issues that may or may not eventually lead to some concrete change

Comments

@kentfredric
Copy link
Member

My initial thoughts were that we do:

src_compile() {
	rust-crate_src_compile
	... 
	use doc && ecargo doc --release --no-deps
}
src_install() {
	rust-crate_src_install
	...
	use doc && (
		dodir "/usr/share/rust-${PN}/${PVR}/doc"
		insinto "/usr/share/rust-${PN}/${PVR}/doc"
		cd "${WORKDIR}/doc" || die "No such dir"
		insopts -m0644
		doins -r ./
	)
}

But it needs some thinking about, partly because that approach will create a lot of waste in the form of per-ebuild copies of various things ...

>>> /usr/share/rust-autocfg/0.1.6/doc/LICENSE-MIT.txt
>>> /usr/share/rust-autocfg/0.1.6/doc/settings.js
>>> /usr/share/rust-autocfg/0.1.6/doc/src/
# --- Own Docs {
>>> /usr/share/rust-autocfg/0.1.6/doc/src/autocfg/
>>> /usr/share/rust-autocfg/0.1.6/doc/src/autocfg/error.rs.html
>>> /usr/share/rust-autocfg/0.1.6/doc/src/autocfg/version.rs.html
>>> /usr/share/rust-autocfg/0.1.6/doc/src/autocfg/lib.rs.html
# } ---
>>> /usr/share/rust-autocfg/0.1.6/doc/main.js
# --- More Own Docs {
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/struct.AutoCfg.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/fn.rerun_env.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/fn.emit.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/index.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/sidebar-items.js
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/fn.rerun_path.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/all.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/struct.Error.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/error/
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/error/struct.Error.html
>>> /usr/share/rust-autocfg/0.1.6/doc/autocfg/fn.new.html
# } ---
>>> /usr/share/rust-autocfg/0.1.6/doc/theme.js
>>> /usr/share/rust-autocfg/0.1.6/doc/favicon.ico
>>> /usr/share/rust-autocfg/0.1.6/doc/brush.svg
>>> /usr/share/rust-autocfg/0.1.6/doc/down-arrow.svg
>>> /usr/share/rust-autocfg/0.1.6/doc/rustdoc.css
>>> /usr/share/rust-autocfg/0.1.6/doc/.lock
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceCodePro-Semibold.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/LICENSE-APACHE.txt
>>> /usr/share/rust-autocfg/0.1.6/doc/storage.js
>>> /usr/share/rust-autocfg/0.1.6/doc/FiraSans-Regular.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceSerifPro-It.ttf.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/normalize.css
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceSerifPro-Bold.ttf.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/aliases.js
>>> /usr/share/rust-autocfg/0.1.6/doc/light.css
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceCodePro-Regular.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/settings.css
>>> /usr/share/rust-autocfg/0.1.6/doc/dark.css
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceSerifPro-Regular.ttf.woff
# --- Shared indexing stuff :(  {
>>> /usr/share/rust-autocfg/0.1.6/doc/search-index.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/panic/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/panic/trait.RefUnwindSafe.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/panic/trait.UnwindSafe.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/error/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/std/error/trait.Error.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/marker/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/marker/trait.Send.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/marker/trait.Freeze.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/marker/trait.Sync.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/marker/trait.Unpin.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/clone/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/clone/trait.Clone.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/fmt/
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/fmt/trait.Debug.js
>>> /usr/share/rust-autocfg/0.1.6/doc/implementors/core/fmt/trait.Display.js
# } ---
>>> /usr/share/rust-autocfg/0.1.6/doc/COPYRIGHT.txt
>>> /usr/share/rust-autocfg/0.1.6/doc/FiraSans-Medium.woff
>>> /usr/share/rust-autocfg/0.1.6/doc/wheel.svg
>>> /usr/share/rust-autocfg/0.1.6/doc/source-files.js
>>> /usr/share/rust-autocfg/0.1.6/doc/noscript.css
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceSerifPro-LICENSE.md
>>> /usr/share/rust-autocfg/0.1.6/doc/settings.html
>>> /usr/share/rust-autocfg/0.1.6/doc/source-script.js
>>> /usr/share/rust-autocfg/0.1.6/doc/rust-logo.png
>>> /usr/share/rust-autocfg/0.1.6/doc/SourceCodePro-LICENSE.txt
>>> /usr/share/rust-autocfg/0.1.6/doc/FiraSans-LICENSE.txt

Though it occurs to me perhaps we could generate documentation "side-wide" for all installed crates as an independent function, the risk of doing that is its prone to failure, the same failures one can expect if you don't gate the rustdoc behind use doc .... because it has to compile.

And "compiling" currently means "all optional and target-specific dependencies need to be installed", so unless you carefully patched that out, you'll have failures.

@kentfredric kentfredric added the discussion ideas, thoughts and meta issues that may or may not eventually lead to some concrete change label Feb 10, 2020
@kentfredric kentfredric changed the title [discussion] Work out how we're going to rustdoc Work out how we're going to rustdoc Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion ideas, thoughts and meta issues that may or may not eventually lead to some concrete change
Projects
None yet
Development

No branches or pull requests

1 participant