Skip to content

C# Bound causes ambiguous reference with Local after upgrading to 1.11.2 #3995

@rekhoff

Description

@rekhoff

After a report by community user ezoray, we have determined that after upgrading the SpacetimeDB C# SDK to v1.11.2, users may encounter a C# compiler error “ambiguous reference” involving the Local type when using Bound in generated/index filter APIs.

This happens because Bound was only available under SpacetimeDB.Internal, which encourages users (or generated code) to add using SpacetimeDB.Internal;. In v1.11.2, SpacetimeDB.Internal gained a public Local type (introduced by PR #3809), which now collides with the public SpacetimeDB.Local type in the main namespace.

Affected versions

Works in: v1.11.1
Regression in: v1.11.2

Symptoms / error

When SpacetimeDB.Internal is imported and Local is referenced (directly or indirectly), the compiler can produce something like:

  • error CS0104: 'Local' is an ambiguous reference between 'SpacetimeDB.Local' and 'SpacetimeDB.Internal.Local'

Root cause

  • Bound lived in SpacetimeDB.Internal, effectively forcing users to reference an internal namespace.
  • PR C# implementation of Transactions for Procedures #3809 introduced public partial class Local in SpacetimeDB.Internal (Runtime/Internal/Module.cs).
  • There is already a public SpacetimeDB.Local (procedure context DB accessor), so importing SpacetimeDB.Internal now introduces a name collision.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions