Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Avoid including bin/node/cli/src/cli.rs in build.rs #14806

Open
zdave-parity opened this issue Aug 22, 2023 · 0 comments
Open

Avoid including bin/node/cli/src/cli.rs in build.rs #14806

zdave-parity opened this issue Aug 22, 2023 · 0 comments
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@zdave-parity
Copy link

bin/node/cli/src/cli.rs looks like a regular module. But if you for example try to reference a sibling module from it, the compiler will confusingly tell you that this sibling module can't be found. This is because as well as being built as a regular module, cli.rs is also included in build.rs. AFAICT this is to generate shell completions at build time. It seems like this could be achieved without using include!. The simplest option might be to have a separate crate just for generating shell completions. This could pull in cli.rs via a crate dependency.

@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

1 participant