-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Initial merge with xeus-clang-repl (mini) #46
Initial merge with xeus-clang-repl (mini) #46
Conversation
23fb2f4
to
78155cb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
- Coverage 49.29% 49.14% -0.15%
==========================================
Files 15 15
Lines 779 643 -136
==========================================
- Hits 384 316 -68
+ Misses 395 327 -68
... and 2 files with indirect coverage changes
|
a65e661
to
057483b
Compare
a22d487
to
6c50ff7
Compare
b4c39de
to
329a72b
Compare
60a8e7b
to
a3898f7
Compare
f739d95
to
0be6de3
Compare
0be6de3
to
e75bdc8
Compare
// Inject versions of printf and fprintf that output to std::cout | ||
// and std::cerr (see implementation above). | ||
inject_symbol("printf", llvm::pointerToJITTargetAddress(printf_jit), *m_interpreter); | ||
inject_symbol("fprintf", llvm::pointerToJITTargetAddress(fprintf_jit), *m_interpreter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious to know if/why we don't need these functions anymore ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have a better way to redirect i/o streams with CppInterOp. That will be part of a new PR as we discussed to do a minimal change with this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine removing the injection of printf, but I think we should keep the C++ buffer redirection bits (as you did in this PR).
A file-based redirection won't give the same level of control as the streambuf implementation, and will also redirect things such as std::clog which are meant for the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does std::clog writes to? We only redirect file descriptors 1 and 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::clog will print to stdout by default - so will be directed to the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn’t that what we should expect if a user type std::clog in a jupyter cell? If not we can make the redirection of std::clog go somewhere else.
I think this looks fine to start with (still need to go through the changes in CMakeLists.txt). Wrote a few comments. I was anyways unhappy with the special branching we had in |
clang-tidy review says "All clean, LGTM! 👍" |
Could we disable the clang tidy "LGTM" comments? |
@SylvainCorlay The following changes can be made to the README now that the feedstock has been updated (cannot seem to provide a link to the readme so are detailed below) mamba install notebook cmake cxx-compiler xeus-zmq nlohmann_json=3.11.2 cppzmq xtl jupyterlab clangdev=16 cpp-argparse pugixml doctest -c conda-forge The dependencies section table needs to be updated to include the dependency on CppinterOp, and updated restriction of cpp-argparse for main. |
The mention that xeus-cpp has not been packaged should probably be changed. |
clang-tidy review says "All clean, LGTM! 👍" |
We could but I find it useful for most PRs. That spares several clicks for the reviewers. |
@SylvainCorlay, can we make another review iteration? |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
- xeus >=3.0.5,<4.0 | ||
- xtl >=0.7,<0.8 | ||
- llvm =16.0.6 | ||
- CppInterOp | ||
- cpp-argparse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we pin this to <3.1 too ?
@SylvainCorlay, can we move forward here? Is there something else we should improve as part of this pull request? |
Merged! |
@@ -1,9 +1,16 @@ | |||
{ | |||
"display_name": "cpp 14 (xcpp)", | |||
"env": { | |||
"PATH":"@XEUS_CPP_PATH@", | |||
"LD_LIBRARY_PATH":"@XEUS_CPP_LD_LIBRARY_PATH@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged, but I wonder why we need to set these up exactly, if it wasn't required before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alexander-penev
I actually have a doubt along similar lines. I understand how something like resource dir can contribute and hence it is good to have it introduced in argv as done in the PR !
But I am not sure how PATH
(especially LD_LIBRARY_PATH
) has a role to play here. As pointed out by Sylvain, xeus-cling never needed these. Can it be removed ?
configure_file ( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/share/jupyter/kernels/xcpp/kernel.json.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/share/jupyter/kernels/xcpp/kernel.json" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of this version compared to the previous one?
(trying to understand better because keeping cmake files of xeus-based kernels similar makes it easier to make changes across all kernels).
No description provided.