find usages (reverse lookups) #425

Open
fommil opened this Issue Jun 23, 2014 · 17 comments

Projects

Backlog in Sponsorship

7 participants

@fommil
Member
fommil commented Jun 23, 2014

there is no real reason why we can't use lucene to do the "who references me" style questions... no need to re-type check anything. Every time a file is edited, we rebuild the index for that file.

@fommil fommil added this to the Backlog milestone Jun 23, 2014
@fommil fommil added the OMG! Ponies! label Jun 23, 2014
@fommil fommil added this to the Improved Search milestone Jul 1, 2014
@fommil fommil self-assigned this Jul 9, 2014
@fommil
Member
fommil commented Jul 11, 2014

@aemoncannon I'm currently looking at search and it seems that Lucene is only being used for indexing the binary classfiles. Does that mean we don't get search if our own source code hasn't been compiled yet?

I'd like to use Lucene to cache a lot of useful information that the presentation compiler can provide us about our own source code. Are you aware of any callback interfaces? e.g. for when it hits classes, traits, methods or (ideally) references to other symbols.

@fommil
Member
fommil commented Jul 11, 2014

aah, I just found the callbacks in RichPresentationCompiler. It's all very much about symbols... we're missing the other information. Also, there doesn't seem to be anything about the references to a symbol, just the definitions? (or am I reading this wrong). I'll stick some logging around this and play some more tomorrow.

@fommil fommil removed their assignment Sep 19, 2014
@fommil fommil modified the milestone: Improved Search, Stable 1.0 Dec 29, 2014
@fommil
Member
fommil commented Jan 26, 2015

this might be dropped from 1.0 unless it turns out to be easy to implement

@fommil fommil modified the milestone: Next Gen 1.1, Stable 1.0 Feb 27, 2015
@tpolecat

(Adding myself to this since issue since I'm looking into the db stuff.)

@fommil
Member
fommil commented Jul 16, 2015

w00t! I should imagine it will dramatically increase the DB size so any thoughts on optimising the storage would be well received (although I suspect having a good filter on which symbols we care about... i.e. not java.lang.* or any anonymous classes) would be good enough.

FYI when we call this method https://github.com/ensime/ensime-server/blob/master/core/src/main/scala/org/ensime/indexer/ClassfileIndexer.scala#L17 we get handed the FQNs of everything in that file.

@cvogt
Contributor
cvogt commented Aug 24, 2015

+1 :)

@fommil
Member
fommil commented Aug 24, 2015

@cvogt you should know that @tpolecat is putting together a patch to move us to Doobie and he has threatened to look into this ๐Ÿ˜„ It's also on my personal hitlist soonish if he doesn't get to it.

@cvogt
Contributor
cvogt commented Aug 26, 2015

@fommil @tpolecat no problem. I like what @tpolecat is doing. I am trying to excite people about type-safe composable queries :), but I also like doobie's free monad. Seems a bite more elaborate than slick's.

@tpolecat

I should have more time to work on this next month.

@fommil
Member
fommil commented Aug 26, 2015

I don't really like the scalaz functional style because I find it confuses more than helps, plus is a massive source of object creation / GC overhead. However, in this instance, the benefit is moving away from Slick (which I've now labeled as dirty until FreeSlick is ready) and getting back to raw SQL queries, which were causing compiler warnings in Slick. Hopefully @tpolecat can show us why free monads are useful, but I suspect we'll want all that to be contained to the DAO as implementation details.

@fommil
Member
fommil commented Aug 26, 2015

although it is pretty awesome that we now have two of the Scala community's top DB contributors able to help on this ๐Ÿ˜€ so whatever happens I'm sure we'll have a rock solid implementation.

Is there any chance of an NIO implementation of the JDBC driver for H2?

@fommil fommil added the Blocked label Jan 11, 2016
@fommil fommil added the FAQ label Mar 13, 2016
@fommil fommil added Analyser Indexer and removed Analyser labels Mar 31, 2016
@fommil fommil modified the milestone: Graphpocalypse, TNG 2.0 May 1, 2016
@fommil fommil changed the title from find usages reverse lookup in ensime to find usages (reverse lookups) Oct 14, 2016
@t3chnoboy

Was it implemented in #1602 ?

@fommil
Member
fommil commented Oct 23, 2016

@t3chnoboy no, that's something else, but the graph branch now stores the necessary information.

@olkinn
olkinn commented Jan 11, 2017

is this still WIP?

@yyadavalli
Member

@olkinn I think so, waiting on #1681

@fommil
Member
fommil commented Jan 11, 2017

Heh, yeah it's taking us forever to get the graph branch merged... we've had bad CI reliability problems hopefully now fixed. We'll probably do Scala 2.12 first since it's easier

@sugakandrey
Contributor

It's coming... eventually :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment