C# 14 extension declarations can cause file to be omitted from index · Issue #2071 · DeusData/codebase-memory-mcp · GitHub
Skip to content

C# 14 extension declarations can cause file to be omitted from index #2071

Description

@Msirkovsky

Version

codebase-memory-mcp 0.10.8

Platform

Windows (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

What happened, and what did you expect?

A valid C# 14 extension declaration can cause the containing .cs file to not be indexed at all.

Minimal example:

using System;
using System.Collections.Generic;
using System.Linq;

namespace DemoApp.Domain.Test;

public static class NumberExtensions
{
extension(IEnumerable numbers)
{
public int SumPositive() =>
numbers.Where(number => number > 0)
.Aggregate(0, static (running, next) => running + next);
}
}

After indexing the repository, this extension method is not present in the Codebase Memory graph at all.

Expected result

The extension method should be indexed normally.

Reproduction

  1. Create a .NET project using C# 14.
  2. Add a file containing:
    using System.Collections.Generic;
    using System.Linq;

namespace DemoApp.Domain.Test;

public static class NumberExtensions
{
extension(IEnumerable numbers)
{
public int SumPositive() =>
numbers.Where(number => number > 0)
.Aggregate(0, static (running, next) => running + next);
}
}
3. Run a full repository index.
4. Search the graph for: SumPositive

Actual Result:

The SumPositive is not indexed / does not appear in the graph.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgeswindowsWindows-specific issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions