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

Update the quickstart module #185

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Update the quickstart module #185

merged 4 commits into from
Nov 4, 2024

Conversation

lcodes
Copy link
Contributor

@lcodes lcodes commented Oct 30, 2024

Description of Changes

Fix the quickstart client program

Testing

Second subscription resets the first one without the fix

Testsuite

SpacetimeDB branch name: master

@lcodes lcodes changed the base branch from master to staging October 30, 2024 18:46
@bfops
Copy link
Collaborator

bfops commented Oct 30, 2024

Do you know why this change is required? Like does this work around an underlying bug that we should be fixing in the SDK, or is this the expected usage now? (And should we be printing a message if users do trigger this by... calling SubscriptionBuilder more than once or something?)

@lcodes
Copy link
Contributor Author

lcodes commented Oct 30, 2024

It's the 0.12 usage until the 1.0 subscriptions are implemented. But since I keep getting burned by it when testing after switching branches, might as well solve it :)

Copy link
Collaborator

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. For context this is currently overwriting the subscription. This will eventually be allowable as multiple subscriptions, but it is not for now.

@jdetter
Copy link
Collaborator

jdetter commented Oct 31, 2024

@lcodes When I build the module for the quickstart I get some errors, I believe it's because we haven't changed the Cargo.toml to point to 0.12, did you run into this when you tested your PR?

error[E0432]: unresolved import `spacetimedb::Table`
 --> src/lib.rs:1:45
  |
1 | use spacetimedb::{ReducerContext, Identity, Table, Timestamp};
  |                                             ^^^^^ no `Table` in the root

error[E0433]: failed to resolve: could not find `table` in `spacetimedb`
 --> src/lib.rs:4:16
  |
4 | #[spacetimedb::table(name = user, public)]
  |                ^^^^^ could not find `table` in `spacetimedb`

error[E0433]: failed to resolve: could not find `table` in `spacetimedb`
  --> src/lib.rs:12:16
   |
12 | #[spacetimedb::table(name = message, public)]
   |                ^^^^^ could not find `table` in `spacetimedb`

error[E0433]: failed to resolve: could not find `reducer` in `spacetimedb`
  --> src/lib.rs:19:16
   |
19 | #[spacetimedb::reducer(init)]
   |                ^^^^^^^ could not find `reducer` in `spacetimedb`

@@ -62,6 +62,18 @@ dependencies = [
"generic-array",
]

[[package]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we mean to commit this?

@bfops bfops changed the title Jeremie/fix client Update the quickstart module Nov 1, 2024
@lcodes lcodes force-pushed the jeremie/fix-client branch from d28009f to 7e2e8bb Compare November 4, 2024 19:16
@lcodes lcodes enabled auto-merge (squash) November 4, 2024 19:16
@lcodes lcodes merged commit 89a1a9b into staging Nov 4, 2024
3 of 4 checks passed
@lcodes lcodes deleted the jeremie/fix-client branch November 4, 2024 19:17
bfops pushed a commit that referenced this pull request Nov 6, 2024
Fix the quickstart client program, also removes the rust server program (it lives in the stdb main repo under modules/quickstart-chat)

Second subscription resets the first one without the fix

SpacetimeDB branch name: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants