Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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(lang): add the ability to get a WorldStorage from a namespace hash #2686
base: feat/poseidon-macro
Are you sure you want to change the base?
feat(lang): add the ability to get a WorldStorage from a namespace hash #2686
Changes from 5 commits
b1f3532
5a9fa53
adc5566
a4c9109
a897f4c
21a19b7
3b772ce
ef21c50
8a1f9d9
f44886d
374461d
b55f1fc
c5a4eaf
da52a06
d7930e6
8eb8c48
cc82661
1aabd5f
3283ecb
339e9c1
ebcc23d
edaa6a2
fe5c48e
c65c257
cd80507
0fe329a
08a52c7
1aab149
3774731
e191569
0f72d24
3ba53c8
a0a173e
6644564
cd17676
938d50f
859c9d9
56c0bf7
d0722c4
ef343bb
2026f58
2dd561a
e9f286c
75c43a8
9d57b4b
9aa5b10
68999b2
327e653
ffc9259
0cb5923
7179919
06bc91e
90e2edd
ea0973c
9be17f3
b5d7ded
575040c
b821845
c5e7d6b
a023fc6
484b7da
d44522f
dccd06e
36dd785
bd04c6b
0d29ae3
3e062fd
2738f67
71db0b4
cc4c800
51545fa
bcd581e
35a58b3
91c76d9
133feec
ba8ff05
09dfaaf
8f72aea
7817319
c730914
180c6d2
4e8f254
8111b6d
b0e9367
3f9c309
28ec8e8
fcf9e26
a2f00ed
d67a5fd
c0b8033
93168a1
7ff762c
12c96ae
3c32891
845c5b1
548783b
7b37e22
6be2d0c
02557ae
04b5f02
1c3ff08
d21b1a1
bd8afc8
6816de7
bae15c6
6fee398
cfbe7f7
5524d6f
247a4ca
8087e0a
13c0c24
4aecc53
c45f70d
19b0486
38b3c2a
3ccea4b
38f68db
07bb880
d9e93c4
3daa543
1ddee9e
e6d82d9
23614ea
eb65d81
baf0ce9
5d1d308
7036164
07d7595
7718099
1829ce5
4371331
80ac6d1
6a7f065
dd1ccce
b5e45c3
3e517d1
c93a058
a5377ac
56e0bf3
fde72d7
a295c22
2caf241
1ca1257
c54c427
34e56d6
2c77db4
47349d1
3e5bf2b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Missing #[test] attribute!
The test won't be executed without the test attribute.
Apply this diff to fix:
+#[test] fn test_poseidon_hash_string_var() {
📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Missing #[test] attribute and consider additional negative cases!
Apply this diff to fix the attribute:
+#[test] fn test_poseidon_hash_string_ne() {
📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if
poseidon_hash_bytearray
would not be more consistent with the dojo utils functions already usingbytearray
instead of string.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Ohayo, sensei! Properly handle string literals for the
tag
.Using
replace('\"', "")
may not correctly handle all cases, especially if the tag contains escaped quotes or special characters.Consider parsing the string literal to accurately extract the tag value, handling any escaped characters appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Ohayo sensei! Missing test file for poseidon_hash_string
The test case
poseidon_hash_string
is added to the test macro but the corresponding test file is missing incrates/dojo/lang/src/semantics/test_data/
. All other test files listed in the macro have their corresponding files present in the test directory.crates/dojo/lang/src/semantics/test_data/poseidon_hash_string
get
,set
,selector_from_tag
etc. are properly present🔗 Analysis chain
Ohayo sensei! Verify the test file existence and structure.
The new test case
poseidon_hash_string
has been added to the test suite, but we should verify that the corresponding test file exists at the expected location.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 192
Script:
Length of output: 586
Script:
Length of output: 2474
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be removed as not used.