Fork me on GitHub
#cursive
<
2016-01-19
>
hugesandwich01:01:58

@cfleming Thanks so much. I thought I was missing something. Binding this would be great for repl sessions, much appreciated.

moizsj04:01:18

@cfleming the lib I'm using (https://clojars.org/org.clojars.scsibug/feedparser-clj) does not appear to have source in its jar (checked in my .m2). So howz cursive able to show the source? And where's the source being stored? (assuming its pulling from somewhere). Is there a way to control this behaviour (say force a source pull for a specific lib etc)

cfleming04:01:33

@moizsj:

Archive:  /Users/colin/Downloads/feedparser-clj-0.4.0.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
      106  05-30-12 18:05   META-INF/MANIFEST.MF
     1890  05-30-12 18:05   META-INF/maven/org.clojars.scsibug/feedparser-clj/pom.xml
      109  05-30-12 18:05   META-INF/maven/org.clojars.scsibug/feedparser-clj/pom.properties
     2086  05-30-12 18:05   feedparser_clj/core$_main.class
     1959  05-30-12 18:05   feedparser_clj/core$loading__4784__auto__.class
     1494  05-30-12 18:05   feedparser_clj/core$make_category.class
     1480  05-30-12 18:05   feedparser_clj/core$make_content.class
     1597  05-30-12 18:05   feedparser_clj/core$make_enclosure.class
     3392  05-30-12 18:05   feedparser_clj/core$make_entry.class
     3800  05-30-12 18:05   feedparser_clj/core$make_feed.class
     1714  05-30-12 18:05   feedparser_clj/core$make_image.class
     1936  05-30-12 18:05   feedparser_clj/core$make_link.class
     1590  05-30-12 18:05   feedparser_clj/core$make_person.class
     1611  05-30-12 18:05   feedparser_clj/core$parse_feed.class
     1176  05-30-12 18:05   feedparser_clj/core$parse_internal.class
     1799  05-30-12 18:05   feedparser_clj/core.class
    11305  05-30-12 18:05   feedparser_clj/core__init.class
      270  05-30-12 17:54   project.clj
     4144  02-29-12 20:21   feedparser_clj/core.clj
 --------                   -------
    43458                   19 files

cfleming04:01:46

It does contain the source file: feedparser_clj/core.clj

cfleming04:01:00

You can tell where it is by navigating to the source, and then using Navigate-&gt;Select in… and choosing Project View

moizsj05:01:59

ok..sorry i missed that. So supposing the source wasnt in there, would Cursive have done something abt it? Automatically attempt to search the source artifact in clojars and pull it down?

cfleming07:01:53

@moizsj: No, this is tricky in Clojure. Cursive used to go out automatically but it was extremely slow because 99% of artifacts don’t have source artifacts.

cfleming07:01:20

There’s no good way to tell if a dep has them, so Cursive would always go out for a bunch of things that were never there.

cfleming07:01:49

Now this only really works well for Java libs - the first time you navigate to a class you’ll get the option to attach the source to it.