-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract gix::config::tree into crate gix-config-keys #1153
Conversation
This copying is done with no particular plan about the exact API for the new crate. The commit is only meant to allow creating a draft PR to facilitate discussion.
Thanks so much for getting started on this.
Maybe this means that it's best keep the keys with
It was done by hand and is (meant to be) deliberate, while the term 'chaotic' suggests that a lot went wrong there. As All these comments are based on the PR's text only, I haven't looked at the change at all just yet. |
Distributing this across the plumbing might be possible with some fancy-pants lazy-load-generating macro, but that assumes that all config keys are used by exactly one crate, which might not be true for the contents of The question is perhaps, how much of a goal it is to enable an external party to use individual plumbing crates, rather than depend on gix_diff/blob::Algorithm Most of these could be solved with
Sorry, bad choice of words. I just meant that I did not make a serious attempt at either keeping the old style intact, nor tried to apply a new consistent style. sometimes I used |
It's probably not true, and when I ready that a macro would be needed to make it happen, I think anything with extra-complexity should not be pursued.
The directive here is that
The more I realise what this would truly mean, I more and more think it shouldn't be done. It's absolutely fine to keep keys in What do you think? Are you OK abandoning the |
Yes, it seems having |
Draft PR. I'm creating this PR because I appreciate any feedback. So far, all I have done is copy the code from gix/src/config/tree to this module, update
use
statements and recreate the features that happened to come along. There are many tasks left. I'm now going to start pondering what the actual API surface.At this point, my only ambition is to add a new crate; integrating the crate with
gix
needs a transition strategy and additional PRs.Because it was previously part of
gix
, the apex predator, it borrowed enums left and right and called them values. In my opinion, the depenency list is too long (and probably contains non-plumbing stuff too). We need a strategy for enums/constants and similar that allows us to remove at least some of the dependencies. In order to get compiling code, I have copied some enums and types (marked with TODOs) that needs to be replaced.use
situation (I made no attempt to create or retain a common format during migration)Part of addressing #1125 .