duct

iarenaza 2023-03-08T09:05:53.357049Z

We are using it in all of our projects. The only thing we were missing was figwheel-main support, as the Duct included lein-figwheel option is no longer an option for us. We simply created a figwheel-main Duct library implementing a duct/server.figwheel compatible[1] solution: https://github.com/gethop-dev/duct.server.figwheel-main [1] As compatible as possible, as figwheel-main configuration is not 100% compatible with the old lein-figwheel solution.

πŸ‘ 2
πŸ‘ 2
2023-03-08T17:33:57.638719Z

Cool, I'll check it out, thanks. What was it about lein-figwheel that didn't work? Did you switch to tools.deps or something?

iarenaza 2023-03-09T11:08:02.550189Z

We are still using Leiningen in our projects (both because it suits us well, and because using Duct with deps.edn is more work and a bit of a hassle). But the main reasons was that we wanted to have ClojureScript hot-reloading on file saving, without having to execute (reset) in the REPL, and also that lein-figwheel was considered "the old choice" by its author, and recommends that you switch to figwheel-main (if you can). So we suspect lein-figwheel is going to go in "not actively supported mode" in the short term. As a side-effect we got another benefit. We had a lot or weird issues with protocols when we run (reset) (we use protocols a lot, to define the boundaries of our system with the external subsystems, as we are using the hexagonal architecture for our apps). We were not able to get to the bottom of the issue with lein-figwheel, but switching to figwheel-main made those weird issues totally disappear.

πŸ‘ 1
2023-03-08T03:36:07.622119Z

Hi all, just trying out duct for the first time and trying to get a +cljs project working in vscode with calva (really enjoy developing in this environment!). @pez I found a conversation from a few years ago where you were trying to get it running and James suggested adding something to lein-duct. I can't find any follow up information, though. Anyone have any suggestions or recommendations?

2023-03-08T13:02:21.392909Z

One of the things you mentioned trying was these settings:

{
    "calva.replConnectSequences": [
        {
            "name": "Server only",
            "projectType": "Leiningen",
            "afterCLJReplJackInCode": "(do (dev) (go))",
            "cljsType": "none"
        },
        {
            "name": "Server + Client",
            "projectType": "Leiningen",
            "cljsType": {
                "dependsOn": "lein-figwheel",
                "connectCode": "(do (dev) (go) (println \"Server started\") (cljs-repl))",
                "isReadyToStartRegExp": "Server started",
                "printThisLineRegExp": ":duct.server.http.jetty/starting-server"
            }
        }
    ]
}
I can give it a try later, but where do I put this? I haven't checked the Calva website yet. Is there a guide for this configuration?

pez 2023-03-08T13:33:33.250259Z

It goes into .vscode/settings.json. Guide, idk. πŸ˜ƒ But there is some documentation: https://calva.io/connect-sequences/

πŸ‘ 1
pez 2023-03-08T05:55:29.908869Z

Hi! I don’t remember how my attempts ended with this, unfortunately.

2023-03-08T03:37:57.903419Z

On a related note, is duct still alive and well? It doesn't seem like there's been much activity lately and it hasn't reached 1.0.0 yet despite being a few years old. It's a really neat little framework

weavejester 2023-05-15T01:29:04.958739Z

I'm still around at least, though I haven't worked on Duct for a little while. I went through a period of burnout for a year or two where I had minimal open source involvement (basically just reviewing and merging PRs), and now that I'm more active I'm working my way through the backlog.

πŸ‘ 6
2023-05-15T02:35:25.729999Z

Ah, I see. I hope you've had the time needed to recover. I've seen your name attached to quite a lot (and I'm sure you've got more going beyond that), so I'm sure it's not easy to stay on top of everything. Much appreciated though: your repos and talks around transparency through data and DI have been illuminating

βž• 2