Fork me on GitHub
#clr
<
2023-06-02
>
vncz02:06:22

@jarvinenemil This is starting to look very interesting, can you share the code that is implementing the example?

vncz02:06:03

In Microsoft anything non .NET is a bit frowned upon (though we do have some services in Java); having Clojure .NET would really allow me to have both and I am supposed to write an example soon

dangercoder11:06:10

@vincenz.chianese here's some code: https://github.com/Dangercoder/clojure-clr-dotnet-api This repo is an example of how to use .NET 7's minimal api 100% async (database access, http-request processing..) It also contains instructions on how to: • Develop • Run • Build - only Docker - (we can't compile clojure-clr to a .`dll` on .NET 3.1+ due to https://github.com/dotnet/runtime/issues/62956) The repo is supposed to evolve into a full example of a minimal production grade app, there are some clojure libraries missing that I would like to use, e.g. https://github.com/seancorfield/honeysql I'm planning to move all the interop code to separate nuget packages once I've thought about them a bit more.

2
vncz15:06:55

Fantastic, thank you very much!

seancorfield15:06:55

What's "missing" about HoneySQL at this point? It runs on CLR (based on minimal testing, admittedly).

dangercoder15:06:11

I can't fetch it via nuget

seancorfield16:06:43

Ah, you don't support git deps yet?

seancorfield16:06:08

Is there a GH action for packaging a Clojure lib and deploying it to the (a?) Nuget repo?

seancorfield16:06:41

(I know nothing at all about Nuget or packaging CLR stuff...)

dangercoder16:06:28

Not yet but It might be worth waiting on the tools.deps work that @U45FQSBF1 is working on.

seancorfield16:06:55

Yeah, until I can set up automated testing (via a fork of Cognitect's test-runner, perhaps) and automated build/deploy, I don't feel I can really go beyond git deps for my libraries. But I would like HoneySQL to become widely used in the CLR world, which is part of my driver for being involved here...

dmiller16:06:36

I have a fork of cognitect test-runner. it loads. Not thoroughly tested yet. https://github.com/dmiller/test-runner

dangercoder16:06:47

I've added structured logging support to the repository which is very useful- Serilog. The logger impl is using the common Microsoft.Extensions.Logging.ILogger interface. Example:

(info "User Created {@userId}" 1337)
{"@t":"2023-06-03T16:57:51.0717786Z","@m":"User Created 1337","@i":"052f201b","userId":1337,"SourceContext":"potion"}

Anders Eknert11:06:16

absolutely killing it, @jarvinenemil 👏

gratitude-thank-you 2