ScipDotnet 0.1.2-beta

This is a prerelease version of ScipDotnet.
dotnet add package ScipDotnet --version 0.1.2-beta
                    
NuGet\Install-Package ScipDotnet -Version 0.1.2-beta
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ScipDotnet" Version="0.1.2-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ScipDotnet" Version="0.1.2-beta" />
                    
Directory.Packages.props
<PackageReference Include="ScipDotnet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ScipDotnet --version 0.1.2-beta
                    
#r "nuget: ScipDotnet, 0.1.2-beta"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ScipDotnet@0.1.2-beta
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ScipDotnet&version=0.1.2-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ScipDotnet&version=0.1.2-beta&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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