Replies: 1 comment 1 reply
-
A lot of this depends
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following issue: I have a type in the CLI that is being parsed from user input and I want to hand over to a core library that also wants to work with it.
Code
CLI
Library side
I could pull clap into the core library and annotate my struct there, but I'm trying to not pull in clap as a whole for this case, although I could hide it behind a feature flag. Maybe that is why this problem arises. I could also factor out these cli related structs to a cli library, hide the clap dependency behind a feature and pull in the type from there. Though that is not possible due to cyclic dependencies.
I'm here to ask if there is another way to solve this issue without pulling clap as a dependency in the core library, that I'm not aware of. If there isn't, I would go down the route of hiding it behind a feature flag.
Beta Was this translation helpful? Give feedback.
All reactions