Skip to content

[requires CppInterOp 1.9.0 release] Use Cpp::GetLanguageStandard to get language standard#461

Merged
mcbarton merged 2 commits into
compiler-research:mainfrom
mcbarton:detect-standard-via-c++
Apr 1, 2026
Merged

[requires CppInterOp 1.9.0 release] Use Cpp::GetLanguageStandard to get language standard#461
mcbarton merged 2 commits into
compiler-research:mainfrom
mcbarton:detect-standard-via-c++

Conversation

@mcbarton

Copy link
Copy Markdown
Collaborator

With CppInterOp 1.9.0, an API was created which can detect the c/c++ standard used (Cpp::GetLanguageStandard). This PR replaces get_stdopt xeus-cpp is currently using with Cpp::GetLanguageStandard. This PR needs testing and I will check it in the coming days.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

There were too many comments to post at once. Showing the first 10 out of 21. Check the log or trigger a new build to see more.

Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated
Comment thread src/xinterpreter.cpp Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/xinterpreter.cpp Outdated
@codecov-commenter

codecov-commenter commented Mar 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.22727% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.90%. Comparing base (88ae231) to head (31ff22e).

Files with missing lines Patch % Lines
src/xinterpreter.cpp 10.22% 79 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   80.56%   73.90%   -6.66%     
==========================================
  Files          21       21              
  Lines         854      939      +85     
  Branches       80       80              
==========================================
+ Hits          688      694       +6     
- Misses        166      245      +79     
Files with missing lines Coverage Δ
src/xinterpreter.cpp 60.49% <10.22%> (-28.75%) ⬇️
Files with missing lines Coverage Δ
src/xinterpreter.cpp 60.49% <10.22%> (-28.75%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/xinterpreter.cpp
Comment thread src/xinterpreter.cpp
Comment thread src/xinterpreter.cpp
@mcbarton mcbarton marked this pull request as ready for review March 27, 2026 16:54
@mcbarton mcbarton requested a review from vgvassilev March 27, 2026 16:54
@mcbarton mcbarton force-pushed the detect-standard-via-c++ branch 4 times, most recently from 51e79c3 to b545d00 Compare March 30, 2026 07:40
@mcbarton mcbarton requested a review from anutosh491 March 30, 2026 07:40
@mcbarton mcbarton force-pushed the detect-standard-via-c++ branch 3 times, most recently from 19e4ea1 to 9f90164 Compare March 30, 2026 09:49
@mcbarton mcbarton force-pushed the detect-standard-via-c++ branch from 9f90164 to 31ff22e Compare March 31, 2026 14:25

@JohanMabille JohanMabille left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not using the version passed on the CLI instead? It would be much simpler.

@mcbarton

mcbarton commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator Author

Why not using the version passed on the CLI instead? It would be much simpler.

@JohanMabille If you're asking why we don't Replace runtime C++ version detection with compile-time extraction from argv, then @vgvassilev answered this here I believe #349 (comment)

@mcbarton mcbarton merged commit 160b934 into compiler-research:main Apr 1, 2026
35 of 50 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.

get_stdopt caters only to the c++ kernel Prefer extracting C++ standard version from argv at startup over runtime evaluation

5 participants