Fork me on GitHub
#announcements
<
2024-03-26
>
Kurt Harriger23:03:45

Hey all. I wanted to announce that https://www.clojuriststogether.org/ will be sponsoring the initial development of https://github.com/kurtharriger/clj-mergetool! https://github.com/kurtharriger/clj-mergetool is a git diff and mergetool specifically designed for edn and clojure(script) code. Based on my prior experience implementing collaborative editing and conflict-free replicated data types for Atlassian confluence I realized that many merge conflicts in Clojure could be avoided if the diffs were based on code structure and intent rather than lines of text. While this project is just starting, I could use some help collecting real world merge conflict examples. If you are working on an open source project and encounter merge conflicts that you think git should be smart enough to resolve automatically, consider https://github.com/kurtharriger/clj-mergetool?tab=readme-ov-file for me which will help me build some real world test cases.

👀 19
🎉 40
😍 5
🙏 2
clojure-spin 1
clojurists-together 2
phronmophobic00:03:20

Dewey provides a list of clojure repos on github (see deps-libs.edn.gz in https://github.com/phronmophobic/dewey/releases). It should be possible to create a script that finds almost all merge commits with manually resolved conflicts that completes in less than a week (I actually think the script would take only a few hours to run, but it should definitely take less than a week). Probably using something like https://stackoverflow.com/a/73569564

👍 1
1
💯 1
Kurt Harriger01:03:17

Interesting. Ill take a look. Thanks!

robert-stuttaford06:03:15

amazing that you're working on this, huzzah!

nate15:03:13

Don’t know how much treesitter would help. I use https://github.com/Wilfred/difftastic, which uses treesitter to better represent diffs. There’s also https://github.com/borkdude/rewrite-edn that is on top of rewrite-clj and preserves whitespace.

Filipe Silva12:04:45

@U02RP8DDFLH hey about your may 2024 goal, I recently did something similar: • make a src/foo/bb/cli.clj file with the CLI code • add #!/usr/bin/env bb at the top • add deps and source dirs in src/foo/bb/bb.edn so it's auto-picked up by bb • make a ./symlink-foo.sh script that symlinks the cl.lj to /usr/local/bin/foo I found it works really well and doesn't need any other funny config. This is my https://github.com/filipesilva/fdb/blob/master/src/fdb/bb/cli.clj file.

Filipe Silva12:04:01

the placement of the bb.edn inside the bb dir is important: bb will auto-lookup that config file, but I didn't find any straightforward way of looking it up elsewhere without having to do abs paths, which is harder to determine on the users machine

Kurt Harriger15:04:57

@UJVKWJTGE thanks for the example. The primary blocker for babashka is that editscript uses deftype which isn’t supported by babashka right now.

Filipe Silva15:04:38

ouch, that's unfortunate...