This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-14
Channels
- # announcements (1)
- # babashka (19)
- # beginners (50)
- # biff (7)
- # calva (6)
- # cider (13)
- # circleci (7)
- # clj-kondo (49)
- # clojure (45)
- # clojure-belgium (1)
- # clojure-europe (2)
- # clojure-indonesia (1)
- # clr (12)
- # datomic (3)
- # events (7)
- # fulcro (4)
- # graphql (2)
- # gratitude (1)
- # instaparse (5)
- # lsp (17)
- # off-topic (26)
- # polylith (15)
- # portal (4)
- # remote-jobs (2)
- # spacemacs (12)
[ANN] clojureclr-1.12.0-alpha3 Some bug fixes. Most prominent are some things you can read about above.
Why is this giving me bad type
.NET 6 is installed? I was expecting this dll to be found when running: Clojure.Main -m clj-api.main
on ubuntu. Thanks
Think I found the error. Microsoft.AspNetCore.Http is a partial class. In order to load HttpContext I need to load more dlls.
Correct, in order to load Microsoft.AspNetCore.Http HttpContext I need to:
(assembly-load-file "/usr/lib/dotnet/shared/Microsoft.AspNetCore.App/6.0.13/Microsoft.AspNetCore.Http.Abstractions.dll")
This is cool, now I can build a .net core app via the repl. 🙂
So I thought. I've spent many hours trying to get https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.webapplication?view=aspnetcore-6.0 to load (can't find the correct assembly, loaded everything in /usr/lib/dotnet/shared/Microsoft.AspNetCore.App/6.0.13)
Microsoft.AspNetCore.Builder WebApplicationBuilder is available though but I want the WebApplication class. 😾
very interesting, thank you for sharing! How are you going to be hooking routes? via .MapGet etc...?
When I was doing this I extended the original Clojure.Main with .Web
sdk, and created a wrapper around WebApplication
I’m using .MapGet and delegates. core.async can be used to interop with Tasks
Next step is to remove boilerplate with macros and add e.g. json-> edn support. .NET Core is actually very usable from Clojure, compared to e.g. the java counterpart Spring.
Not yet, once I manage to load the WebApplication class directly from clojure-clr I’ll OSS it 🙂
still no luck. Getting bad type whenever I try to reference (import '[Microsoft.AspNetCore.Builder WebApplication])
. According to packs/Microsoft.AspNetCore.App.Ref/6.0.13/ref/net6.0/Microsoft.AspNetCore.xml
the Microsoft.AspNetCore.dll contains the WebApplication dll.
still no luck. Getting bad type whenever I try to reference (import '[Microsoft.AspNetCore.Builder WebApplication])
. According to packs/Microsoft.AspNetCore.App.Ref/6.0.13/ref/net6.0/Microsoft.AspNetCore.xml
the Microsoft.AspNetCore.dll contains the WebApplication dll.