Closed evertedsphere closed 10 months ago
@ErinvanderVeen It would be a bit cheeky of me to approve this PR myself :wink: Could you give it a yea/nay, please?
Per the discussion above, I have renamed the library to topiary-core
and made all the necessary adjustments. That allows the logging output to be distinguishable from the library (topiary_core
) and the CLI (topiary_cli
).
I've also taken the opportunity to rename the top-level directories to things like core
and cli
, to make navigation easier (for lazy people like me!)
The CI will fail, but the meat of it all works fine. The failure is per #665 and unrelated to the changes made here. I think that can be ignored for the sake of this PR.
I have reverted the short-form directory names, so this is ready to merge (after #672)
...Oh, of course, there's some CI problem :roll_eyes:
Just a simple formatting problem...fixed. Now it is ready for merge, once approved.
This is ready now, I just need a :heavy_check_mark: @ErinvanderVeen
(It's still failing #665, but we can look into that elsewhere.)
Thanks for seeing this through.
Does both things suggested in #604, by
topiary
CLI binary totopiary-cli
LevelFilter
specific to messages fromtopiary::*
modules (i.e. the library)In this PR in its current state, the levels are inferred heuristically from the existing command-line verbosity setting. Both the particular mapping I came up with semi-randomly and the appropriateness of doing this rather than adding a second e.g.
--lib-log-level
flag are up for debate.Something more important stems from the fact that renaming the library in
topiary-cli/Cargo.toml
(i.e.etc) doesn't seem to work. The module names in the logs seem to depend on the names of modules as they are defined, so to pursue this route we'd have to rename the library crate itself to
topiary-core
or some such. I personally would prefer that approach, as it's idiomatic Rust and avoids changing the name of the executable, but it's something that needs to be discussed first and can easily be added to this PR after. If merged as it is, this PR will require changes to release workflows to account for the change in the name of the Topiary binary.