Skip to content

Downgrade ERG0010 from error to info#3

Merged
migus88 merged 2 commits into
mainfrom
feature/multiple-singletons
May 23, 2026
Merged

Downgrade ERG0010 from error to info#3
migus88 merged 2 commits into
mainfrom
feature/multiple-singletons

Conversation

@migus88

@migus88 migus88 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ERG0010 (duplicate singleton interface) was a hard error. Multiple [Singleton] classes sharing a custom interface is now allowed but surfaces as an Info diagnostic that flags the potential issue.
  • Reworded the title/message to drop the "only one class can own" framing; now it just notes that the sharing can cause issues and should be used with caution.

Test plan

  • Build the generator: dotnet build src/generators-src/EngineRoom.Generators.sln -c Release
  • Open src/generators-unity/ in Unity, confirm a project with two [Singleton] classes claiming the same interface compiles and shows ERG0010 only as an info-level message

migus88 added 2 commits May 24, 2026 01:01
Sharing a singleton interface across classes is allowed but worth
flagging. Surface it as informational guidance instead of blocking
compilation.
@migus88 migus88 merged commit 4a9fc1e into main May 23, 2026
@migus88 migus88 deleted the feature/multiple-singletons branch May 23, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant