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

x86_64-unknown-linux-gnu missing from Platform list #1119

Closed
bbqsrc opened this issue Oct 24, 2020 · 4 comments
Closed

x86_64-unknown-linux-gnu missing from Platform list #1119

bbqsrc opened this issue Oct 24, 2020 · 4 comments
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug

Comments

@bbqsrc
Copy link

bbqsrc commented Oct 24, 2020

Crate name: pathos 0.2.0

Additional details:

My Cargo.toml contains this:

[package.metadata.docs.rs]
targets = [
    "aarch64-apple-ios",
    "aarch64-linux-android",
    "x86_64-apple-darwin",
    "x86_64-pc-windows-msvc",
    "x86_64-unknown-linux-gnu",
]

Docs.rs shows this:

image

x86_64-unknown-linux-gnu has gone missing, and there's no build error. 😄

@jyn514
Copy link
Member

jyn514 commented Oct 24, 2020

Well this is odd. The target builds successfully:

[DEBUG] docs_rs::docbuilder::rustwide_builder: building package pathos 0.2.0 for x86_64-unknown-linux-gnu
[INFO] rustwide::cmd: running `Command { std: "/home/cratesfyi/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--format-version" "1", kill_on_drop: false }`
[INFO] rustwide::cmd: running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/pathos-0.2.0/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/w
:58.937104814Z" level=warning msg="Your kernel does not support swap limit capabilities,or the cgroup is not mounted. Memory limited without swap."
[INFO] rustwide::cmd: [stdout] 3e6456721a870907005c0169402a51fce28f270b574684c5b69053d8eb1c898a
[INFO] rustwide::cmd: [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] rustwide::cmd: running `Command { std: "docker" "start" "-a" "3e6456721a870907005c0169402a51fce28f270b574684c5b69053d8eb1c898a", kill_on_drop: false }`
:04:59.047635476Z" level=info msg="shim containerd-shim started" address="/containerd-shim/moby/3e6456721a870907005c0169402a51fce28f270b574684c5b69053d8eb1c898a/shim.sock" d
... snip ...
[INFO] rustwide::cmd: [stderr]  Documenting pathos v0.2.0 (/opt/rustwide/workdir)
[INFO] rustwide::cmd: [stderr]     Finished dev [unoptimized + debuginfo] target(s) in 3.17s

but it never gets added to the database, docs.rs just starts building the next target instead:

[DEBUG] docs_rs::docbuilder::rustwide_builder: building package pathos 0.2.0 for x86_64-pc-windows-msvc

and that target does get added:

[DEBUG] docs_rs::docbuilder::rustwide_builder: adding documentation for target x86_64-pc-windows-msvc to the database

@jyn514 jyn514 added A-builds Area: Building the documentation for a crate C-bug Category: This is a bug labels Oct 24, 2020
@jyn514
Copy link
Member

jyn514 commented Oct 24, 2020

I don't think it's related to this bug, but this logic is also wrong:

let res = self.execute_build(default_target, true, &build, &limits, &metadata)?;
if res.result.successful {
if let Some(name) = res.cargo_metadata.root().library_name() {
let host_target = build.host_target_dir();
has_docs = host_target.join("doc").join(name).is_dir();
}
}

It hardcodes that the default target is the host, which is not correct.

@jyn514
Copy link
Member

jyn514 commented Oct 24, 2020

One of these two conditions isn't being taken:

if target_res.result.successful {
// Cargo is not giving any error and not generating documentation of some crates
// when we use a target compile options. Check documentation exists before
// adding target to successfully_targets.
if build.host_target_dir().join(target).join("doc").is_dir() {

@jyn514
Copy link
Member

jyn514 commented Nov 24, 2021

This turned out to be #1556 - since you put aarch64-apple-ios first, it ended up as the default target. #1559 should fix it.

@jyn514 jyn514 closed this as completed Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants