oxidecomputer / oxidecomputer/progenitor

doctests fail when client is embedded into the generated crate

Open Beginner friendly
#1,345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1k
Forks
136
Avg merge
8h 36m
Merged PRs (30d)
14

Description

When using cargo progenitor with --include-client true, the generated crate embeds progenitor_client as a local module rather than as an external crate dependency. This causes cargo test --doc to fail because the doctest harness can't resolve use progenitor_client::...; there's no external crate by that name, only a local module.

The workaround we're using is manually appending [lib]\ndoctest = false to the generated Cargo.toml after generation, which does the job for our use case. We can continue doing that but I was wondering if this is something you're willing to have fixed.

One possible fix could be to have cargo-progenitor emit that section automatically when --include-client true is used, since it already has that information when constructing the Cargo.toml. Not sure if there are reasons not to do this or a better approach. Would love to send a PR if the direction makes sense!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cargo-progenitor generation path that handles --include-client true and constructs the generated Cargo.toml. Reproduce the failure with cargo test --doc, then verify that generated crates no longer fail to resolve progenitor_client when the embedded client is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.