Skip to content

libwebsocket: add missing $webSockets dependency#26318

Merged
sbc100 merged 2 commits intoemscripten-core:mainfrom
subhaushsingh:fix-websocket-deps
Feb 26, 2026
Merged

libwebsocket: add missing $webSockets dependency#26318
sbc100 merged 2 commits intoemscripten-core:mainfrom
subhaushsingh:fix-websocket-deps

Conversation

@subhaushsingh
Copy link
Contributor

@subhaushsingh subhaushsingh commented Feb 21, 2026

emscripten_websocket_new uses $webSockets but does not declare it as a dependency.

Fixes: #26310

@subhaushsingh
Copy link
Contributor Author

@sbc100 I've added a regression test for emscripten_websocket_new to cover the missing $webSockets dependency issue.
Please let me know if any adjustments are needed.

@subhaushsingh
Copy link
Contributor Author

Addressed review feedback:

  • Added assert(s > 0) in the C test to validate the return value
  • Added missing newline at EOF
  • Removed unused @parameterized decorator and args parameter from test_websocket_new

Thanks for the thorough review!


def test_websocket_new(self):
self.btest_exit('websocket/test_websocket_new.c',
cflags=['-lwebsocket'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you combine these into a single line

@sbc100 sbc100 enabled auto-merge (squash) February 24, 2026 18:28
@subhaushsingh
Copy link
Contributor Author

@kripken I've addressed all the requested changes. Could you take another look when you get a chance? Auto-merge is already enabled. Thanks!

@sbc100 sbc100 disabled auto-merge February 26, 2026 16:29
@sbc100 sbc100 merged commit c93d8f6 into emscripten-core:main Feb 26, 2026
34 checks passed
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.

emscripten websocket API: webSockets global not created unless building with -sMAIN_MODULE=1

3 participants