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

feat: ⬆️ Upgrade to rquickjs 0.6.2 #377

Closed
wants to merge 1 commit into from

Conversation

KaanMol
Copy link
Contributor

@KaanMol KaanMol commented May 12, 2024

Issue # (if available)

Description of changes

Upgraded rquickjs from 0.5.1 to 0.6.2.

4 tests still seem to fail, I tried but could not figure out how to resolve them.
I hope someone will directly notice the mistakes I made and guide me to fix them :)

Checklist

  • Created unit tests in tests/unit and/or in Rust for my feature if needed
  • Ran make fix to format JS and apply Clippy auto fixes
  • Made sure my code didn't add any additional warnings: make check
  • Updated documentation if needed (API.md/README.md/Other)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@richarddavison
Copy link
Contributor

@KaanMol Thanks a lot for the PR. I've started working on this as soon as it came out :) I'm afraid this is a bit complex as TLA (Top Level Await) breaks the require functionality. In previous versions of QuickJS imports where always sync, now they return promises. This means that we need to drive promises, futures and async tasks simultaneously and a wait them from a sync function (require) which is currently not possible in latest version of rquickjs. I've submitted a PR for this in the binding lib: DelSkayn/rquickjs#310. If that doesn't get merged, I'm considering using cargo-patch to expose the task spawner from rquickjs so I can work around this.

@KaanMol
Copy link
Contributor Author

KaanMol commented May 13, 2024

I

@KaanMol Thanks a lot for the PR. I've started working on this as soon as it came out :) I'm afraid this is a bit complex as TLA (Top Level Await) breaks the require functionality. In previous versions of QuickJS imports where always sync, now they return promises. This means that we need to drive promises, futures and async tasks simultaneously and a wait them from a sync function (require) which is currently not possible in latest version of rquickjs. I've submitted a PR for this in the binding lib: DelSkayn/rquickjs#310. If that doesn't get merged, I'm considering using cargo-patch to expose the task spawner from rquickjs so I can work around this.

I noticed that as well, I also saw the PR you have open, so once yours gets merged I was hoping to get it in immediately :).
I am not expecting this PR to be merged very soon, but to already have it there :)
There are some weird things happening I noticed indeed, make test worked initially and when I restarted my editor the test just don't run anymore, the Object to Promise change has a weird quirk somewhere I think

offtopic: Love the profilepic btw on your other account 🤣

@richarddavison
Copy link
Contributor

@KaanMol thanks again for the PR! This took way longer than expected to bring in but it's now opened in #429 so I'll close this one :)

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

Successfully merging this pull request may close these issues.

2 participants