Fork me on GitHub
#cursive
<
2022-08-01
>
kwladyka10:08:37

scicloj/scicloj.ml {:mvn/version "0.2.1"}

(ns ai.scicloj-experiment
  (:require [scicloj.ml.core :as ml]
            [scicloj.ml.metamorph :as mm]
            [scicloj.ml.dataset :as ds]))
Is it possible to do something to make Cursive see this ns?

imre10:08:18

Cursive sees the namespace alright, it’s the way that namespace exports stuff that throws it off. I think the solution would be to add it to Cursive’s stub generation but that’s a Colin thing

kwladyka10:08:27

I got this info: > This problem is specific to Cursive and other tools that do some code analysis to determine if things are defined or not. http://scicloj.ml does some tricks with its namespaces, which are not compatible with the approach of these tools. If I remember Curisve doesn’t see ns which are created dynamically or something like that

imre10:08:12

> Curisve doesn’t see ns which are created dynamically This is probably right as Cursive (similarly to clj-kondo) does static analysis which work off the set of source files. I don’t think this is what’s happening in your case. It appears to me that the namespace in question exists as a source file: https://github.com/scicloj/scicloj.ml/blob/main/src/scicloj/ml/dataset.clj

imre10:08:40

Cursive can resolve ds as far as I understand, just not ds/dataset

kwladyka11:08:05

I am just thinking if: 1) there is anything what I can do as an user to make it works 2) scicloj can fix this 3) curisve can fix this and on which one I should really “wait” 😉

imre12:08:54

I think this is a 3

👍 1
cfleming21:08:21

Yes, I’ll have a look at that issue and see if it’s an easy fix.

❤️ 1
kwladyka12:08:55

BTW you are doing really good work @U0567Q30W. Cursive is the best.

1
cfleming00:08:55

Thanks for the kind words!

kwladyka10:08:21

hey, do you have any ETA for this one?

ABeltramo10:11:36

I'm hitting the same issue, does ml/pipeline or mm/model work for you? It's not being picked up in my IDE as well..

cfleming21:11:59

I’ll try to look at this today.

Carsten Behring20:11:34

I will change to "code generation" in the next version of This requires first a new release of tech.ml.dataset PR was made: https://github.com/techascent/tech.ml.dataset/pull/334

cfleming03:11:26

@U7CAHM72M Does this mean that all the code will be explicitly generated into the project, rather than being dynamically created at runtime? If that’s the case, hopefully Cursive (and I guess clj-kondo and the like) will be able to index it easily.

Carsten Behring22:11:22

Yes, exactly. I have it working locally, just some depended project needs to be slightly adapted and released

cfleming00:11:10

Great, I will wait for that then and do some testing to ensure it works with Cursive - thanks for doing this! I’ve been meaning to fix the scicloj stuff up with Cursive but hadn’t got around to it.

Ivar Refsdal12:08:30

Add option "Always generate stubs (for this project|for all projects)" #2556 is fixed for the next build! Thanks Colin! https://github.com/cursive-ide/cursive/issues/2556

🎉 4
👍 2
cfleming05:08:09

This is out now!

❤️ 1