-
Notifications
You must be signed in to change notification settings - Fork 346
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
docs: Add a Jujutsu from first principles doc. #3089
base: main
Are you sure you want to change the base?
Conversation
b8d1873
to
8366689
Compare
8366689
to
cff19e2
Compare
f784c39
to
99db3b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the intent, but I'm not sure it's time to write this kind of document. I'm worried it'll pin us down to some principles that are either vague or so specific that it'll limit jj
's ability to adjust what it is based on ideas we have in the future.
I understand the appeal of such a document, but I, at least personally, don't feel ready to write or judge one.
I don't think anything you said is particularly bad or wrong, and I appreciate you thinking about these things, but it doesn't feel right enough to me. Perhaps a document that looks less definite and more like a brainstorming session would work a bit better for me.
Again, I don't want to discourage you from thinking about these things, and this is just my opinion, but I'm having a hard time coming up with edits to this that make it feel right. Perhaps others will have clearer ideas or a different opinion.
|
||
## Base design | ||
|
||
The initial base design is to be a conceptually simpler Mercurial, as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits: missing "to", Mercurial does not snapshot anything automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was mostly taken from my understanding from this message from Martin in Discord. As all other CLI parts definitely take the good parts from hg.
docs/jj_first_principles.md
Outdated
|
||
Jujutsu's core tenets are: | ||
|
||
1. Having as few states as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These principles are more or less consistent with what jj
is now, but I'm not sure they are good enough to be stated as "core tenets" of jj
. They are a bit vague and I'm worried it pins our down a bit too much. I also feel differently about them, e.g. I'm not sure I believe in "having as few states as possible" even though, all else being equal, fewer states is of course better than more. We might want to add more states at some points (e.g. tracked and untracked branches were added recently, we might want some concept of topics). We can never make it so that it's "fundamentally impossible' to lose work in your repository, and while I believe quite a bit in trying to make that hard, a large increase in convenience might be worth a potential footgun.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These principles are more or less consistent with what
jj
is now, but I'm not sure they are good enough to be stated as "core tenets" ofjj
. They are a bit vague and I'm worried it pins our down a bit too much. I also feel differently about them, e.g. I'm not sure I believe in "having as few states as possible" even though, all else being equal, fewer states is of course better than more.
Fair enough, I do think that the native backend should strive to keep it that way.
We might want to add more states at some points (e.g. tracked and untracked branches were added recently, we might want some concept of topics).
Here I tend do disagree with you, the whole tracked/untracked branch state only got introduced for Git interop, which isn't a concern for this doc. And topics are pure commit metadata, not another state, the main change will be in the clients.
We can never make it so that it's "fundamentally impossible' to lose work in your repository, and while I believe quite a bit in trying to make that hard, a large increase in convenience might be worth a potential footgun.
While that is true, some backend implementations can make if fundamentally impossible, e.g the Google Spanner one. So this is should be a implementation detail which isn't surfaced on the CLI. So we won't trade convenience there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tangentially related, but it sounds to me that one of your goals here is to describe what JJ would look like without a git backend. Perhaps we could make it clearer in the doc. We could rename all of it to "JJ without Git" or "JJ from First Principles (without Git)", or split out sections that apply more to the Git-backed jj
or to Git-less jj
. I think I missed that this was your focus when I was first looking this over.
BTW, I may sound a bit conflicted on this topic, so I'll write the following down: I absolutely agree that it is important that jj
makes sense conceptually without Git, so this is very much worth thinking about. At the same time, I personally think that the git backend is an absolutely essential part of jj
and will continue to be so for years while people hopefully adopt it. So, I'm quite interested in jj
being a better Git than Git to the degree possible. However, I don't think everyone agrees with assigning that much importance to the Git backend, and I also hope that it will slowly become less essential (though I do imagine this change to be slow for a while).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it sounds to me that one of your goals here is to describe what JJ would look like without a git backend.
Oh, I had not gotten that impression. I thought this doc was intended to explain jj to people who have no VCS background. If one of the goals is indeed to explain how it would look without the git backend, then I agree that that should be made clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tangentially related, but it sounds to me that one of your goals here is to describe what JJ would look like without a git backend. Perhaps we could make it clearer in the doc. We could rename all of it to "JJ without Git" or "JJ from First Principles (without Git)", or split out sections that apply more to the Git-backed
jj
or to Git-lessjj
.
Yes, that's correct, so I've adjusted the title to your second suggestion.
Oh, I had not gotten that impression. I thought this doc was intended to explain jj to people who have no VCS background.
I would call that a that doc a Introduction to JJ
. To my understanding a from first principles doc tries to explain the core concepts and goals of the project.
|
||
## Base design | ||
|
||
The initial base design is to be a conceptually simpler Mercurial, as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider moving this sentence to near the top, as one of the very first ones. And possibly change it to something like
The initial base design is to be a conceptually simpler Mercurial, without losing any of the powerful features DVCSes like Mercurial and Git have.
A lot of git folks worry a lot that "simpler" means "I can't do what I need to do," and also think already that Mercurial is a simpler git, so this would help address that.
Just my two cents though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great suggestion.
A lot of git folks worry a lot that "simpler" means "I can't do what I need to do," and also think already that Mercurial is a simpler git, so this would help address that.
That's another great point, although I'm trying to avoid any references to Git as it is written from a pure Jujutsu PoV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that being from a pure jujutsu POV makes sense, but you're already referencing Mercurial in this sentence, so I figured it was okay. :D
docs/jj_first_principles.md
Outdated
|
||
Jujutsu's core tenets are: | ||
|
||
1. Having as few states as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it sounds to me that one of your goals here is to describe what JJ would look like without a git backend.
Oh, I had not gotten that impression. I thought this doc was intended to explain jj to people who have no VCS background. If one of the goals is indeed to explain how it would look without the git backend, then I agree that that should be made clear.
docs/jj_first_principles.md
Outdated
Jujutsu's core tenets are: | ||
|
||
1. Having as few states as possible. | ||
1. Make it fundamentally impossible to lose work in your repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what you're saying, but I think it's not technically correct (your PC can always crash before you even save, for example) and I think it's going to annoy some readers for that reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've rephrased it to be a bit weaker now.
99db3b3
to
0e209d4
Compare
0e209d4
to
45551c9
Compare
45551c9
to
f63a803
Compare
f63a803
to
042d76e
Compare
042d76e
to
fe2682b
Compare
fe2682b
to
bcb3f15
Compare
This document is WIP. This came up recently in Discord as a explanation was requested without referencing Git, which all our other documents do.
bcb3f15
to
bfd6b11
Compare
This document is WIP.
This came up recently in Discord as a explanation was requested without referencing Git, which all our other documents do.
Rendered
I'll probably need help from @martinvonz and @ilyagr to expand on this.