-
Notifications
You must be signed in to change notification settings - Fork 671
Open
Description
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 importingSpacetimeDB.Internalnow introduces a name collision.