-
Notifications
You must be signed in to change notification settings - Fork 220
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
Forchapeatl type meta #1825
base: main
Are you sure you want to change the base?
Forchapeatl type meta #1825
Conversation
javascript/packages/fury/lib/fury.ts
Outdated
@@ -44,6 +48,8 @@ export default class { | |||
this.referenceResolver = new ReferenceResolver(this.binaryReader); | |||
this.classResolver.init(this); | |||
this.anySerializer = new AnySerializer(this); | |||
this.typeMeta = new TypeMeta(BigInt(0),[]); |
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.
from_bytes
in TypeMeta is a static method, if you want to call it, you should replace by this.typeMeta = TypeMeta
return ` | ||
${this.builder.writer.int32(expectHash)}; | ||
${this.builder.writer.buffer(`Buffer.from("${metaInformation.toString("base64")}", "base64")`)}; | ||
${this.builder.writer.buffer(binaryBase64)}; |
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.
if the base64 string is "AQAAAAAAAAACgATsEgsABQg="
the code you generated will be bw.buffer(AQAAAAAAAAACgATsEgsABQg=);
it includes syntax error
Hi @theweipeng on line 147 , when I do this - ${this.builder.typeMeta.from_bytes(this.builder.reader.ownName())}
+ ${this.builder.reader.buffer(buffer.byteLength)} Please for a hint on what I am missing. |
Why did you remove reading the typeMeta? I am confused |
@theweipeng I was just experimenting . After solving the syntax error, I was trying to figure out a way to pass the tests. |
Ensure that the byte length consumed from the reader matches the length written to the buffer in the writeStmt. In the context of your code, it should be expressed as |
What does this PR do?
Related issues
Does this PR introduce any user-facing change?
Benchmark