Skip to content

Nightly Cargo passes wrong rlib path for doctests #6954

Open
@jonas-schievink

Description

@jonas-schievink

Problem

On the current nightly, with rustc 1.36.0-nightly (7d5aa4332 2019-05-16) and cargo 1.36.0-nightly (c4fcfb725 2019-05-15), my build-plan crate fails to compile doctests (of which there are none) during cargo test.

It fails while trying to build the crate for doctests, with this error:

   Doc-tests build-plan
error: extern location for serde does not exist: /home/jonas/dev/build-plan/target/debug/deps/libserde-270f7cf6cecf499d.rlib

error[E0463]: can't find crate for `serde`
  --> /home/jonas/dev/build-plan/src/lib.rs:14:1
   |
14 | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to 2 previous errors

A failing CI build can be seen here: https://travis-ci.org/jonas-schievink/build-plan/builds/533879431?utm_medium=notification&utm_source=email

The cause of this must be something in the Cargo update PR rust-lang/rust#60874, since it still works fine on the nightly before that (cargo 1.36.0-nightly (759b6161a 2019-05-06))

Steps

  1. git clone https://github.com/jonas-schievink/build-plan.git
  2. cd build-plan
  3. cargo test

Possible Solution(s)

Notes

Output of cargo version: cargo 1.36.0-nightly (c4fcfb7 2019-05-15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-propose-closeStatus: A team member has nominated this for closing, pending further input from the teamZ-build-planNightly: --build-plan feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions