-
Notifications
You must be signed in to change notification settings - Fork 284
Change Comments #5895
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
base: trunk
Are you sure you want to change the base?
Change Comments #5895
Conversation
8065abc to
939fb88
Compare
a4d6cde to
26485f1
Compare
|
I'm still a little worried about adding and then outgrowing the config file and then needing to do a migration and uncertain cleanup. We already did that once and then eventually chose to absorb its contents into sqlite. What's the reasoning for going back to a file for this? Otherwise seems great! |
|
@aryairani My understanding with the previous config was that it was configurator that we didn't particularly like, and also removed it because it was unused at the time: #5299 I think there's also a distinction to be made between codebase config and user config/preferences; |
|
Yeah I definitely agree about codebase-specific stuff being separate from user config/preferences
By "outgrowing" it, I meant I imagine wanting to implement user preferences that would be a headache to express and maintain as a .toml file; as opposed to in a user-preferences sqlite fully managed by ucm and/or ucm desktop. By "cleanup" I meant if we upgrade to a database later; and by "uncertain", I meant we'd have to decide at runtime whether to delete the text file, or just leave it there, or ask the user. For Configurator, I was thinking
So I was wondering wdyt about a user preferences database? Does that become a pain for implementation reasons? |
|
@aryairani Thanks that helps; Yeah I think storing structured stuff is a good argument. Maybe adding it to the codebase is the best place to start and we can migrate it out later if we want? |
|
My vote is also to not ever bring back random config files. They really bug me, honestly. And I would just use the existing database, no need to get fancy. I'd wager most users, myself included, only have one codebase that they use on their machine and anything else is a niche case for people who are doing development on Unison's implementation. To the extent that people actually do have separate codebases, it's not clear that they will even want the same settings for both. (Imagine a "work" and a "personal" codebase, with different emails and/or author names) It's like, why introduce some inheritance system for a piece of information that people will maybe change... once or twice, ever? It just doesn't pay its way to try to introduce some reuse mechanism to avoid the user having to type |
Yeah, that makes sense. But I think we are still effectively managing two schemas and two sets of migrations even if we go ahead with a
I like this (option three?) better from the cleanup angle, though we'd face some similar issues e.g. we migrate out from one codebase and then load another codebase that hasn't been migrated, we have to choose something. Or we just don't migrate anything, and they reconfigure their preferences from scratch, that's probably also okay for now. A fourth option (related to the first): we go ahead with the A fifth option: read from I'm thinking:
How much extra work do you think each of those options would be? |
|
@pchiusano wrote:
Well, that's a good point re. having different publishing profiles for the same person. It doesn't really fit into any of the implementation proposals so far though, so *more thinking*. They'll have (maybe?) a single key that corresponds to the specific machine, the same name in both cases, possibly a different email address; we weren't using email for identity though, but rather linking private keys to an account on Share (or Enterprise Share) that would be their identity/identities when publishing. Let's still start with a user-level db or user-level text file (short term), assuming it's a manageable amount of work, and if we decide we need multiple identities or other codebase specific preferences, it'll be easy to override that in the codebase. |
caf999b to
c1f8e82
Compare
Overview
Implements a prototype of Change Comments, which will be Unison's simulacrum to Git's commit messages.
As part of this, also adds a
config.tomlfile.See this RFC for more in-depth discussion
Key differences from commit messages are:
Rather than baking commit messages directly into the commit, users can leave comments on changes, which are then synced between codebases.
Benefits:
Cons:
Implementation notes
This PR implements the UCM side of commit comments, I'll expand on this to add sync with Share as we go.
Notably, it only supports one active comment on each causal, re-annotating it will just edit that existing comment.
We don't support any form of syncing these across codebases or Share yet.
change_commentsandchange_comment_revisionstables for storing causal commentsannotatecommand which annotates a given causal, e.g.annotate /mainannotate #abcdefetc.$XDG_CONFIG/unisonlanguage/config.toml, which currently only includesauthor.nameconfig.editwhich opens the editor on your config.Here's what it looks like if you have an error in your config:
And if you don't have an author set:
Interesting/controversial decisions
Test coverage
Loose ends