From 1c7abf4b3b3fb960cddb96b23f803eeeec89c9ba Mon Sep 17 00:00:00 2001 From: Abhishek Tiwari <97469132+AbhishekTiwari23@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:57:53 -0800 Subject: [PATCH] dotnet doc update (#397) Summary: Pull Request resolved: https://github.com/facebookincubator/Glean/pull/397 Reviewed By: simonmar Differential Revision: D51518900 Pulled By: donsbot fbshipit-source-id: 10f2f34095c47d8e757c7dc2fe09e97a2bba8330 --- README.md | 1 + glean/website/docs/indexer/dotnet.md | 45 ++++++++++++++++++++++++++++ glean/website/sidebars.js | 1 + 3 files changed, 47 insertions(+) create mode 100644 glean/website/docs/indexer/dotnet.md diff --git a/README.md b/README.md index 806e576fd..86582897d 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ We also support the [SCIP](https://github.com/sourcegraph/scip) or [LSIF](https: * [TypeScript](https://glean.software/docs/indexer/lsif-typescript) * [Java](https://glean.software/docs/indexer/lsif-java) * [Python](https://glean.software/docs/indexer/scip-python) +* [Dotnet](https://glean.software/docs/indexer/scip-dotnet) Custom indexers for these languages exist but aren't in the open source release yet; we hope to make these available in the future: diff --git a/glean/website/docs/indexer/dotnet.md b/glean/website/docs/indexer/dotnet.md new file mode 100644 index 000000000..632ade744 --- /dev/null +++ b/glean/website/docs/indexer/dotnet.md @@ -0,0 +1,45 @@ +--- +id: scip-dotnet +title: Dotnet +sidebar_label: Dotnet +--- + +import {OssOnly, FbInternalOnly} from 'internaldocs-fb-helpers'; +import {SrcFile,SrcFileLink} from '@site/utils'; + +To index [Dotnet](https://dotnet.microsoft.com/) we use SourceGraph's [SCIP indexer for dotnet](https://github.com/sourcegraph/scip-dotnet). [SCIP](https://about.sourcegraph.com/blog/announcing-scip) is a new format for tools to share information about code. Releases of [scip-dotnet](https://github.com/sourcegraph/scip-dotnet) can be installed with `dotnet tools` and used as indexers for SCIP, which Glean will accept. The indexer itself requires a [dotnet](https://dotnet.microsoft.com/) runtime environment. + +## Run the indexer + +The indexer is run via the main `glean` CLI tool. + +``` +> cabal build exe:glean +``` + +And index your Dotnet repository with: +``` +glean index dotnet-scip DIR --db NAME/INSTANCE +``` + +where + +* `DIR` is the root directory containing the Dotnet project +* `name/hash` is the name of the repository to create + +Provide the usual `--db-root` and `--schema` or `--service` arguments +to `glean` + +## In the shell + +Dotnet source can also be indexed directly from the Glean shell: + +``` +:index dotnet-scip DIR +``` + +The shell will pick a DB name and hash for you based on `DIR`. + +## Schema + +The schema is in diff --git a/glean/website/sidebars.js b/glean/website/sidebars.js index 98a817ecd..b622e3007 100644 --- a/glean/website/sidebars.js +++ b/glean/website/sidebars.js @@ -81,6 +81,7 @@ module.exports = { 'indexer/lsif-rust', 'indexer/lsif-java', 'indexer/scip-python', + 'indexer/scip-dotnet', ], },