Skip to content

Conversation

@mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

This PR updates CppInterOps Emscripten workflows to emsdk version 4.0.9 . With these changes locally CppInterOps Emscripten build passed all tests, but works is needed in xeus-cpp before this PR will be ready to go in.

name: CppInterOp-wasm
channels:
- https://prefix.dev/emscripten-forge-dev
- https://prefix.dev/emscripten-forge-4x
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change has to be made until Emscripten forges emsdk 4x branch is merged into its main.

std::vector<Decl*> Decls;
std::string code = "int f1(int i) { return i * i; }";
std::vector<const char*> interpreter_args = {"-include", "new"};
std::vector<const char*> interpreter_args = {"-include", "new", "-Xclang", "-iwithsysroot/include/compat"};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Given these extra flags are only needed for the Emscripten case, it might be worth making the args dependent on what platform we are targeting. Same for the other test.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

if (llvm::sys::RunningOnValgrind())
GTEST_SKIP() << "XFAIL due to Valgrind report";
std::vector<const char*> interpreter_args = { "-include", "new" };
std::vector<const char*> interpreter_args = { "-include", "new", "-Xclang", "-iwithsysroot/include/compat" };
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: no header providing "std::vector" is directly included [misc-include-cleaner]

unittests/CppInterOp/InterpreterTest.cpp:2:

+ #include <vector>

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.04%. Comparing base (2df83a9) to head (55c39dc).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #753   +/-   ##
=======================================
  Coverage   79.04%   79.04%           
=======================================
  Files           9        9           
  Lines        3879     3879           
=======================================
  Hits         3066     3066           
  Misses        813      813           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mcbarton
Copy link
Collaborator Author

Its not clear why googletest fails to build in the Emscripten ci with this change (see https://github.com/compiler-research/CppInterOp/actions/runs/19363850250/job/55410413357?pr=753#step:9:310). This error doesn't happen locally for me. I will debug (probably next week).

@mcbarton
Copy link
Collaborator Author

Its not clear why googletest fails to build in the Emscripten ci with this change (see https://github.com/compiler-research/CppInterOp/actions/runs/19363850250/job/55410413357?pr=753#step:9:310). This error doesn't happen locally for me. I will debug (probably next week).

It fails in the ci but not locally as the googletest in the ci is built with warnings treated as errors. Here is the warning I need to fix when googletest is being built https://github.com/compiler-research/CppInterOp/actions/runs/19366708961/job/55411697302?pr=753#step:9:363 .

@mcbarton mcbarton force-pushed the Update-emsdk-used-to-version-4.0.9 branch from 62c3987 to 55c39dc Compare November 14, 2025 16:49
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.

1 participant