Commit Graph

188 Commits

Author SHA1 Message Date
Eric Fritz
836b6711c5
codeintel: Fix too many definitions in LSIF translation (#46392) 2023-01-12 12:42:42 -06:00
Eric Fritz
caac3f3d20
codeintel: Fix LSIF -> SCIP range conversion (#46350) 2023-01-12 08:24:45 -06:00
Eric Fritz
04ab13c7e3
codeintel: Use project root when converting LSIF to SCIP (#46352) 2023-01-12 09:55:28 +00:00
Noah S-C
bfa074f6c6
codeintel: dont swallow errors in upload retry mechanism (#46281) 2023-01-10 14:53:49 +00:00
Cesar Jimenez
2d7912569c
[language-platform] infer name and version from scip index (#46174) 2023-01-06 14:57:37 +00:00
Eric Fritz
2d2c86bb8d
codeintel: Infer index name when converting LSIF to SCIP (#46091) 2023-01-05 11:57:02 -07:00
Noah S-C
8c996a77af
codeintel: first implementation of auto-indexing secrets (#45580) 2022-12-15 22:32:16 +00:00
Jean-Hadrien Chabran
e540a5a309
Clean linting errors from unparam (#45548)
* extsvc.gitlab: remove unused parameter and mock

* fixup

* Re-enable unparam

* sct: fix error handling + logs in bitbucket

* monitoring: remove unused param

* monitoring: remove unused param

* extsvc/gitlab: mute unused param (see #45336)

* sg: mute unused param

* sg/setup: fix additional checks not being called

* sg: fix unused params

* internal/user: remove unused error

* gitlab/oauth: remove nil+unused param

* webhooks: remove unused param DB

The return callback takes a DB, not the outer function.

* codeintel/autoindexing: mute unused parameter

* oobmigration: remove unused error

* database/event_logs: add missing error handling

* executors: remove unused context

* executors: remove unused err

* gitserver: remove unused param ShardId

* executors: remove another unused err

* fixup

* database/user_credentials: remove unused error

* codeintel/resolvers: remove unused ctx

* codeintel/uploads: removed unused param repositoryName

* codeintel/uploads: remove unused param repo

* fixup

* (sus) codeintel/uploads remove unused param default branch

* codenav/observability: add nolint pragma

* gitserver: remove unused return value from internal func

* add explanation to nolint

* codenav: add nolint pragma

* gitlab: remove unused context

* internal/repos: remove unused context

* cliutil: remove unused parameter

* cliutil: remove unused params/errors

* cliutil: drop another unused parameter

* repos/gitlab: remove unused parameter db

* sg/feedback: remove unused ctx

* migration: remove unused ctx parameter

* fixup cliutil ctx

* sg/src: remove unused out parameter

* codeintel/autoindexing: remove unused trace param

* rockskip: remove always nil return value

* insights: remove unused parameters/nil errs

* dotcom: remove unused logger param

* batches/httpapi: add nolint pragma for semantics

* extsvc: removed unused ctx + fix struct

* graphqlbackend: remove unused db parameter

* insights: remove unused logger

* executor: drop always nil err return val

* batches: remove always nil error

* oauth: remove unused db parameter

* batches: remove always nil error

* batches: remove always nil error

* insights: remove unused feature flags store

* insights(sus): remove unused parameter alert

* dotcom: remove unused logger

* dotcom: remove unused logger param

* insights: remove unused featureflagstore

* graphqlbackend/batches: removed unused ctx

* gitserver: simplify expression

* codeintel: remove always nil error

* batches: removed always nil error

* codeintel/lsif: remove another nil error
2022-12-13 11:18:25 +01:00
Cesar Jimenez
0f90de027d
[language-platform] adding route to check for SCIP availability (#45269) 2022-12-08 11:25:22 -07:00
Eric Fritz
e872ed6410
codeintel: Write SCIP data in uploads service (#45104) 2022-12-06 15:32:54 -06:00
Thorsten Ball
49c5aee840
Disable flaky TestConvertLSIF (#45252)
Disable flkay TestConvertLSIF
2022-12-06 12:18:17 +00:00
Eric Fritz
52fefe5292
codeintel: Add layer to translate raw/processed LSIF to SCIP (#45126) 2022-12-05 18:32:30 -06:00
Cesar Jimenez
f7970690c1
[language-platform] Code intelligence badge updates (#45015) 2022-12-02 13:28:42 -07:00
Eric Fritz
0a110a25c5
chore: Mirror Manager field in oobmigration package (#44978) 2022-11-30 18:01:09 -07:00
Eric Fritz
cdba72ae4d
codeintel: Add manager to monikers/package information (#44958) 2022-11-30 14:26:58 -06:00
Keegan Carruthers-Smith
27569d1fc7
all: run gofmt -s -w from 1.19 (#41629)
gofmt in go1.19 does a lot of reformating of godoc strings, mostly to
make them more consistent around lists.

Test Plan: CI
2022-09-13 07:44:06 +00:00
Noah S-C
30275c288b
codeintel: add dashboard for precide-code-intel-worker total in-progress upload size (#39690) 2022-08-11 21:43:14 +01:00
Noah S-C
abbe5e2cb4
codeintel: use io.SectionReader for codeintel uploading (#40198)
* codeintel: use io.SectionReader for codeintel uploading

* Update lib/codeintel/upload/upload.go
2022-08-10 13:33:31 +00:00
Cesar Jimenez
af80d54072
Moving transport layer functionality to the service layer (#39516) 2022-08-02 14:19:01 -04:00
Ólafur Páll Geirsson
2e5a366f52
Use api.RepoName and reposource.PackageName type aliases (#38730)
* Use `api.RepoName` and `reposource.PackageName` type aliases

Previously, we used strings for both types, which caused a regression
that got fixed in https://github.com/sourcegraph/sourcegraph/pull/38722.
This commit introduces type aliases to avoid regressions like that.

While implementing the refactoring I also found a bug in Python
packages, that's fixed by this commit.

* Revert functional difference that caused tests to fail

The versioned package syntax should include the version, but the golden
tests assume the version is not included and I want to minimize the
blast radius from the refactoring.
2022-07-14 05:47:30 +00:00
Robert Lin
95c6946b9d
lib/log: migrate to github.com/sourcegraph/log (#36834)
This change migrates lib/log to https://github.com/sourcegraph/log in the hopes of easing adoption for other services.
2022-06-08 15:02:38 -07:00
Jean-Hadrien Chabran
3ea3c84343
Update services to use the sentry sink (#36569)
This patches all services that were using the HTTP middleware to capture sentry errors to now use the sentry sink.
2022-06-08 11:17:13 -07:00
Robert Lin
b2779c2221
lib: remove all usages of log15 (#36259) 2022-05-30 17:53:05 -07:00
Ólafur Páll Geirsson
9dcdfb95d9
Remove unused LSIF Typed code (#35791)
* Add diff for a TypeScript file to trigger CI job

* Rename job

* Delete unnecessary TypeScript file after validating CI job

* Remove unused "LSIF Typed" code

This code got moved to a separate repo github.com/sourcegraph/scip.
2022-05-25 11:23:13 +00:00
Varun Gandhi
0facf872c1
Update docs and comments to refer to scip-typescript (#34097)
codeintel: Update docs + code for scip-typescript.

Co-authored-by: Ólafur Páll Geirsson <olafurpg@gmail.com>
2022-05-24 15:38:04 +00:00
Ólafur Páll Geirsson
862f0e87d8
Start using scip-typescript for auto-indexing (#35786)
* Start using scip-typescript for auto-indexing

Previously, we used lsif-typescript for auto-indexing.

* Port scip-typescript CI upload job

* Add diff for a TypeScript file to trigger CI job

* Rename job

* Delete unnecessary TypeScript file after validating CI job
2022-05-23 16:13:25 +02:00
Eric Fritz
804051949f
chore: Do not blow up processing unrecognized edges (#35808) 2022-05-20 09:49:22 -07:00
Ólafur Páll Geirsson
2502cc9a48
Rename lsif-java into scip-java (#35384) 2022-05-18 16:45:10 +02:00
Eric Fritz
8c35e67f0e
api docs: bye (#34798) 2022-05-18 01:03:03 +00:00
Cesar Jimenez
07192cb583
codeintel: removing bloom filters (#35203)
remove bloom filter

Co-authored-by: Eric Fritz <eric@eric-fritz.com>
2022-05-13 11:38:40 -04:00
Keegan Carruthers-Smith
11a534cc78
lib: use any instead of interface{} (#35121)
Now that lib is on go1.18 we can use the type alias "any" instead of "interface{}".

Test Plan: cd lib && go test ./...
2022-05-09 14:55:38 +00:00
Keegan Carruthers-Smith
6578e91a3f
lib/codeintel: fix newline warning in go1.18 (#34902)
go1.18 has new warnings for Println usages which trigger go test to
fail:

  codeintel/tools/lsif-repl/main.go:63:5: fmt.Println arg list ends with redundant newline
  codeintel/tools/lsif-repl/main.go:145:4: fmt.Println arg list ends with redundant newline

I kept the same output, but made the newline explicit to avoid the
failure.

Test Plan: go test with go1.18 locally
2022-05-04 14:53:06 +00:00
Eric Fritz
f0b67a842f
RFC 624: (M3) Replace Go code (#34864) 2022-05-04 09:16:16 -05:00
Varun Gandhi
9a0013b8ae
codeintel: Update lsif-typescript flag. (#33812)
lsif-node used --inferTSConfig but lsif-typescript started
using a different spelling for consistency.
2022-04-12 17:02:08 -04:00
Eric Fritz
5571c12857
codeintel: Add auth support for GitLab (#33254) 2022-04-04 08:34:41 -05:00
Chris Wendt
c43da260d8
lsif utils: Switch from kingpin to flag (#33198) 2022-03-29 21:02:09 -07:00
Noah S-C
b1cce06276
codeintel: expose code intel info for GitTree (#32167)
Co-authored-by: Eric Fritz <eric@eric-fritz.com>
2022-03-25 13:37:13 +00:00
Ólafur Páll Geirsson
3de7655d5d
LSIF Typed: handle symbols with duplicate definitions (#32690)
* LSIF Typed: handle symbols with duplicate definitions

Fixes https://github.com/sourcegraph/lsif-typescript/issues/42

* Permit duplicate definitions with conflicting symbols

This feature is needed to reproduce real-world behavior

* Emit textDocument/references edge for definition ranges

Previously, we only added textDocument/definition edges to the
definition site meaning that "find references" did not show multiple
results for cases where the same symbol had multiple definitions.
2022-03-16 18:23:34 +00:00
Ólafur Páll Geirsson
57d3f1ba82
Start using lsif-typescript for JS/TS indexing (#31998)
* Use lsif-typescript instead of lsif-node for JS/TS indexing

This commit migrates from lsif-node to the new lsif-typescript indexer
that we have been working on for the past months. It's difficult to do
this migration incrementally so this PR touches on several different
components:

- the CI config for JS/TS indexing
- auto-inference for auto-indexing
- several bugfixes in LSIF Typed to enable cross-repo navigation

* Revert changes for Node logic

* Undo unwanted changes to yarn.lock

* Address review feedback
2022-03-15 14:57:35 +01:00
Varun Gandhi
73e054d477
Spell npm consistently. (#32575)
- Spelled as Npm or NPM depending on local case convention.
  For local variables and in types, Npm should be preferred.
  For fully uppercase spellings, NPM should be used.
- Default to spelling it as npm otherwise.

This matches the convention in the npm/cli code and the
recommendation in the npm/cli README.
2022-03-14 12:38:09 -07:00
Eric Fritz
5b7b17c7f2
codeintel: Add indexer version to upload records (#32402) 2022-03-14 08:51:13 -05:00
Thorsten Ball
8d3e231322
golangci-lint: enable unparam linter (#31856)
Team work makes the linter dream work.

Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com>
2022-02-28 15:31:44 +01:00
TJ DeVries
e2c2857120
lsif typed syntax highlighter v0.1 (#30016)
* (syntax-highlighter): tree-sitter,lsif-typed

* lsif_typed -> lsiftyped

* doc updates

* update docker images to match .tool-versions

* fixup: Remove submodules when running backcompat tests
2022-02-23 11:44:17 -05:00
Ólafur Páll Geirsson
d3799e2b38
LSIF Typed: miscellaneous code cleanups (#31548) 2022-02-21 13:36:49 +01:00
Chris Wendt
149b447d7b
codeintel: LSIF validation (#25869) 2022-02-18 23:14:36 +00:00
Chris Wendt
d9a30d38db
tests: Fix LSIF IDs in dump1 (#31519) 2022-02-18 16:09:47 -07:00
Ólafur Páll Geirsson
08efb1505a
LSIF Typed: add command-line tool to emit Graph (#30307)
This commit is large because it also adds a new DSL for testing LSIF behavior. Previously, it was difficult to write minimized examples that reproduce bugs related to code navigations. We typically implemented new LSIF features directly with a heavy-duty indexer like lsif-go or lsif-java. Now, we can implement new LSIF features with the testing DSL instead, which (hopefully) increases the development velocity at which we can iterate on new LSIF features.
2022-02-18 09:08:48 +00:00
Varun Gandhi
fe5907c227
codeintel: Fix implementation of Pop() to change map state. (#31148) 2022-02-15 19:40:37 +05:30
Varun Gandhi
f551758e62
Minor cleanup for document canonicalization + test code (#31144)
* codeintel: Remove unused parameter.
* codeintel: Use short aliases for long test functions and types.
2022-02-14 14:38:57 +05:30
Keegan Carruthers-Smith
039b26201f
all: replace regexp with grafana/regexp (#30948)
grafana/regexp's speedup branch contains the stdlib regexp with multiple
patches applied to speed up regexp. The benchmark improvements are quite
impressive across the board. The series of patches are being considered
for inclusion in golang. I took a look over them, and they look legit
enough for us to start using it.

This commit replaces all uses of regexp with grafana/regexp. This
replacement was done via a simple string replace on

  ^\s*"regexp"

Followed by goimports -w across the repository. I then manually
inspected each result to ensure it was on an import.
2022-02-14 09:08:21 +00:00
Varun Gandhi
d2fa0b0b58
codeintel: Iterate over smaller data structure in document canonicalization. (#31143) 2022-02-14 14:09:31 +05:30
Varun Gandhi
ccaeeb8d03
Overhaul DefaultIDSetMap's implementation and API (#31053)
* Add failing regression tests for DefaultIDSetMap.
* Refactor DefaultIDSetMap to properly handle key == 0.
2022-02-11 22:19:54 +05:30
Eric Fritz
1b02f90257
codeintel: Try to improve performance of canonicalizeDocuments (#30978) 2022-02-11 08:23:13 -06:00
Ólafur Páll Geirsson
9c08a9a053
LSIF Typed: minor additions to prepare typed->graph conversion tool (#30756) 2022-02-07 16:50:54 +00:00
Eric Fritz
7148009913
errors: Introduce internal package (#30558) 2022-02-07 15:03:45 +00:00
Eric Fritz
d26ec00d90
chore: Fix spelling mistakes (#30436) 2022-01-31 21:54:44 +00:00
Eric Fritz
2fd1f8b1f8
lsif-typed: Add diagnostics (#29886) 2022-01-26 22:56:38 +00:00
TJ DeVries
ffbdb7d29b
lsif-typed: Add more syntax kinds (#29929) 2022-01-26 15:34:51 +01:00
Varun Gandhi
a625615e6a
Update auto-inference for NPM packages. (#30099)
Pass the newly introduced --inferTSConfig flag from:
https://github.com/sourcegraph/lsif-node/pull/183
2022-01-26 12:21:43 +05:30
Varun Gandhi
b60c21a0cd
Filter paths passed to auto-index inference functions. (#30155)
* Filter paths passed to auto-index inference functions.

Passing only relevant indexing paths makes debugging easier,
and reduces the amount of work when we are auto-indexing projects
which do not contain all languages.

* Simplify implementation of inference.Patterns.
2022-01-26 09:51:01 +05:30
Varun Gandhi
0ca5d336e1
Add missing .gitattributes files for various generated files (#30092)
* Mark protoc generated files with .gitattributes files.
* Mark generated documentation with .gitattributes.
2022-01-25 16:36:21 +05:30
Varun Gandhi
5eb1ada39c
Move pathMap to separate file and add test. (#30019) 2022-01-21 19:51:06 +05:30
Eric Fritz
5780f4327d
lsif-typed: Pluralize repeated fields (#29992) 2022-01-21 12:40:31 +01:00
Varun Gandhi
a5d19d387c Fix quadratic path checks in auto-inference.
In the worst case, DefinitelyTyped/DefinitelyTyped has 8.4k tsconfig.json
files. If we tried to do auto-inference for it, we would end up with at
least a few hundred million path checks.

Let's not do that.
2022-01-21 10:10:42 +05:30
Eric Fritz
f9ce3c2a89
lsif-typed: Symbol relationships (#29867) 2022-01-20 15:16:09 +00:00
Noah S-C
e3b0ce4014
codeintel: fix nil pointer in no-progress-output upload (#29975) 2022-01-20 14:32:35 +00:00
Noah S-C
abe66d39dd
Update for new install instructions (#29970) 2022-01-20 13:17:59 +00:00
Ólafur Páll Geirsson
1faadc6f9d
LSIF Typed: Specify the grammar for symbols (#29921) 2022-01-20 08:36:28 +01:00
Ólafur Páll Geirsson
adac252d70
Document how to format LSIF Typed symbols (#29810) 2022-01-18 09:18:21 +01:00
Ólafur Páll Geirsson
2b75f553fc
Update LSIF spec based on offline discussions (#29767)
* Update LSIF spec based on offline discussions

- Move `Occurrence.Role` to a toplevel `SymbolRole` enum. This enum now
  permits multiple roles to encode multiple bits of information such as
  definitions, imports and write-access.
- Rename `Symbol` to `SymbolInformation` and replace `symbol_uri` with
  `symbol`.
- Rename `Package` to `PackageInformation` and replace `package_uri`
  with `package`.
- Rename `Highlight` to `SyntaxKind`.
- Use CamelCase for enum values and disable the linters that require
  ALL_CAPS_SNAKE_CASE.

* Use `int32` field for `symbol_role` field.

* Use `Occurrence.override_documentation`

* Address review feedback

* Run the generator

* Remove `PackageInformation`

* Add test and generated to SymbolRole
2022-01-15 08:26:08 +01:00
Eric Fritz
8d1e172d61
lsif-typed: Add reference documentation (#29750) 2022-01-14 09:29:43 -06:00
Eric Fritz
2d8af5fe41
Run clang-format (#29611) 2022-01-12 10:33:25 +01:00
Ólafur Páll Geirsson
70f8bcb6e5
Add TypeScript bindings for LSIF typed (#29603)
Co-authored-by: Eric Fritz <eric@eric-fritz.com>
2022-01-11 23:44:36 +00:00
Eric Fritz
4c33c9d011
Add protobuf generation check to CI (#29605) 2022-01-11 23:25:35 +00:00
Ólafur Páll Geirsson
b53853a339
RFC 519: Add LSIF typed schema (#29457) 2022-01-11 16:16:12 -06:00
Eric Fritz
57cc8bf307
codeintel: Upload QOL improvements (#29538) 2022-01-11 14:01:14 +00:00
Ryan Slade
4c04440904
codeintel: Use git.ListDirectoryChildren (#28843)
This change is needed so that we no longer send raw git commands to
gitserver form outside of the vcs/git package.

We ended up just copying the implementation from
lib/codeintel/pathexistnce as the vcs/git package is not visible to that
package and we don't want out internal vcs/git package to rely on
packages in codeintel/lib.
2021-12-13 10:28:19 +01:00
Chris Wendt
d4f842a4a7
codeintel: document more correlation state fields (#27561) 2021-11-18 14:32:47 -07:00
Ryan Slade
6f59472277
misc: Apply Go cleanups suggested by GoLand (#27428)
* Removes redundant types
* Removes redundant parentheses
* Removes redundant import names
2021-11-11 15:02:44 +01:00
TJ DeVries
3c94b58f7b
lsif-validate: Add better messages for duplicate edges (#27261) 2021-11-09 11:16:11 -05:00
Thorsten Ball
3f3feb72cd
Convert lsif-validate to use lib/output instead of pentimento (#27205) 2021-11-09 09:55:31 +00:00
Chris Wendt
15715837e2
codeintel: add support for find-implementations (#24854) 2021-11-04 12:53:59 -06:00
Stephen Gutekanst
9c9b2c4462
lsifstore: add ability to query API docs search index (#26973)
* lsifstore: add ability to query API docs search index

Helps #21938

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>

Co-authored-by: Eric Fritz <eric@sourcegraph.com>
2021-11-03 13:38:27 -07:00
Varun Gandhi
61f8284c58 Add initial support for Rust auto-indexing.
Makes progress towards #26086.
2021-11-02 09:17:55 -07:00
Varun Gandhi
8eb5fbf7cb Refactor logic for tests checking paths against patterns.
No functional change.
2021-11-02 09:17:55 -07:00
Varun Gandhi
4acf4cd714
Remove unused code paths for CanIndex*Job. (#26838)
The last use of this method was removed in 0a5347213c.
2021-10-29 14:57:06 +00:00
Noah S-C
5704d70396
codeintel: handle shard in LSIF edges and missing shard/document (#26295)
Co-authored-by: Eric Fritz <eric@sourcegraph.com>
2021-10-19 20:37:27 +00:00
Ólafur Páll Geirsson
35a1665474
Enable auto-inference for Kotlin package repos (#26284) 2021-10-19 16:45:18 +02:00
Stephen Gutekanst
742b747d17
codeintel/lsif/protocol: commit SymbolKind stringer generated file (#25757)
Erik reported [in Slack](https://sourcegraph.slack.com/archives/CHXHX7XAS/p1633525802201900)
that `go generate` was producing an uncommitted file for him:

```
lib/codeintel/lsif/protocol/symbolkind_string.go
```

The [`//go:generate` directive](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@9ef4b4dd47054130a84d62c74d3b0b6db6311c33/-/blob/lib/codeintel/lsif/protocol/symbol.go?L50-51)
for this appears to have been added ~7mo ago by Roux but it looks like we just forgot to commit
the generated file by accident.

I think our CI checks do not catch this because lib/ is a different Go module.

Regardless, seems fine to just commit this result for now.

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2021-10-06 17:54:32 +00:00
Thorsten Ball
13c71e6da1
Run golangci-lint in every Go project in repository (and fix all reported errors) (#24956)
I noticed that `golangci-lint` only runs over the packages belonging to `github.com/sourcegraph/sourcegraph`. It doesn't run over `lib`, `dev/sg`, etc.

This PR changes the check script we use in CI to run golangci-lint over every project in our repository with a `go.mod` (which is what we do for `go test` in CI too).

That's the first commit. The second commit fixes all of the reported errors.
2021-09-15 09:59:20 +02:00
Chris Wendt
955f0b04cc
codeintel: add implementations to the LSIF protocol (#24973) 2021-09-14 14:26:14 -06:00
Ólafur Páll Geirsson
d48925a3ac
Don't infer lsif-java auto-index config for non-indexable repos (#24638)
Previously, we inferred lsif-java indexing configuration for repos that
didn't have any Java or Scala source files. This caused indexing jobs to
fail when we shouldn't have indexed the repo in the first place. This
commit fixes that issue by requiring the repo to contain at least a
single Java or Scala file in order to infer the lsif-java indexing
configuration.

The refactoring for this commit also made it easy to fix another bug
where lsif-java would fail to index repos that contained both a toplevel
`pom.xml` file and `lsif-java.json` file (because it ambiguous which
    build tool to use). Now, we use the `lsif-java index --build-tool=NAME` to
explicitly set the build tool to LSIF when there is an `lsif-java.json`
file.
2021-09-06 15:09:55 +02:00
Ólafur Páll Geirsson
06e295cecb
Use lenient semantic version comparator for JVM package repos (#24349) 2021-08-26 17:35:33 +02:00
Stefan Hengl
c61b0f1a7b
all: /bin/bash -> /usr/bin/env bash (#23673)
I ran into issues setting up Sourcegraph on NixOS, because NixOS, like
some other distros, doesn't have a /bin/bash. We already use /usr/bin/env
in many of our scripts, so this improves consistency, too.
2021-08-06 12:02:43 +02:00
Eric Fritz
5e8992cb8c
codeintel: Rename semantic package to precise (#23487) 2021-08-04 14:45:52 -05:00
Stephen Gutekanst
d8dd510c8b
API docs: LSIF: correct race condition in documentation data queues (#23525)
There was a race condition here: If the `src` channel of the queue
was closed and had no more data, but the buffer had not yet been flushed,
then the `dst` channel would be closed - dropping all `buf` values that
were still waiting to be written to the `dst` channel.

This seems to have been one of the issues leading to inconsistent usage
examples on API docs pages (you'd get no results in such instances.)

This file is clearly the most complex part of the API docs backend
implementation, and as such I am rethinking how it is structured and
how to test it. I'll send more PRs for this later.

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2021-08-03 15:36:45 -07:00
Noah S-C
199fe3d8ec
codeintel: dont escape < > in lsif-visualize (#23437) 2021-08-02 15:07:13 +01:00
Stephen Gutekanst
2b1c33d5dc
API docs: LSIF: add references/definitions to tree API, not just blob API (#23115)
* API docs: LSIF: conversion: emit mapping of documentation result -> filepath
* migrations: add file_path column to lsif_data_documentation_mappings
* API docs: LSIF: write file_path mappings to DB
* API docs: LSIF: add documentation references/definitions to Tree type
* Fix issue where UI would show an error:

```
lsifStore.Ranges: ERROR: relation \"lsif_documentation_mappings\" does not exist (SQLSTATE 42P01)
```

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2021-07-22 13:03:21 -07:00
TJ DeVries
b211823bf4
codeintel: Add references to lsif-index-tester (#20036) 2021-07-22 13:06:41 -04:00
Ólafur Páll Geirsson
2df4b43228
Implement auto-inference for Java package repositories. (#23076) 2021-07-21 15:12:40 +02:00