GithubHelp home page GithubHelp logo

lsif-semanticdb's Introduction

This project is now part of lsif-java

Visit https://sourcegraph.github.io/lsif-java/docs/getting-started.html to install the lsif-java command-line tool. Run the following command to generate LSIF from SemanticDB.

lsif-java index-semanticdb [SEMANTICDB_DIRECTORIES ...]
lsif-java index-semanticdb --help # for more information

lsif-semanticdb's People

Contributors

aidaeology avatar efritz avatar gbrik avatar olafurpg avatar shrouxm avatar strum355 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsif-semanticdb's Issues

Missing markdown hover language

As lsif-semanticdb is now being used beyond just Scala, we can't hardcode for it anymore. I'm not sure if metacp attaches Langauge to SymbolInformation, but we currently don't do that in semanticdb-javac, hence we get the unknown language for markdown hovers here.

We can't simply use the document language in the long term, as a symbol may be an external symbol defined in a different language to the document its referenced in. While it isnt currently the case that external 3rd party symbols are included in the output (an amount of work will be involved for this if we assume deps may be not just java), it will be soon:tm:.

cc @olafurpg

Respect LSIF 4.x specification of unique ranges

Currently, lsif-semanticdb does not necessarily generate unique ranges.

Consider this example:

package foo

import bar.B

object A

package bar {

  class B

  object B
}

This generates the following lines in dump.lsif:

{"id":47,"type":"vertex","label":"range","start":{"line":2,"character":11},"end":{"line":2,"character":12}}
{"id":48,"type":"edge","label":"next","outV":47,"inV":38}
{"id":49,"type":"vertex","label":"range","start":{"line":2,"character":11},"end":{"line":2,"character":12}}

Note that ids 47 and 49 are the exact same range.

This is likely because the semanticdb info from metac (version 2.12.8) generates references for both the class and the companion object:

  occurrences {
    range {
      start_line: 2
      start_character: 11
      end_line: 2
      end_character: 12
    }
    symbol: "foo/bar/B."
    role: REFERENCE
  }
  occurrences {
    range {
      start_line: 2
      start_character: 11
      end_line: 2
      end_character: 12
    }
    symbol: "foo/bar/B#"
    role: REFERENCE
  }

The solution would likely be something like range((2,11),(2,12)) goes to a resultSet which has a textDocument/definition with 2 items in inVs (one for the class and one for the companion object).

Dependency Dashboard

This issue contains a list of Renovate updates and their statuses.

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

lsif-semanticdb should take --semanticdbDir as an argument(s)

$ lsif-semanticdb META-INF/semanticdb/foo
error: unexpected META-INF/semanticdb/foo

$ lsif-semanticdb --help
usage: lsif-semanticdb --semanticdbDir=SEMANTICDBDIR [<flags>]

I believe it would be a better experience if semanticdbDir were an argument instead of a required parameter, i.e. passing it the semanticdbDir directly so we could use it with the syntax lsif-semanticdb META-INF/semanticdb/foo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.