Skip to content

Conversation

@BalkanMadman
Copy link

Proposed changes

This patch series fixes certain bits related to QuickJS-NG.

  1. QuickJS-NG removed the ctx parameter from the JS_IsError function around a month ago in quickjs-ng/quickjs@57fffbb. The first commit of this PR adds a shim macro to quickjs_compat.h that, if QUICKJS_NG is used, defines JS_IsError(ctx, val) to JS_IsError(val).
  2. In quickjs-ng/quickjs@8e671eb, Meson support was introduced. If built with Meson, QuickJS-NG generates .pc (pkg-config) modules which greatly simplify linking to it. The second commits adds pkg-config-based detection for QuickJS-NG.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes

Since 57fffbbb6a98b316e5195ff31655cd13db2bfa5b ("Remove unused JSContext
argument from JS_IsError")[1], QuickJS-NG's JS_IsError() takes only the
value parameter, no context.

[1]: quickjs-ng/quickjs@57fffbb

Signed-off-by: Zurab Kvachadze <[email protected]>
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@BalkanMadman
Copy link
Author

I have hereby read the F5 CLA and agree to its terms

I have hereby read the F5 CLA and agree to its terms

@BalkanMadman
Copy link
Author

I have hereby read the F5 CLA and agree to its terms

In QuickJS-NG since 8e671eb8e59f5f5d7eca111386fbe158fab09049 ("build:
initial support for meson build system")[1], Meson can be used as a
build system, generating .pc (pkg-config) modules. This commit adds
another method of QuickJS-NG discovery using pkg-config.

[1]: quickjs-ng/quickjs@8e671eb

Signed-off-by: Zurab Kvachadze <[email protected]>
@BalkanMadman
Copy link
Author

Fixed ngx_found -> njs_found in auto/quickjs.

@xeioex
Copy link
Contributor

xeioex commented Nov 19, 2025

Hi @BalkanMadman,

Thank you for the patch.

Please, take a look at my attempt here #989.
I unified pkg-config usage with other places in njs. Also, added CI tests.
Does it work for you?

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