Fork me on GitHub
#clr
<
2023-01-19
>
bobcalco20:01:53

Given .NET remains kind of fragmented in terms of runtimes, and allowing that there are three "major" such fragments - .NET Core, .NET Framework, and Mono - I'm starting to think *.cljr files should support their own reader conditionals - e.g., #?(:core ... :net ... :mono). I'll adorn my hockey gear and expect incoming projectiles from @dmiller now... lol.

dangercoder20:01:48

Looks like the .NET folks are actively labbing with AssemblyBuilder.Save(), .NET 8 maybe? 🤞 https://github.com/dotnet/runtimelab/tree/feature/assembly-builder-save

dmiller20:01:01

No projectiles. I've conceded already. Re AssemblyBuilder.Save() Wow. Fingers crossed indeed. But I'll still need to support Core3.1 and .Net 6/7 for a long while. Unless we can get everyone to upgrade.

dangercoder20:01:36

If AssemblyBuilder.Save() get's re-introduced would it be possible to still support Core3.1 and 6/7 without compilation but anyone who uses .Net 8 and onwards can compile standalone dll's?

dmiller21:01:33

I would think so. Framework 4.8 also would continue as is.

👍 2
bobcalco21:01:56

"No projectiles. I've conceded already." <-- So, alpha4? :rolling_on_the_floor_laughing: (Just kidding!)

bobcalco22:01:26

It does require some thought about scope and what symbols we use. @U064X3EF3 raises some good points to consider along these lines.

dmiller22:01:32

At least one Miller is still on game.

dmiller23:01:55

scratch 3.1 then. i dropped .net 5 out of the most recent build, at least.

elena.poot21:01:41

Maybe use namespaced keywords for the cljr-specific reader conditionals. I saw that somewhere. babashka, maybe?

👀 2
Alex Miller (Clojure team)21:01:03

just as another data point, CLJS has had the same debate for years re conditional for browser vs node. they've resisted the urge so far, trying to avoid too much fragmentation. I don't have any data with which to make a decision, but I would consider it carefully

👍 6
2
Alex Miller (Clojure team)21:01:00

I would also request that you not take such generic words in the keyspace, given that this crosses all clojure dialects

bobcalco21:01:11

I agree the keywords should not be too general, but I envision these conditionals only having meaning in *.cljr files. If that mitigates the concern at all. It's just a reality that the .NET APIs are inconsistent across the divergent runtimes. Although they are trying to converge them into core eventually, their unification won't be reality for some time yet (if ever).

Alex Miller (Clojure team)21:01:03

that does help that they are limited in scope

Alex Miller (Clojure team)21:01:22

so at the least, using namespaces would be a good idea probably

bobcalco21:01:00

I'm actively looking into this but this is also not without its trade-offs depending how tooling would support it.

elena.poot21:01:30

OK, I guess not babashka, but I saw it somewhere. But I think :cljr/mono, for instance, would be intuitive and also answer Alex's (perfectly reasonable) request above.

borkdude21:01:53

@terry.poot you might have seen it with shadow-cljs perhaps

elena.poot21:01:12

I don't know, I've been reading so much stuff trying to get rolling on clojure-clr development and figuring out project setups and everything, I truly can't recall where, or what the namespace was, but I noticed it because it was novel and at the same time made a lot of sense when I did.

djblue21:01:56

I've used :org.babashka/nbb as a key in a reader conditional before, maybe it was that one.

borkdude21:01:26

That's in #C029PTWD3HR yes

borkdude21:01:13

It just uses a fully qualified keyword since this is recommended for new clojure implementations to not cause collisions with others

👍 10
2