This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-26
Channels
- # announcements (9)
- # babashka (36)
- # beginners (13)
- # biff (24)
- # calva (12)
- # clj-kondo (18)
- # clojure (65)
- # clojure-brasil (1)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (87)
- # clojure-uk (4)
- # clojurescript (28)
- # datahike (25)
- # fulcro (12)
- # hyperfiddle (16)
- # malli (74)
- # missionary (1)
- # music (2)
- # off-topic (24)
- # polylith (4)
- # releases (3)
- # tools-deps (23)
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.
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
Interesting. Ill take a look. Thanks!
amazing that you're working on this, huzzah!
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.
@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.
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
@UJVKWJTGE thanks for the example. The primary blocker for babashka is that editscript uses deftype which isn’t supported by babashka right now.
ouch, that's unfortunate...