Skip to content

Commit 10616af

Browse files
committed
Update documentation
- Include Docker installation instructions. For many people it will be easier to use the Docker launcher instead of the Java-based one. - Consistently mention sbt alongside Gradle/Maven. - Consistently mention Kotlin alongside Java/Scala. - Freshen up the landing page.
1 parent 2a6cc1f commit 10616af

3 files changed

Lines changed: 69 additions & 37 deletions

File tree

auto-indexing/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ RUN apt-get install --yes maven npm
44
RUN curl -fLo /coursier https://git.io/coursier-cli
55
RUN chmod +x /coursier
66
RUN npm install --global yarn
7-
RUN /coursier launch --contrib --ttl 0 lsif-java -- --help
7+
RUN /coursier bootstrap --standalone com.sourcegraph:lsif-java_2.13:0.6.11 -o /usr/local/bin/lsif-java

docs/getting-started.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,24 @@ tools that we're planning to support in the future.
1313

1414
The most common way to use `lsif-java` is to run it from CI to upload LSIF
1515
indexes after merging a pull request. The easiest way to install `lsif-java` is
16-
to use the Java launcher.
16+
to use the Docker launcher.
17+
18+
### Docker container
19+
20+
Run the `lsif-java index`command from the `sourcegraph/lsif-java` Docker
21+
container.
22+
23+
```sh
24+
$ docker run -v $(pwd):/home/gradle sourcegraph/lsif-java:latest lsif-java index
25+
$ src lsif upload # (optional) upload index to Sourcegraph
26+
```
27+
28+
If everything went OK, a `dump.lsif` file should exist after the command has
29+
finished indexing the project.
30+
31+
> The Docker container re-downloads all dependencies on every run, which can be
32+
> slow for large projects. Consider using the [Java launcher](#java-launcher)
33+
> instead to re-use the existing build cache of your project.
1734
1835
### Java launcher
1936

@@ -104,7 +121,7 @@ libraryDependencies += "com.sourcegraph" %% "lsif-java" % "@STABLE_VERSION@"
104121

105122
## Run `lsif-java index`
106123

107-
> The `index` command is only supported for Gradle and Maven, see
124+
> The `index` command is only supported for Gradle, Maven and sbt. See
108125
> [Supported build tools](#supported-build-tools) for more details about other
109126
> build tools.
110127
@@ -113,7 +130,7 @@ This command should automatically infer the structure of your codebase and
113130
configure your build tool to generate LSIF.
114131

115132
```sh
116-
# At the root of a Gradle or Maven codebase.
133+
# At the root of a Gradle, Maven or sbt codebase.
117134
$ lsif-java index
118135
...
119136
info: /path/to/dump.lsif
@@ -138,7 +155,7 @@ com.sourcegraph.lsif_java.LsifJava.printHelp(Console.out)
138155
| -------------------- | ------ | ----- | --- | ----------------------------------------------------------- |
139156
| Java |||| |
140157
| Scala |||| [#302](https://github.com/sourcegraph/lsif-java/issues/302) |
141-
| Kotlin | || | [#304](https://github.com/sourcegraph/lsif-java/issues/304) |
158+
| Kotlin | || n/a | [#304](https://github.com/sourcegraph/lsif-java/issues/304) |
142159

143160
### Java
144161

@@ -147,17 +164,17 @@ part of your regular compilation in the build tool. By using Java compiler APIs,
147164
`lsif-java` is able to generate accurate indexing information for a broad range
148165
of Java versions.
149166

150-
| Java version | Support |
151-
| ------------ | ------------------------------ |
152-
| Java 7 ||
153-
| Java 8 ||
154-
| Java 11 ||
155-
| Java 12 | Not tested in CI, but may work |
156-
| Java 13 | Not tested in CI, but may work |
157-
| Java 14 | Not tested in CI, but may work |
158-
| Java 15 ||
159-
| Java 16 | Not tested in CI, but may work |
160-
| Java 17 | Not tested in CI, but may work |
167+
| Java version | Support | Tracking issue |
168+
| ------------ | ------------------------------ | -------------------------------------------------------------------------------- |
169+
| Java 7 || |
170+
| Java 8 || |
171+
| Java 11 || |
172+
| Java 12 | Not tested in CI, but may work | |
173+
| Java 13 | Not tested in CI, but may work | |
174+
| Java 14 | Not tested in CI, but may work | |
175+
| Java 15 || |
176+
| Java 16 | | |
177+
| Java 17 | | [sourcegraph/lsif-java#263](https://github.com/sourcegraph/lsif-java/issues/263) |
161178

162179
### Scala
163180

@@ -174,6 +191,13 @@ by [Metals](https://scalameta.org/metals), the Scala language server.
174191

175192
> Scala.js and Scala Native have equal support as Scala on the JVM.
176193
194+
### Kotlin
195+
196+
The Kotlin support in lsif-java is the least mature compared to the Java and
197+
Scala support. Don't hesitate to report issues at
198+
https://github.com/sourcegraph/lsif-kotlin if you encounter issues using the
199+
Kotlin support.
200+
177201
## Supported build tools
178202

179203
It's possible to use lsif-java with any Java build tool. Some build tools can be
@@ -188,7 +212,7 @@ free to subscribe to the tracking issues to receive updates on your build tool.
188212
| Build tool | Java | Scala | Kotlin | Tracking issue |
189213
| ---------- | ---- | ----- | ------ | -------------------------------------------------------------------------------- |
190214
| Maven |||| |
191-
| Gradle ||| | |
215+
| Gradle ||| | |
192216
| sbt ||| n/a | |
193217
| Ant |||| [sourcegraph/lsif-java#305](https://github.com/sourcegraph/lsif-java/issues/305) |
194218
| Bazel |||| [sourcegraph/lsif-java#88](https://github.com/sourcegraph/lsif-java/issues/88) |
@@ -214,8 +238,8 @@ projects. However, the following Gradle integrations are not yet supported:
214238

215239
| Integration | Supported | Tracking issue |
216240
| ----------- | --------- | -------------------------------------------------------------------------------- |
217-
| Android || [sourcegraph/lsif-java#304](https://github.com/sourcegraph/lsif-java/issues/304) |
218-
| Kotlin | | [sourcegraph/lsif-java#177](https://github.com/sourcegraph/lsif-java/issues/177) |
241+
| Android || [sourcegraph/lsif-java#177](https://github.com/sourcegraph/lsif-java/issues/177) |
242+
| Kotlin | | |
219243
| Scala || |
220244

221245
### Maven

website/pages/en/index.js

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ class Button extends React.Component {
2727
}
2828

2929
Button.defaultProps = {
30-
target: "_self"
30+
target: "_self",
3131
};
3232

33-
const SplashContainer = props => (
33+
const SplashContainer = (props) => (
3434
<div className="homeContainer">
3535
<div className="homeSplashFade">
3636
<div className="wrapper homeWrapper">{props.children}</div>
3737
</div>
3838
</div>
3939
);
4040

41-
const ProjectTitle = props => (
41+
const ProjectTitle = (props) => (
4242
<h2 className="projectTitle">
4343
{siteConfig.title}
4444
<small>{siteConfig.tagline}</small>
4545
</h2>
4646
);
4747

48-
const PromoSection = props => (
48+
const PromoSection = (props) => (
4949
<div className="section promoSection">
5050
<div className="promoRow">
5151
<div className="pluginRowBlock">{props.children}</div>
@@ -71,7 +71,7 @@ class HomeSplash extends React.Component {
7171
}
7272
}
7373

74-
const Block = props => (
74+
const Block = (props) => (
7575
<Container
7676
padding={["bottom", "top"]}
7777
id={props.id}
@@ -81,46 +81,54 @@ const Block = props => (
8181
</Container>
8282
);
8383

84-
const Features = props => {
84+
const Features = (props) => {
8585
const features = [
86+
// {
87+
// title: "Multiple language versions",
88+
// content: "Works with Java 8, Java 11 and Java 15.",
89+
// image:
90+
// "https://user-images.githubusercontent.com/1408093/109818700-93378e00-7c33-11eb-8385-7ea88533cb87.png",
91+
// imageAlign: "left"
92+
// },
8693
{
87-
title: "Multiple language versions",
88-
content: "Works with Java 8, Java 11 and Java 15. The latest bleeding edge Java version probably works as well.",
94+
title: "Multiple languages",
95+
content:
96+
"Java, Scala and Kotlin are supported, including navigation between different languages.",
8997
image:
90-
"https://user-images.githubusercontent.com/1408093/109818700-93378e00-7c33-11eb-8385-7ea88533cb87.png",
91-
imageAlign: "left"
98+
"https://user-images.githubusercontent.com/1408093/137899150-e8d92cdd-8bd2-4802-9cd2-288442708aff.png",
99+
imageAlign: "left",
92100
},
93101
{
94102
title: "Multiple build tools",
95103
content:
96-
"The build tools Gradle and Maven are supported. We plan to add support for more build tools in the future.",
104+
"The build tools Gradle, Maven and sbt are supported. We plan to add support for more build tools in the future.",
97105
image:
98-
"https://user-images.githubusercontent.com/1408093/109819002-e4478200-7c33-11eb-99d3-c42d84acda47.png",
99-
imageAlign: "right"
106+
"https://user-images.githubusercontent.com/1408093/137899144-cfc6fc1b-a7c0-4fd7-ac4b-be516e459123.png",
107+
imageAlign: "right",
100108
},
101109
{
102110
title: "Simple installation",
103111
content:
104-
"Run the `lsif-java` command-line tool at the root of your Gradle/Maven build to generate an LSIF index. No manual configuration needed.",
112+
"Run the `lsif-java` command-line tool at the root of your Gradle/Maven/sbt build to generate an LSIF index. No manual configuration needed.",
105113
image:
106114
"https://user-images.githubusercontent.com/1408093/109820615-769c5580-7c35-11eb-9063-98e932c5d6c5.png",
107-
imageAlign: "left"
115+
imageAlign: "left",
108116
},
109117
{
110118
title: "Low overhead",
111119
content:
112120
"Indexing a repository should be roughly as fast as compiling all of the sources in the repository.",
113121
image:
114122
"https://user-images.githubusercontent.com/1408093/109820240-1dccbd00-7c35-11eb-8a87-6b1850687e28.png",
115-
imageAlign: "right"
116-
}
123+
imageAlign: "right",
124+
},
117125
];
118126
return (
119127
<div
120128
className="productShowcaseSection paddingBottom"
121129
style={{ textAlign: "left" }}
122130
>
123-
{features.map(feature => (
131+
{features.map((feature) => (
124132
<Block key={feature.title}>{[feature]}</Block>
125133
))}
126134
</div>

0 commit comments

Comments
 (0)