Skip to content

prioritize resource-dir provided by user over auto-detecting#791

Merged
Vipul-Cariappa merged 2 commits intocompiler-research:mainfrom
Vipul-Cariappa:dev/res-dir
Feb 2, 2026
Merged

prioritize resource-dir provided by user over auto-detecting#791
Vipul-Cariappa merged 2 commits intocompiler-research:mainfrom
Vipul-Cariappa:dev/res-dir

Conversation

@Vipul-Cariappa
Copy link
Copy Markdown
Collaborator

@Vipul-Cariappa Vipul-Cariappa commented Jan 30, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.40%. Comparing base (34b083e) to head (e5b9ae1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #791      +/-   ##
==========================================
+ Coverage   79.32%   79.40%   +0.08%     
==========================================
  Files          11       11              
  Lines        3966     3987      +21     
==========================================
+ Hits         3146     3166      +20     
- Misses        820      821       +1     
Files with missing lines Coverage Δ
lib/CppInterOp/CppInterOp.cpp 87.80% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

Files with missing lines Coverage Δ
lib/CppInterOp/CppInterOp.cpp 87.80% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

const std::vector<const char*>& GpuArgs /*={}*/) {
std::string MainExecutableName = sys::fs::getMainExecutable(nullptr, nullptr);
std::string ResourceDir = MakeResourcesPath();
std::string ResourceDir = parse_for(Args, "-resource-dir");
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.

Passing an empty resource dir should be wrong on the client side. I guess I do not understand this change.

Copy link
Copy Markdown
Collaborator Author

@Vipul-Cariappa Vipul-Cariappa Feb 2, 2026

Choose a reason for hiding this comment

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

Among the Args passed to CreateInterpreter, I try to find the -resource-dir. If the passed value is valid, then I use it as it is. Otherwise, I try to detect it using existing methods.

Why is this required?
In Line 3400, we set the necessary library search location explicitly (Because by default, linker flags are ignored in repl).

In xeus-cpp setting, we (CppInterOp) cannot manually detect the correct resource. And the -resource-dir passed by xeus-cpp kernel is the correct location. Therefore, I am prioritising it over detecting it within CppInterOp.

Let me know if any other clarifications are required.

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.

Can you rename the function to extract resource dir argument and also put what you just said as a comment.

Copy link
Copy Markdown
Collaborator

@mcbarton mcbarton left a comment

Choose a reason for hiding this comment

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

I have tested this patch locally, and it was able to remove my hack from the openmp kernels PR. After this is in, it should just be a case of fixing the environment.yml file in my xeus-cpp PR to get the ci to pass without my hack. @Vipul-Cariappa Thanks for all your work solving this issue. I'd wait for @vgvassilev to approve this PR before taking it in though.

Copy link
Copy Markdown
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

clang-tidy review says "All clean, LGTM! 👍"

@Vipul-Cariappa Vipul-Cariappa merged commit af760d0 into compiler-research:main Feb 2, 2026
48 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the dev/res-dir branch February 2, 2026 19:22
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.

3 participants