-
Notifications
You must be signed in to change notification settings - Fork 301
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
fix: Add enabled
config for fix tools
#4401
base: main
Are you sure you want to change the base?
Conversation
Sounds good. Mercurial has a similar feature. @hooper might want to review this |
Since |
Oh, that's a very good point, I didn't think of that possibility. |
f27d04f
to
9ca3ead
Compare
Me neither. Very good point! The best solution I came up with so far would be to split We could, of course, also default P.S. Thanks for working on this, Stephen! |
This might be a rejected idea, but we can add a list of tool names to be used, and the default list will be constructed from Oh, the default |
I didn't know that was an option. If we stick with Stephen's current approach, we could use Though, the approach I suggested above would also help the user if they want to set up default tools in their user config without accidentally disabling a tool config in their repo config. |
Adds an optional `fix.tools.TOOL.enabled` config that disables use of a fix tool (if omitted, the tool is enabled). This is useful for defining tools in the user's configuration without enabling them for all repositories: ```toml # ~/.jjconfig.toml [fix.tools.rustfmt] enabled = false command = ["rustfmt", "--emit", "stdout"] patterns = ["glob:'**/*.rs'"] ``` Then to enable it in a repository: ```shell $ jj config set --repo fix.tools.rustfmt.enabled true ``` This also allows Jujutsu to ship some built-in tool configurations that are disabled by default.
Maybe the simplest solution would be for any built-in fix tools to be named If we'd rather do the |
9ca3ead
to
8286a3d
Compare
Yes. It's not fancy, but works. @hooper any comments? I'm also interested in whether or not something like the following was rejected. It will solve the ordering issue, but it's not fancy either.
|
I think it’s a good idea, but was hoping to defer the work when/if we actually want to ship built-in tools. |
That's reasonable, but the list (of enabled tool names) will replace |
As inspired by @ilyagr: https://discord.com/channels/968932220549103686/969291218347524238/1276278608729608243
Adds an optional
fix.tools.TOOL.enabled
config that disables use of a fix tool (if omitted, the tool is enabled). This is useful for defining tools in the user's configuration without enabling them for all repositories:Then to enable it in a repository:
This also allows Jujutsu to ship some built-in tool configurations that are disabled by default.
Checklist
If applicable:
CHANGELOG.md