Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User generated types shouldn’t conflict with SpacetimeDB types, e.g. Message #1428

Closed
cloutiertyler opened this issue Jun 13, 2024 · 6 comments
Assignees

Comments

@cloutiertyler
Copy link
Contributor

#[spacetimedb(table)]
pub struct Message {
...
}

@cloutiertyler
Copy link
Contributor Author

What is the proposed solution for this one @RReverser? A compiler error + a runtime error if you work around the compiler error?

@RReverser
Copy link
Member

I think that's the issue I originally reported? My idea back then was just to change default namespace of spacetime generate to non-SpacetimeDB one. That would be enough to ensure that user types don't conflict with ours.

@cloutiertyler
Copy link
Contributor Author

@RReverser Is this now fixed in the C# SDK?

@gefjon is this an issue in the Rust SDK?

@cloutiertyler
Copy link
Contributor Author

@gefjon has confirmed this is not an issue in the Rust SDK.

@cloutiertyler
Copy link
Contributor Author

image image

@RReverser
Copy link
Member

Looking deeper at the history, it seems this was fixed a while back in #88. Before that change, types were generated in the SpacetimeDB namespace, conflicting with built-ins, but nowadays they're generated in SpacetimeDB.Types, so this is no longer an issue.

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

No branches or pull requests

2 participants