-
Notifications
You must be signed in to change notification settings - Fork 323
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
tools: add diffedit3
as a dotslash tool
#4295
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Austin Seipp <[email protected]>
This ensures that they can't bitrot and at least launch on all platforms. Signed-off-by: Austin Seipp <[email protected]>
8c9964c
to
7f91da2
Compare
I said most of this on Discord, but repeating myself, I think using DotSlash just for Currently, the only such tool of note is Another tool we could consider is something to format our Markdown files, probably https://dprint.dev/. See also #3757 (comment) . I'm not 100% sure whether we should recommend using DotSlash or just installing such programs (these are all single-file binaries). If we do use DotSlash, we might also want to use a Cargo xtask or something to run the tools and to avoid the user needing to think about the paths to them. And once/if we are using DotSlash for something else, adding |
One seeming limitation of DotSlash is that they don't seem to support an easy way of keeping the JSON config up to date. They provide a GitHub action that a project on GitHub can use to provide a config to their user (so, I could make |
TBH, I've thought about just writing a Deno script that can do this for some projects. It might be worth it, I'm not sure. But I agree it's a problem. |
For some tools (like However, I think it's important to note these tools are basically only useful for developers, and probably frequent developers at that. So "just install DotSlash" probably isn't too bad, considering it's also a Rust tool. Also, I currently put the following inside my
Which always makes the tools available in my |
@thoughtpolice , I haven't used it, but https://github.com/direnv/direnv/releases seems to have direnv for Windows. I'm not sure how well it works, but it claims to support PowerShell. |
Very interesting. Unfortunately, looking through the bug tracker it seems there are at least half a dozen major Windows issues that probably mean it won't work for us (e.g. bash requirement, mangling env var names) until those are fixed. But I'll keep my eye on it. |
This adds
diffedit3
as a DotSlash file in the repository so that you can get a version of diffedit3 automatically on every platform, including Windows.This is a piece of my buck2 branch, and it might be more widely useful, so I'm submitting it here if anyone wants to give it a shot. (Note that the Buck2 build currently does rely on this functionality, but I think that this should be considered independently of that.)
With this you can run
jj config edit --repo
and add:then run
jj diffedit
in order to use the included binary without having to install it globally.Nit: it would be nice if we could include something like a
$root
variable in themerge-tools.tool.program
field; the above example only works when you run it fromjj root
. But that could be fixed separately.