diff --git a/dev/codeintel-qa/cmd/upload/upload.go b/dev/codeintel-qa/cmd/upload/upload.go index b2cefc4aa26..48e8f4c3b3a 100644 --- a/dev/codeintel-qa/cmd/upload/upload.go +++ b/dev/codeintel-qa/cmd/upload/upload.go @@ -82,7 +82,7 @@ func uploadAll(ctx context.Context, commitsByRepo map[string][]string, limiter * return uploads, nil } -// upload invokes `src lsif upload` on the host and returns the graphql identifier of +// upload invokes `src code-intel upload` on the host and returns the graphql identifier of // the uploaded resource. func upload(ctx context.Context, repoName, commit, file string) (string, error) { argMap := map[string]string{ diff --git a/doc/batch_changes/references/batch_spec_cheat_sheet.md b/doc/batch_changes/references/batch_spec_cheat_sheet.md index 7638df19530..5565b782b42 100644 --- a/doc/batch_changes/references/batch_spec_cheat_sheet.md +++ b/doc/batch_changes/references/batch_spec_cheat_sheet.md @@ -207,7 +207,7 @@ steps: - name: Generate LSIF data run: lsif-go - name: Upload LSIF data - run: src lsif upload -github-token=${{ "\\${{secrets.GITHUB_TOKEN}}" }} + run: src code-intel upload -github-token=${{ "\\${{secrets.GITHUB_TOKEN}}" }} EOF ``` diff --git a/doc/code_intelligence/how-to/adding_lsif_to_workflows.md b/doc/code_intelligence/how-to/adding_lsif_to_workflows.md index 296033f40aa..b96167b04b1 100644 --- a/doc/code_intelligence/how-to/adding_lsif_to_workflows.md +++ b/doc/code_intelligence/how-to/adding_lsif_to_workflows.md @@ -42,7 +42,7 @@ jobs: - name: Upload index # this will upload to Sourcegraph.com, you may need to substitute a different command # by default, we ignore failures to avoid disrupting CI pipelines with non-critical errors. - run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure + run: src code-intel upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure ``` ### Sub-projects @@ -66,7 +66,7 @@ jobs: working-directory: backend/ # this will upload to Sourcegraph.com, you may need to substitute a different command # by default, we ignore failures to avoid disrupting CI pipelines with non-critical errors. - run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure + run: src code-intel upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure ``` ### Custom build environments @@ -143,7 +143,7 @@ jobs: - run: scip-typescript index # this will upload to Sourcegraph.com, you may need to substitute a different command # by default, we ignore failures to avoid disrupting CI pipelines with non-critical errors. - - run: src lsif upload -github-token=<> -ignore-upload-failure + - run: src code-intel upload -github-token=<> -ignore-upload-failure workflows: scip-typescript: diff --git a/doc/code_intelligence/how-to/index_a_cpp_repository.md b/doc/code_intelligence/how-to/index_a_cpp_repository.md index 7886c5d4a0b..5c4ff4f6af6 100644 --- a/doc/code_intelligence/how-to/index_a_cpp_repository.md +++ b/doc/code_intelligence/how-to/index_a_cpp_repository.md @@ -101,7 +101,7 @@ local dev environment. 1. Run `lsif-clang compile_commands.json` from the root directory. This should emit a `dump.lsif` file. -1. Run `src lsif upload` from the root directory. You may first have to [authenticate to your +1. Run `src code-intel upload` from the root directory. You may first have to [authenticate to your Sourcegraph instance](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance). If you run into issues along the way, a useful reference is [one of the @@ -140,7 +140,7 @@ if things don't work on the first try: should generate a `dump.lsif` file in the same directory. This `dump.lsif` should contain JSON describing all the symbols and references in the codebase (it should be rather large). 1. Once the `dump.lsif` file is generated correctly, set the environment variables - `SRC_ACCESS_TOKEN` and `SRC_ENDPOINT` to the appropriate values in your shell. Then run `src lsif + `SRC_ACCESS_TOKEN` and `SRC_ENDPOINT` to the appropriate values in your shell. Then run `src code-intel upload` from the directory containing the `lsif.dump` file. This should successfully upload the LSIF dump to Sourcegraph. 1. After you've successfully done all of the above in the container's interactive shell, incorporate diff --git a/doc/code_intelligence/how-to/index_a_go_repository.md b/doc/code_intelligence/how-to/index_a_go_repository.md index 06c4136ba68..534bcdd2b40 100644 --- a/doc/code_intelligence/how-to/index_a_go_repository.md +++ b/doc/code_intelligence/how-to/index_a_go_repository.md @@ -27,7 +27,7 @@ jobs: - name: Upload LSIF data # this will upload to Sourcegraph.com, you may need to substitute a different command. # by default, we ignore failures to avoid disrupting CI pipelines with non-critical errors. - run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure + run: src code-intel upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure ``` The following projects have example GitHub Action workflows to generate and upload LSIF indexes. @@ -50,7 +50,7 @@ jobs: - run: lsif-go # this will upload to Sourcegraph.com, you may need to substitute a different command. # by default, we ignore failures to avoid disrupting CI pipelines with non-critical errors. - - run: src lsif upload -github-token=<> -ignore-upload-failure + - run: src code-intel upload -github-token=<> -ignore-upload-failure workflows: scip-typescript: @@ -78,7 +78,7 @@ jobs: script: - | docker run --rm -v $(pwd):/src -w /src sourcegraph/lsif-go:latest /bin/sh -c \ - "lsif-go; src lsif upload -github-token=$GITHUB_TOKEN -ignore-upload-failure" + "lsif-go; src code-intel upload -github-token=$GITHUB_TOKEN -ignore-upload-failure" ``` The following projects have example Travis CI configurations to generate and upload LSIF indexes. @@ -113,7 +113,7 @@ The following projects have example Travis CI configurations to generate and upl # for private instances src -endpoint= lsif upload # for public instances - src lsif upload -github-token= + src code-intel upload -github-token= ``` The upload command will provide a URL you can visit to see the upload's status, and when it's done you can visit the repo and check out the difference in code navigation quality! diff --git a/doc/code_intelligence/how-to/index_a_typescript_and_javascript_repository.md b/doc/code_intelligence/how-to/index_a_typescript_and_javascript_repository.md index 4d3a10416e0..59ad0dbcb2e 100644 --- a/doc/code_intelligence/how-to/index_a_typescript_and_javascript_repository.md +++ b/doc/code_intelligence/how-to/index_a_typescript_and_javascript_repository.md @@ -30,7 +30,7 @@ jobs: curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src chmod +x /usr/local/bin/src - name: Upload index - run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress + run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress env: SRC_ENDPOINT: https://sourcegraph.com/ ``` @@ -80,7 +80,7 @@ jobs: - name: Generate index run: scip-typescript index - name: Upload index - run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} -no-progress + run: src code-intel upload -github-token=${{ secrets.GITHUB_TOKEN }} -no-progress env: SRC_ENDPOINT: https://sourcegraph.com/ ``` @@ -120,9 +120,9 @@ The steps here are similar to those in the GitHub Actions example from before. 4. Upload the data to a Sourcegraph instance. ``` # for private instances - SRC_ENDPOINT= src lsif upload + SRC_ENDPOINT= src code-intel upload # for public instances - src lsif upload -github-token= + src code-intel upload -github-token= ``` The upload command will provide a URL you can visit to see the upload's status. Once the upload finishes processing, you can visit the repo and enjoy precise code navigation! diff --git a/doc/code_intelligence/how-to/index_other_languages.md b/doc/code_intelligence/how-to/index_other_languages.md index c20599a635c..b7758965ea5 100644 --- a/doc/code_intelligence/how-to/index_other_languages.md +++ b/doc/code_intelligence/how-to/index_other_languages.md @@ -49,13 +49,13 @@ The upload step is the same for all languages. Make sure the current working dir #### To a private Sourcegraph instance (on prem) ``` -$ SRC_ENDPOINT=https://sourcegraph.mycompany.com src lsif upload -file=dump.lsif +$ SRC_ENDPOINT=https://sourcegraph.mycompany.com src code-intel upload -file=dump.lsif ``` #### To cloud based Sourcegraph.com ``` -$ src lsif upload -github-token=YourGitHubToken -file=dump.lsif +$ src code-intel upload -github-token=YourGitHubToken -file=dump.lsif ``` The `src-cli` upload command will try to infer the repository and git commit by invoking git commands on your local clone. If git is not installed, is older than version 2.7.0 or you are running on code outside of a git clone, you will need to also specify the `-repo` and `-commit` flags explicitly. diff --git a/doc/code_intelligence/references/auto_indexing_configuration.md b/doc/code_intelligence/references/auto_indexing_configuration.md index 747954dc142..8bed14ae4bd 100644 --- a/doc/code_intelligence/references/auto_indexing_configuration.md +++ b/doc/code_intelligence/references/auto_indexing_configuration.md @@ -153,7 +153,7 @@ indexer_args: - lsif-clang - compile_commands.json -# Ensure lsif-clang generates the file expected by src lsif upload. +# Ensure lsif-clang generates the file expected by src code-intel upload. outfile: dump.lsif ``` diff --git a/doc/integration/jvm.md b/doc/integration/jvm.md index d401e769b0a..03dd81e2790 100644 --- a/doc/integration/jvm.md +++ b/doc/integration/jvm.md @@ -15,7 +15,7 @@ Feature | Supported? There are two ways to sync JVM dependency repositories. -* **Indexing** (recommended): run [`scip-java`](https://sourcegraph.github.io/scip-java/) against your JVM codebase and upload the generated index to Sourcegraph using the [src-cli](https://github.com/sourcegraph/src-cli) command `src lsif upload`. This is usually setup to run in a CI pipeline. Sourcegraph automatically synchronizes JVM dependency repositories based on the dependencies that are discovered by `scip-java`. +* **Indexing** (recommended): run [`scip-java`](https://sourcegraph.github.io/scip-java/) against your JVM codebase and upload the generated index to Sourcegraph using the [src-cli](https://github.com/sourcegraph/src-cli) command `src code-intel upload`. This is usually setup to run in a CI pipeline. Sourcegraph automatically synchronizes JVM dependency repositories based on the dependencies that are discovered by `scip-java`. * **Code host configuration**: manually list dependencies in the `"dependencies"` section of the JSON configuration when creating the JVM dependency code host. This method can be useful to verify that the credentials are picked up correctly without having to upload an index. ## Credentials diff --git a/doc/integration/npm.md b/doc/integration/npm.md index ca87422a80b..727c6b855e8 100644 --- a/doc/integration/npm.md +++ b/doc/integration/npm.md @@ -15,7 +15,7 @@ Feature | Supported? There are three ways to sync npm dependency repositories. -* **SCIP** (recommended): run [`scip-typescript`](https://github.com/sourcegraph/scip-typescript) on your JavaScript/TypeScript codebase and upload the generated index to Sourcegraph using the [src-cli](https://github.com/sourcegraph/src-cli) command `src lsif upload`. Sourcegraph automatically synchronizes npm dependency repositories based on the dependencies that are discovered by `scip-typescript`. +* **SCIP** (recommended): run [`scip-typescript`](https://github.com/sourcegraph/scip-typescript) on your JavaScript/TypeScript codebase and upload the generated index to Sourcegraph using the [src-cli](https://github.com/sourcegraph/src-cli) command `src code-intel upload`. Sourcegraph automatically synchronizes npm dependency repositories based on the dependencies that are discovered by `scip-typescript`. * **Dependencies search**: Sourcegraph automatically synchronizes npm dependency repositories that are in `package-lock.json` or `yarn.lock` files during a [dependencies search](../code_search/how-to/dependencies_search.md). * **Code host configuration**: manually list dependencies in the `"dependencies"` section of the JSON configuration when creating the npm dependency code host. This method can be useful to verify that the credentials are picked up correctly without having to upload an index. diff --git a/enterprise/cmd/frontend/internal/codeintel/httpapi/upload_handler.go b/enterprise/cmd/frontend/internal/codeintel/httpapi/upload_handler.go index 61bd9ff6f5b..c8292fad626 100644 --- a/enterprise/cmd/frontend/internal/codeintel/httpapi/upload_handler.go +++ b/enterprise/cmd/frontend/internal/codeintel/httpapi/upload_handler.go @@ -53,7 +53,7 @@ var errUnprocessableRequest = errors.New("unprocessable request: missing expecte // POST /upload // // handleEnqueue dispatches to the correct handler function based on the request's query args. Running -// the `src lsif upload` command will cause one of two sequences of requests to occur. For uploads that +// the `src code-intel upload` command will cause one of two sequences of requests to occur. For uploads that // are small enough repos (that can be uploaded in one-shot), only one request will be made: // // - POST `/upload?repositoryId,commit,root,indexerName` diff --git a/internal/codeintel/stores/lsifstore/testdata/README.md b/internal/codeintel/stores/lsifstore/testdata/README.md index 3a999321752..d80ce0f7818 100644 --- a/internal/codeintel/stores/lsifstore/testdata/README.md +++ b/internal/codeintel/stores/lsifstore/testdata/README.md @@ -7,7 +7,7 @@ To regenerate `lsif-go@foo.sql` you will need to: 3. `sourcegraph/lsif-go` as a repository. 3. Start the `sg start enterprise-codeintel` server 4. Run `lsif-go` (master revision) manually in a checkout of the `lsif-go` repository at the revision mentioned in the `lsif-go@rev.sql` filename. -5. Use `src lsif upload` against your local server to upload the LSIF bundle. +5. Use `src code-intel upload` against your local server to upload the LSIF bundle. 6. Run the following to generate the SQL file: ```