-
Notifications
You must be signed in to change notification settings - Fork 122
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
🧠 Logic: 🐛 Fix consult/1
base64 decoding
#387
Conversation
Codecov Report
@@ Coverage Diff @@
## main #387 +/- ##
==========================================
+ Coverage 63.84% 63.93% +0.09%
==========================================
Files 60 60
Lines 2633 2640 +7
==========================================
+ Hits 1681 1688 +7
Misses 873 873
Partials 79 79
|
consult/1
base64 decoding consult/1
base64 decoding
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.
That's really nice, thanks! Always appreciate reflect incantations 🙄
I've some remarks regarding error messages and also an open question regarding eventual iterator error, let's discuss it :)
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.
Oh and as the changes on the virtual file system and the consult are breaking changes, I think the related commits shall contains the breaking change marker (i.e. !
) after the commit's types :)
f8dfe4e
to
a37178c
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.
That's great thanks! 💪
a37178c
to
80e232f
Compare
Apologies for the delay on this matter. I have some concerns about the proposed approach. I would have incorporated instructions for Base64 decoding in the URI itself, as it carries the protocol elements. IMHO, the responsibility for decoding should lie with the VFS rather than the consuming function (as initially proposed by #384). And we could consider to have Base64 decoding set as the default option for the considered URI, to avoid any breaking changes, I presume. as it stands, the current approach appears to be quite limiting. What are your thoughts on this? |
@ccamel Yes I'm agree, I prefer to make the logical on URI that will hold this decoding information but we have choose this approach to avoid breaking change. Otherwise, make the decoding by default on this URI and add an option to remove the decoding should be a good compromise. Before continue, which URI parameter could be used to deactivate encoding ? |
Well, I'm divided.. Regarding the Base64 at the VFS level, the need appeared using a consult loading sources from the objectarium smart contract which return the data in Base64, this seems to me far from the nominal case and it hardly justify this behavior on the VFS, in my opinion. On the other side this is weird to have the Base64 decoding in the consult, but to prevent any limitations the implementation here supports both Base64 and raw data. However, I'm not against going on the URI param way I you both prefer :) |
One way to declare the intention of base64 decoding right in the URI would be: |
80e232f
to
5ab1113
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.
Great! Thanks.
🎉 This PR is included in version 5.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fixes #384.