ScipDotnet 0.1.2-beta
dotnet add package ScipDotnet --version 0.1.2-beta
NuGet\Install-Package ScipDotnet -Version 0.1.2-beta
<PackageReference Include="ScipDotnet" Version="0.1.2-beta" />
<PackageVersion Include="ScipDotnet" Version="0.1.2-beta" />
<PackageReference Include="ScipDotnet" />
paket add ScipDotnet --version 0.1.2-beta
#r "nuget: ScipDotnet, 0.1.2-beta"
#:package ScipDotnet@0.1.2-beta
#addin nuget:?package=ScipDotnet&version=0.1.2-beta&prerelease
#tool nuget:?package=ScipDotnet&version=0.1.2-beta&prerelease
scip-dotnet
SCIP indexer for the C# programming language.
Getting started
This project is not yet published so the only way to run the indexer is by building it from source locally. This section will be updated in the future when it's possible to run pre-built binaries.
Running locally
First, install .NET https://dotnet.microsoft.com/en-us/download/dotnet-framework.
Next, clone this repo locally:
git clone https://github.com/sourcegraph/scip-dotnet
cd scip-dotnet
Finally, use dotnet run to run the indexer locally.
dotnet run --project ScipDotnet -- index --working-directory PATH_TO_DIRECTORY_YOU_WANT_TO_INDEX
Once scip-dotnet has finished indexing the project, there should be an index.scip at the root of the
directory you've indexed. Use src code-intel upload to upload the SCIP index to Sourcegraph.
npm install -g @sourcegraph/src
export SRC_ACCESS_TOKEN=PASTE_YOUR_TOKEN_HERE
export SRC_ENDPOINT=https://sourcegraph.com
src code-intel upload
Testing
This project heavily uses "snapshot" or "expect" tests. See Verify, "Testing with expectations" or "Snapshot Testing" to learn more about this style of testing.
Run dotnet test to run all tests.
The tests fail with a unified diff output when the generated SCIP index does not format according to the generated snapshot output in the directory snapshots/output/ .
❯ dotnet test
...
A total of 1 test files matched the specified pattern.
Failed Snapshot("/Users/olafurpg/dev/sourcegraph/scip-dotnet/snapshots/input/syntax") [3 s]
Error Message:
(+ expected, - obtained). To update the expected output to match the obtained behavior, run: SCIP_UPDATE_SNAPSHOTS=true dotnet test
// ^^^^^^^^^^ definition scip-dotnet nuget . . Main/Expressions#TargetType#`.ctor`().
+ // documentation ```cs\npublic Main.Expressions.TargetType.TargetType(System.String name)\n```
...
If you're happy with the new behavior, run SCIP_UPDATE_SNAPSHOTS=true dotnet test to update the snapshot tests.
Editor support
We recommend using JetBrains Rider to work on this codebase.
The snapshot testing project is independent from the main solution and should be opened as a separate Rider window.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Google.Protobuf (>= 3.21.9)
- Microsoft.Build.Locator (>= 1.5.5)
- Microsoft.CodeAnalysis (>= 4.4.0)
- Microsoft.CodeAnalysis.CSharp.Features (>= 4.4.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.4.0)
- Microsoft.CodeAnalysis.Features (>= 4.4.0)
- Microsoft.CodeAnalysis.Workspaces.MSBuild (>= 4.4.0)
- System.CommandLine (>= 2.0.0-beta4.22272.1)
- System.CommandLine.Hosting (>= 0.4.0-alpha.22272.1)
- System.Configuration.ConfigurationManager (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.2-beta | 229 | 2/1/2023 |
| 0.1.0-beta | 210 | 2/1/2023 |