Skip to content

metadata::filter_platform fails on !amd64 #9238

@mwhudson

Description

@mwhudson

Problem
metadata::filter_platform fails on e.g. powerpc64le-linux-gnu

Steps

  1. install rustup
  2. rustup default stable
  3. git clone https://github.com/rust-lang/cargo
  4. cd cargo
  5. cargo test metadata::filter_platform

Possible Solution(s)

The failure is rather long (you can see it in https://launchpadlibrarian.net/526141668/buildlog_ubuntu-hirsute-amd64.cargo_0.51.0-0ubuntu1~ppa1_BUILDING.txt.gz) but the upshot is that /packages/2/dependencies/2 and /packages/2/dependencies/3 are the other way around from how the test expects (test expects alt-dep first, output has host-dep first).

Now, I'm no expert but I don't see anything in the code that guarantees the ordering of dependencies in the output. So I'm guessing this only passes on amd64 by chance. But I could be wrong!

Notes

Output of cargo version:

I observed this with c694096 and 0.51.0 built with "rustc 1.50.0 (cb75ad5db 2021-02-10)" on Ubuntu 20.04. I also saw the same test building cargo 0.51.0 on arm64, s390x and armhf with my rustc 1.50.0 packages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions