Satty icon indicating copy to clipboard operation
Satty copied to clipboard

fix: move command_line to separate crate

Open RobertMueller2 opened this issue 2 months ago • 1 comments

Closes: #303

Currently, by including command_line.rs in build.rs, the former gets snatched into crate "build_script_build".

This has a number of funny and unintuitive side effects like dependencies not working for the file but the build dependencies.

Here we move command_line.rs into a separate "cli" crate. Technically, this might not be much of an improvement as we still have to add dependencies to the new crate, but it makes the behaviour more obvious.

RobertMueller2 avatar Oct 12 '25 08:10 RobertMueller2

I'm kinda thinking the clap documentation should point this out, it does suggest include!. (Which caused the same result in my test)

Or maybe it's a shortcoming of the rust compiler. My expectation would be that a source file could be part of both, of course in that case its dependencies would have to be in both dependencies AND build-dependencies. But perhaps my understanding of this isn't good enough at this point ;)

RobertMueller2 avatar Oct 12 '25 09:10 RobertMueller2