Skip to content
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

descending parameter should be optional in JS wrapper #317

Open
scottexton opened this issue Oct 22, 2024 · 10 comments
Open

descending parameter should be optional in JS wrapper #317

scottexton opened this issue Oct 22, 2024 · 10 comments

Comments

@scottexton
Copy link

No description provided.

@scottexton
Copy link
Author

A recent commit changed the Store.scan and Session.fetchAll JavaScript APIs so that the new 'descending' field is now required. Was this planned, or by mistake? Shouldn't we just have a default like there is for the other options.

@swcurran
Copy link
Contributor

@ff137 — I’m guessing that was a change you made? ^^^^

@ff137
Copy link
Contributor

ff137 commented Oct 22, 2024

@scottexton the relevant changes were made here: https://github.com/hyperledger/aries-askar/pull/291/files

My intention was for the new fields to be optional / have defaults, so that there are no breaking changes. I think I managed that in the rust/python code, but not in the JavaScript wrapper... apologies.

Looks like descending: boolean should be descending?: boolean in the wrappers/javascript/packages/aries-askar-shared methods.

@scottexton
Copy link
Author

@ff137 Will you make a fix for that, or do you want me to?

@ff137
Copy link
Contributor

ff137 commented Oct 22, 2024

@scottexton I do feel responsible to clean up my mess and make a PR, but review-approve takes time. It's probably best if you can test a fix, given that you're working with the js wrapper.

Should just involve adding a ? to those descending: bool lines

@scottexton
Copy link
Author

@ff137 Alright. I will include a fix in amongst my other changes.

@scottexton
Copy link
Author

A pull request has been created with a fix for this issue (#319) - this fix is embedded within a larger change to introduce ODBC backend support.

@andrewwhitehead andrewwhitehead changed the title 'descending descending parameter should be optional in JS wrapper Nov 25, 2024
@ff137
Copy link
Contributor

ff137 commented Dec 11, 2024

I was about to post a quick fix for this, but I see the javascript wrapper is no longer here (moved to askar-wrapper-javascript).

Wanted to post a fix there, but I see that repo doesn't have the latest commits from the last few months - it's only synced with this repo up until 2nd July: https://github.com/openwallet-foundation/askar-wrapper-javascript/commits/main/

So, just wanted to check if the JavaScript wrapper intentionally drops the recent changes? In which case this issue can be closed.

@andrewwhitehead @swcurran

@swcurran
Copy link
Contributor

Yes — its a bit of a mess right now.

The initial problem was being unable to release Askar because we couldn’t get the JS/RN Wrapper tests to pass for a new version. We could get the Rust to pass (using the Python wrapper for testing), but not the JS/RN. Further, getting maintainers to do both the Rust and the JS Wrapper turned into a pain point.

So we decided to separate out the JS Wrapper from the core Rust library, keeping the Python wrapper here for testing. The idea is that we can do an Askar release at any time, and those wanting the release in JS/RN could update the wrapper after the fact. So we’ve got that, and we’re nearing a release of Askar (just working out the publishing from OWF vs. Hyperledger). However, we’ve not lined up a resource to work on the JS part — removing the Rust/Python from the new library, setting up the release pipeline, updating the Wrapper, and (hardest part) getting it to work for Android. On the last item — we are in a combination of dependency hell and a lack of knowledge about what makes sense for RN + Android — what is the magic combination that will work for everyone???

So that’s where we are. We think we can get resources for the JS/RN Wrapper in January, but would love someone else to help out.

@swcurran
Copy link
Contributor

I would add that some think that we should keep the whole thing in one repo. What do you think @ff137 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants