Skip to content

Support for Razer templates #61

Closed as not planned
Closed as not planned

Description

@rodion-m
No description provided.

Activity

  1. keynmol commented on May 14, 2024

    @keynmol

    Razor templates don't seem to be supported, Blazor should be supported.

    If you have an example of it not working, please provide a reproducer.

  2. rodion-m commented on May 14, 2024

    @rodion-m
    Author

    Ok, do you plan to support .razor files?

  3. keynmol commented on May 14, 2024

    @keynmol

    At this moment we neither have plans for any new features in SCIP indexers in general (we're focusing on support, prioritising customer support), and no plans for Razor support in particular.

    We'll be happy to review a PR adding this feature.

    I will keep the issue open to track possible future support.

  4. changed the title [-]Is Razor/Blazor indexing supported?[/-] [+]Support for Razer templates[/+] on May 14, 2024
  5. grinidx commented on Jul 30, 2026

    @grinidx

    Opened #117, which implements this.

    On the earlier point that "Blazor should be supported. If you have an example of it not working, please provide a reproducer" - here is one, against main at 4788446:

    mkdir blazor-check && cd blazor-check
    dotnet new blazor -o App
    dotnet new sln -n Check --format sln && dotnet sln Check.sln add App/App.csproj
    dotnet restore && scip-dotnet index
    scip print index.scip | grep -c '\.razor'    # 0, against 11 .razor files on disk

    dotnet new webapp gives the same result: 0 documents for 7 .cshtml files. Both are zero for the same reason - the Razor source generator hands these to the compilation rather than to disk, so project.Documents never sees them and Project.GetSourceGeneratedDocumentsAsync is where they live.

    The PR also covers the part that is easy to miss: enumerating the generated documents on its own produces obj/**/Pages_Index_cshtml.g.cs paths that do not exist on disk, so it maps positions back through the #line directives to the originating .cshtml or .razor.

    After the change: 6 .cshtml documents with 17 occurrences, 11 .razor with 153. Existing snapshots are byte-identical on net8.0, net9.0 and net10.0.

    Working notes and full measurements: https://github.com/dbhq-uk/vela-skill/blob/main/docs/upstream/scip-dotnet-razor.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions