-
Notifications
You must be signed in to change notification settings - Fork 7
Feature add new bin format #9
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
base: master
Are you sure you want to change the base?
Conversation
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| check-latest: true | ||
| #cache: 'npm' |
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.
| #cache: 'npm' | |
| cache: 'npm' |
The actions team said that the cache problem has been resolved
| await readBinFileV2(); | ||
| } | ||
|
|
||
| fd.binVersion = binVersion; |
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.
Why do you add the binVersion to the fd instead of return it in the object below?
I could see the return value be { fd, sections, binVersion } instead. Thoughts?
|
|
||
| return {fd, sections}; | ||
|
|
||
| async function readBinFileV1() { |
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.
Do you want these functions inside the closure instead of passing in arguments you need?
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.
Yes, it should only be used inside readBinFile(...).
| } | ||
| } | ||
|
|
||
| async function readBinFileV2() { |
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.
Do you want these functions inside the closure instead of passing in arguments you need?
| } | ||
| } | ||
|
|
||
| fd.binVersion = binVersion; |
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.
Same question as above. We could return { fd, binVersion } below
| throw new Error("Already writing a section"); | ||
| } | ||
|
|
||
| if(BIN_FORMAT_1 === fd.binVersion) { |
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.
Ah, I see that you didn't want to change the parameters here, which only works if you attached binVersion to the fd 🤔
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.
It's a flag for the file descriptor indicating which binary format version is using
No description provided.