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

feat: Torii upgrade #303

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: git submodule update --init --recursive

- run: curl -L https://install.dojoengine.org | bash
- run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.12
- run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.16
- run: |
cd worlds/dojo-starter
/home/runner/.config/.dojo/bin/sozo build
Expand Down
2 changes: 1 addition & 1 deletion packages/state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@dojoengine/recs": "2.0.13",
"@dojoengine/torii-client": "1.0.0-alpha.20",
"@dojoengine/torii-client": "workspace:*",
"vitest": "^1.6.0"
}
}
9 changes: 8 additions & 1 deletion packages/state/src/recs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ export const getEntities = async <S extends Schema>(
let continueFetching = true;

while (continueFetching) {
const entities = await client.getEntities({ limit, offset, clause });
const entities = await client.getEntities({
limit,
offset,
clause,
dont_include_hashed_keys: true,
});

if (logging) console.log(`Fetched ${entities} entities`);

Expand Down Expand Up @@ -160,6 +165,7 @@ export const getEvents = async <S extends Schema>(
limit,
offset,
clause,
dont_include_hashed_keys: true,
});

if (logging) console.log("entities", entities);
Expand Down Expand Up @@ -226,6 +232,7 @@ export const getEntitiesQuery = async <S extends Schema>(
limit,
offset: cursor,
clause: clause || undefined,
dont_include_hashed_keys: true,
});

while (continueFetching) {
Expand Down
2 changes: 1 addition & 1 deletion packages/torii-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"dependencies": {
"@dojoengine/torii-wasm": "workspace:*"
"@dojoengine/torii-wasm": "1.0.0-alpha.20"
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Issues Found:

  1. The specified version @dojoengine/[email protected] is not published. This will prevent the torii-client package from resolving its dependency correctly.
  2. There are remaining workspace dependencies for @dojoengine/torii-wasm in other packages:
    • examples/example-vite-react-phaser-recs/package.json
    • examples/example-vite-kitchen-sink/package.json
    • examples/example-vite-react-sdk/package.json

Please address these issues to ensure consistent dependency management and a successful build process.

🔗 Analysis chain

Verify the impact of switching from workspace dependency to a specific version.

The dependency @dojoengine/torii-wasm has been updated from a workspace dependency ("workspace:*") to a specific version ("1.0.0-alpha.20"). This change has several implications:

  1. It suggests that torii-wasm is now being published as a separate package rather than being used as a local workspace dependency.
  2. The version matches the current version of torii-client, which is good for consistency but may require manual updates in the future to keep them in sync.
  3. This change might affect the build process and development workflow, as it's no longer automatically using the latest local version.

To ensure this change doesn't introduce any issues, please run the following checks:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the specified version of torii-wasm is published
npm view @dojoengine/[email protected]

# Verify that the build process still works with the new dependency
npm run build

# Check for any scripts or documentation that might need updating due to this change
grep -R "workspace:\*" .

Length of output: 8214


Script:

#!/bin/bash
# Check if the specific version of torii-wasm is published using GitHub CLI
gh api repos/CodeRabbitInc/torii-wasm/releases/tags/v1.0.0-alpha.20

# Search for any remaining workspace dependencies for @dojoengine/torii-wasm in the codebase
rg '"@dojoengine/torii-wasm":\s*"workspace:\*"' .

Length of output: 578

},
"devDependencies": {
"tsup": "^8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/torii-wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -ex

# Clone the repository
git clone --depth 1 https://github.com/dojoengine/dojo.c dojo.c
git clone --depth 1 --branch grpc-update https://github.com/dojoengine/dojo.c dojo.c
cd dojo.c

# Build for web (browser)
Expand Down
Loading
Loading