-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support arbitrary-sized bytes in Ceres #258
Conversation
1310d40
to
105f9f9
Compare
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.
Blocking mainly because of unofficial compiler CLI and OTP version. Should be released soon
.github/workflows/main.yml
Outdated
sudo apt install --allow-downgrades ./esl-erlang_21.3.8.17-1~ubuntu~bionic_amd64.deb || true | ||
sudo apt --fix-broken install | ||
wget -q https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_25.2.3-1~ubuntu~jammy_amd64.deb | ||
sudo apt install --allow-downgrades ./esl-erlang_25.2.3-1~ubuntu~jammy_amd64.deb |
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.
OTP 24 is usually used around the environments, I checked with @hanssv and CLI CI and OTP 24 should sufficient
src/types/FateBytes.js
Outdated
@@ -35,9 +35,9 @@ class FateBytes extends FateData { | |||
constructor(value, size, name = 'bytes') { | |||
super(name) | |||
|
|||
this._value = toByteArray(value, size) | |||
this._value = toByteArray(value, size === 'any' ? undefined : size) |
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.
I'd prefer Infinity
, undefined
or null
instead of new string symbol
Testing the changes locally and trying to grasp in my head the new changes I realised the removing most of the changes still pass the tests:
|
Perhaps, the |
new CLI version has been released: https://github.com/aeternity/aesophia_cli/releases/tag/v7.4.1 |
shouldn't we wait till 8.0.0-rc1? As I understand 7.4.1 won't include |
in this case |
105f9f9
to
9c1dffc
Compare
@@ -152,7 +152,7 @@ class TypeResolver { | |||
} | |||
|
|||
if (key === 'bytes') { | |||
return FateTypeBytes(valueTypes) | |||
return FateTypeBytes(valueTypes === 'any' ? undefined : valueTypes) |
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.
@dincho How do you like this? I would use undefined
instead 'any'
because it works this way and FateTypeBytes
, FateBytes
are internal.
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.
I'm fine with undefined
ah, yes I didn't noticed the version |
08f5c19
to
366149f
Compare
366149f
to
7429e52
Compare
@davidyuk could you please change the implementation to get rid of |
As I understand src/TypeResolver.js is used to get internal FATE type based on ACI. Internal "type": {
"bytes": "any"
} So, the only |
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.
thanks
You're right, I overseen the location of |
related to aeternity/aesophia#456
This PR is supported by the Æternity Crypto Foundation
bin/aesophia_cli includes changed from aeternity/aesophia#495