-
Notifications
You must be signed in to change notification settings - Fork 379
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
Add workspace config #3670
Open
HybridEidolon
wants to merge
1
commit into
jj-vcs:main
Choose a base branch
from
HybridEidolon:workspace-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+97
−11
Open
Add workspace config #3670
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HybridEidolon marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm wondering whether
.jj/working_copy/config.toml
might be a better location for this. Otherwise, this emphasizes the working-copy config over the repo-level config, and I'm not sure that's desired (people might assume this is the ONLY config file, and that it's therefore repo-level).@yuja , @martinvonz , WDYT?
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.
My feeling is that
.jj/working_copy
is the store directory dedicated for theWorkingCopy
implementation, so better to not add arbitrary files in it.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.
OK.
I suppose, if need be, we could later move
.jj/working_copy
to.jj/workspace/working_copy
and then.jj/config.toml
to.jj/workspace/config.toml
.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 still find myself a little worried about people thinking that workspaces are broken if they end up using
.jj/config.toml
instead of.jj/repo/config.toml
.WDYT of putting this file in
.jj/workspace/config.toml
now, and then movingworking_copy
to that dir later?This is made better by
jj config edit
andjj config path
existing, so I don't think it's absolutely critical, but it would be nice to not have to move the config file later (with all the doc changes and backwards compatibility work that involves)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.
Maybe the file can be renamed to
.jj/workspace-config.toml
, then?BTW, do we have any practical use case of workspace-specific configuration? If we don't, and if the existence of
.jj/config.toml
is confusing, it might be better to not support workspace config at all. Not having workspace config might help simplifyIncludeIf
-like conditional. #616There 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.
Yes, but I assumed it's practically okay to set it to repo/config.toml. (Maybe I should say "immediate need", not "real use case".)
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.
If we go in the direction of supporting "IncludeIf" and conditional config, it might make sense to put workspace config inside repo config under a key like
[if.workspace.default]
(assumingif.something
is how other conditional config can be setup; I'd want these to have similar syntax if possible, thought it's not absolutely necessary).For something like executable bits, we could eventually have a fancier conditionals like "Config for all workspaces under
/mnt/c
" (or whatever the WSL mount for the NTFS C: drive is).At the same time, I'm not sure whether the conditional config idea is more practical for now (or in general). It might be easier to have
workspace-config.toml
for now (or even permanently).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.
For context, the reason I went ahead and implemented the workspace config is because I had a complex repository scenario where multiple related-but-divergent trunks shared a lot of history, and wanted to use multiple workspaces to manage the different related codebases with different jj templates and revsets for each.
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.
Ok, if there's a real need, we shouldn't be too nitpicky. Let's land
.jj/config.toml
or.jj/workspace-config.toml
. I think @ilyagr is okay with.jj/workspace-config.toml
.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'm OK with
.jj/workspace-config.toml
. I appreciate Eidolon explaining one more use-case; I don't have a clear opinion on what the conclusion from that or from Martin's use-case should be.