Fork me on GitHub
#clr
<
2023-01-06
>
Anders Eknert15:01:45

What’s required to create an issue in the ClojureCLR JIRA? I have signed the contributors agreement and I’m listed on that page, but I don’t seem to be authorized to log in to JIRA. Alternatively, is there any chance that ClojureCLR could be allowed to use GitHub for issue tracking, even if it’s not what the main Clojure project uses? It would definitely lower the barrier for reporting issues. If that’s not doable, we could perhaps at least open up a GitHub discussion board for ClojureCLR, where issues could be reported and then created in JIRA by someone authorized to do so 🙂

Alex Miller (Clojure team)15:01:18

for Clojure and ClojureScript, we consider https://ask.clojure.org to be the front line place to file issues (which I then turn into jiras). We generally reserve jira accounts for people providing patches as there are some limits on user count in the instance we're using

Anders Eknert15:01:00

Thanks Alex. I’ll have the README for the project updated to reflect that 👍

Anders Eknert15:01:22

oh, for sure! thanks 😃

dmiller15:01:30

If you specify use of the ClojureCLR category on http://ask.clojure.org, I can monitor that one explicitly. The last entry was in 2021, so it's not exactly a go-to place at this point.

Anders Eknert15:01:35

If you want me to, I’ll submit another PR tonight to align the contributors doc with the one from Clojure, with some changes for ClojureCLR

dmiller15:01:57

yes, please.

👍 2
Anders Eknert16:01:56

@U064X3EF3 if you don’t mind a meta question, do people “accept” an answer when it’s been acknowledged/logged, or when the issue has been resolved?

Alex Miller (Clojure team)16:01:21

people do both, it's not consistent

Alex Miller (Clojure team)16:01:58

generally when we release a fix for an issue, I try to close the question

Anders Eknert16:01:37

👍 I’ll mark it as accepted then, as I’ll fix this myself if @U45FQSBF1 doesn’t beat me to it 🙂

Alex Miller (Clojure team)16:01:33

if someone needs more rights in http://ask.clojure.org, it is possible for me to elevate user privileges for specific categories to mark certain people as "experts" etc. also, there are category-specific RSS feeds if those become useful for tracking

Anders Eknert16:01:00

that’s useful, thanks 👍

Emma Griffin16:01:12

Any good documentation on using import in ClojureCLR? From what I understand you have to dynamically load .dll files in ClojureCLR to use third-party C# libraries, but I'd rather use import than assembly-load or assembly-load-from if possible. Especially because this seems to better reflect C# (i.e. using Some.Library) and Clojure (i.e. import java.something.whatever) syntax for requiring libraries. If import can't be used for this case, I'd be curious what limitation prevents it from being used. Is this a .NET issue? a ClojureCLR issue? Or something else?

Emma Griffin16:01:25

To make my question more specific, what directories are searched for when import is called, and what type of files are looked for (`.dll`s I would assume, but maybe also .so for native dependencies)?

Emma Griffin16:01:17

I would think there would be a local directory where project specific libraries are stored and a global directory where system-wide libraries are stored, as I believe this is how Clojure handles Java dependencies iirc

dmiller16:01:27

where import searches: Not well documented (common problem). I have to double-check the source to remember. The bigger problem is knowing what assembly to load in order to handle an import. the actual code could be a resource in an assembly that does not have the same name. If you look at how Clojure libraries up on nuget are packaged, the dll will have all the clj files from the library are embedded resources. I have thought about adding an extension to the ns macro to allow one to declare the assemblies that need to be loaded. Putting the assembly-load calls before the ns statement is how we handle it now, but that is problematic for some of the source code analysis software that looks for the ns as the first form in the file.

gratitude-thank-you 2
Emma Griffin16:01:32

Loading dependencies that themselves have dependencies is a very tedious problem at the moment that lein-clr does not handle well. And, as far as I know, there's no straightforward way to handle it with dotnet or by hand beyond manually finding the necessary dependencies or having dotnet or lein-clr find nested dependencies and manually calling assembly-load-from in the correct order, which becomes very tedious and often results in long troubleshooting of "method not found" or "assembly not found" type exceptions.

Emma Griffin16:01:21

All of this becomes much harder as soon as native dependencies are added to the mix.

Anders Eknert10:01:25

I guess another option could be to have some convention for a pre-load namespace, which is called before main? Although it would have to be understood by tooling too. IIRC shadow-cljs has something like that.

Emma Griffin17:01:20

@U03AU2X8TD5 hmmm, I'm not sure I follow

Anders Eknert23:01:57

You can probably ignore that… having spent some days looking into it, it seems to be more complex 😅

kdchabuk16:01:05

Is it straightforward to get a ClojureCLR IDE setup similar to IntelliJ+Cursive? I'd like to start writing a guide to do that for someone with only C# experience.

clojure-spin 2
Emma Griffin16:01:57

Not an IntelliJ user myself but I think this is a great idea. Unfortunately the state of ClojureCLR REPL usage is limited to either a simple CLI REPL or using inf-clojure if you're on emacs, at the moment. Despite this, I still think providing a guide to getting ClojureCLR setup for new users is a good resource

Emma Griffin17:01:54

You may be able to add the script that @U03AU2X8TD5 provided https://clojurians.slack.com/archives/C060SFCPR/p1672867422822429 in your guide, to make the REPL experience better at least from the CLI

gratitude-thank-you 2
Emma Griffin17:01:40

I believe @U45FQSBF1 is actively working on getting nrepl support for ClojureCLR, but this is an arduous process from what I understand

📣 2
Emma Griffin17:01:05

From there, Cursive integration for ClojureCLR would likely be plausible, but I'm not 100% sure

dmiller17:01:49

I am working on nrep quite actively. Again this morning, in fact. 'Arduous' is a fair description. I actually have basic client/server evaluation back-and-forth going, but disconnecting client and server is causing an exception that I have not yet figured out how to deal with properly. but progress is still being made.

gratitude-thank-you 9
🎉 9
Anders Eknert17:01:18

Are disconnects a frequent thing? If not it sounds like something I could live with until fixed 😄

Anders Eknert18:01:15

@U03K7Q0EF8D nREPL support would go a long way, but there’s a lot of Java(Script) stuff that seems to be taken for granted in Cursive… which I suppose is to be expected since it’s not targeting ClojureCLR

kdchabuk19:01:20

Ok thanks. Apparently .NET isn't supported in IntelliJ itself due to the different build system. (Jetbrains has a separate IDE for .NET)

2
Anders Eknert19:01:16

We can probably do without .NET support as long as we’re able to eg ignore errors in imports and such

👍 2
Anders Eknert19:01:51

(Since IntelliJ/Cursive will think that’s Java)

Emma Griffin19:01:25

Yeah, if IntelliJ can support ClojureScript, I'm sure it can support ClojureCLR

Emma Griffin19:01:13

I assume a lot of that .NET support is for building C#/F# projects, which you can always do by hand

dmiller20:01:28

Not sure how often disconnects occur. And it's just a warning that comes out on *err*. So, yes, one way or another, we will move forward. I need to get some of the other pieces of middleware tested. Some will require some thought on how to deal with, such as things that are ClassLoader or classpath oriented. And that may be optional to getting started.

👍 4
Alex Miller (Clojure team)22:01:04

https://clojurians.slack.com/archives/C0C4WV96U/p1673042571865769 - see for info on tickets, call for presentations, and sponsorship!

😃 10