Skip to content

[WIP] Fix failing CI for PR #223#224

Closed
Copilot wants to merge 1 commit intocopilot/cleanup-draft-pr-186from
copilot/fix-ci-errors-pr-223
Closed

[WIP] Fix failing CI for PR #223#224
Copilot wants to merge 1 commit intocopilot/cleanup-draft-pr-186from
copilot/fix-ci-errors-pr-223

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 16, 2026

  • Inspect PR Add time-dependent function input for boundary conditions #223 workflow runs and failing jobs/logs (including job 71120187682)
  • Reproduce failures locally (build/lint/test) on current branch before edits
  • Apply minimal fix in src/ThirdParty/exprtk.hpp for clang template keyword error and document vendored rationale inline
  • Address any additional failing CI/codecheck issues with minimal scoped changes
  • Run targeted validation, then full relevant local checks matching .github/workflows/test.yml
  • Run parallel validation (code review + CodeQL), resolve actionable findings, and report final status
Original prompt

Create a PR against base branch copilot/cleanup-draft-pr-186 in repository SimVascular/svZeroDSolver to fix failing CI for PR #223.

Primary failure (job 71120187682): macOS clang compile error in vendored header src/ThirdParty/exprtk.hpp:

  • error: "a template argument list is expected after a name prefixed by the template keyword" at several lines (approx. 17379, 17435, 17507, 17579, 18172 in the current file).
  • The failing code pattern is expression_node<T>::ndb_t::template collect(branch_, node_delete_list);.
  • Fix by removing the erroneous template keyword (or otherwise making it valid C++ across supported compilers).

Additionally, address any other failing CI jobs and codechecks on PR #223 (run all relevant linters/formatters/tests as configured in workflows) so that the PR passes.

Constraints:

  • Keep changes minimal and focused.
  • If updating vendored third-party code, document the rationale in a comment near the change.
  • Ensure builds succeed on ubuntu-latest, macos-latest, and windows-latest as per .github/workflows/test.yml.

Reference failure logs come from GitHub Actions job ID 71120187682 (Build and test workflow).

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for failing job 71120187682. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure in job 71120187682 is a compile error on macOS (clang) coming from the vendored header src/ThirdParty/exprtk.hpp:

error: a template argument list is expected after a name prefixed by the template keyword
expression_node<T>::ndb_t::template collect(branch_, node_delete_list);

This is emitted at multiple locations (e.g. around lines 17379, 17435, 17507, 17579, 18172 in exprtk.hpp, per the log), and it stops the build of the Python extension (pysvzerod) during pip install -e ".[dev]" on macOS.

Fix: remove the incorrect template keyword (or add the missing template args)

In C++, the template disambiguator is only valid when the following name is a dependent template. In your case, collect is being called like a non-template function:

expression_node<T>::ndb_t::template collect(branch_, node_delete_list);

Clang correctly rejects this because there is no <...> after collect.

Recommended patch (most common for exprtk)

Edit src/ThirdParty/exprtk.hpp and change each occurrence of:

expression_node<T>::ndb_t::template collect(branch_, node_delete_list);

to:

expression_node<T>::ndb_t::collect(branch_, node_delete_list);

That matches the intent (a normal static/member function call) and resolves -Wmissing-template-arg-list-after-template-kw promoted to an error by your build settings.

If collect is actually a function template in your exprtk version, then the alternative fix is to supply template arguments, e.g.:

expression_node<T>::ndb_t::template collect<some_type>(branch_, node_delete_list);

—but given the call sites in the log, this looks like the classic “stray template keyword” issue, so removing template is the correct correction.

Why this fixes the job

The workflow (.github/workflows/test.yml at ref b8deb174d3c9b5cf320e21b40a6df7b5b796c33a) installs with:

python -m pip install -e ".[dev]"

which builds the C++ code. Clang fails immediately in exprtk.hpp, so many translation units fail after including it. Fixing the header allows the editable build to complete, unblocking the rest of the compile and tests.

Practical follow-up (to keep it stable)

  • Prefer updating the vendored exprtk.hpp to a known-good upstream revision that is clang-clean, rather than carrying a local patch long-term.
  • If you must keep the vendored file, add a small comment near the modified lines noting it’s a clang compatibility fix, so it doesn’t get “reverted” later.

Code location reference (use this ref in links): b8deb174d3c9b5cf320e21b40a6df7b5b796c33a.

User: can you make this patch in a new agent session?

Assistant: Yes — I can make that patch, but I need one clarification first: which branch should the PR target (the base branch), e.g. main?

Once you confirm, I’ll start a new coding-agent PR session for SimVascular/svZeroDSolver that:

  • edits src/ThirdParty/exprtk.hpp
  • removes the stray template keyword in the failing ...::template collect(...) calls (the ones around the line numbers shown in job 71120187682)
  • pushes the change on a new branch and opens a PR.

Reply with the base branch name (likely main).

User: it should be in copilot/cleanup-draft-pr-186. while you are at it, address the other failed CI jobs and codechecks

Assistant: I’ve started a new agent session to prepare a PR targeting copilot/cleanup-draft-pr-186 that (1) fixes the ma...

This pull request was created from Copilot chat.

Copilot stopped work on behalf of ncdorn due to an error April 16, 2026 20:13
Copilot AI requested a review from ncdorn April 16, 2026 20:13
@ncdorn ncdorn closed this Apr 16, 2026
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