Skip to content

Update tags definition, add tests for xinspect #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

tharun571
Copy link
Contributor

No description provided.

@tharun571 tharun571 marked this pull request as draft May 29, 2024 13:06
Copy link
Contributor

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

1 similar comment
Copy link
Contributor

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

@tharun571 tharun571 marked this pull request as ready for review May 29, 2024 13:29
@codecov-commenter
Copy link

codecov-commenter commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.05%. Comparing base (7e5b820) to head (469be10).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   79.41%   82.05%   +2.64%     
==========================================
  Files          17       17              
  Lines         612      613       +1     
  Branches       59       59              
==========================================
+ Hits          486      503      +17     
+ Misses        126      110      -16     
Files Coverage Δ
src/xinterpreter.cpp 88.67% <ø> (ø)

... and 1 file with indirect coverage changes

Files Coverage Δ
src/xinterpreter.cpp 88.67% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

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

1 similar comment
Copy link
Contributor

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

Copy link
Contributor

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

@tharun571 tharun571 requested a review from vgvassilev May 30, 2024 09:33
Copy link
Contributor

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

Copy link
Contributor

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

@tharun571 tharun571 changed the title Update tags definition, add tests for xmagics, xinspect Update tags definition, add tests for xinspect May 31, 2024
Copy link
Contributor

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

@tharun571 tharun571 force-pushed the test-coverage branch 2 times, most recently from b8bbb18 to 4535a36 Compare June 1, 2024 06:38
Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

1 similar comment
Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

CMakeLists.txt Outdated
endif ()
endforeach ()
# Set the version
set(XEUS_CPP_VERSION_MAJOR 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tharun571 You probably want to set the version number the way we do in CppInterOp with a version file (see https://github.com/compiler-research/CppInterOp/pull/296/files for more details). It will allow us to label something as a version in development.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The version file for xeus-cpp would currently have 0.5.0;dev as we are currently developing version 0.5.0 and no longer on version 0.4.0

Copy link
Collaborator

Choose a reason for hiding this comment

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

You won't need to add a XeusCppConfigVersion.cmake.in to be clear

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can add a "XEUS_CPP_LABEL" or anything else to handle the "dev" part of the version (when there is one). But as said previously, I am strongly opposed to having cmake injecting the version in the cpp code.

@vgvassilev vgvassilev requested a review from JohanMabille June 1, 2024 10:18
Copy link
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.

Looks good to me but I cannot take that decision without @JohanMabille.

@mcbarton
Copy link
Collaborator

mcbarton commented Jun 1, 2024

Looks good to me but I cannot take that decision without @JohanMabille.

@vgvassilev There is a bug at the moment. When the config header file is configured it still has ;dev in the patch variable . Me and @tharun571 have been discussing. I can't see why. Do you see why?

@vgvassilev
Copy link
Contributor

Looks good to me but I cannot take that decision without @JohanMabille.

@vgvassilev There is a bug at the moment. When the config header file is configured it still has ;dev in the patch variable . Me and @tharun571 have been discussing. I can't see why. Do you see why?

Do we parse the list properly the way we do in CppInterOp?

@mcbarton
Copy link
Collaborator

mcbarton commented Jun 1, 2024

Looks good to me but I cannot take that decision without @JohanMabille.

@vgvassilev There is a bug at the moment. When the config header file is configured it still has ;dev in the patch variable . Me and @tharun571 have been discussing. I can't see why. Do you see why?

Do we parse the list properly the way we do in CppInterOp?

In an identical way as I linked the PR where we parsed it in CppInterOp as a guide. For some reason that isn't obvious to me the patch number still has ;dev .

@mcbarton
Copy link
Collaborator

mcbarton commented Jun 1, 2024

This ;dev doesn't happen in CppInterOp, as it was the whole reason we parsed it in this way to avoid the ;dev in patch version number, and allowing finding a version number correctly.

@vgvassilev
Copy link
Contributor

Well, something must be different.

Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

Copy link
Contributor

github-actions bot commented Jun 1, 2024

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

@mcbarton
Copy link
Collaborator

mcbarton commented Jun 1, 2024

Well, something must be different.

@vgvassilev A solution to the patch version issue has been found and the PR is ready for review by @JohanMabille

Copy link
Collaborator

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

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

What was the motivation for changing the logic of version and tag definitions?

EDIT: I just saw Vassil's comment, sorry for my late reply.

#define XEUS_CPP_VERSION_PATCH 0
#define XEUS_CPP_VERSION_MAJOR @XEUS_CPP_VERSION_MAJOR@
#define XEUS_CPP_VERSION_MINOR @XEUS_CPP_VERSION_MINOR@
#define XEUS_CPP_VERSION_PATCH @XEUS_CPP_VERSION_PATCH@
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be configured by an external tool. This makes the cpp code depend on the building tools. This should be reverted to the previous behavior which was the correct one.

CMakeLists.txt Outdated
string(REPLACE "\\" "" VERSION_LIST "${VERSION_LIST}")
list(GET VERSION_LIST 0 XEUS_CPP_VERSION_MAJOR)
list(GET VERSION_LIST 1 XEUS_CPP_VERSION_MINOR)
list(GET VERSION_LIST 2 XEUS_CPP_VERSION_PATCH)
Copy link
Collaborator

Choose a reason for hiding this comment

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

See the comment in xeus_cpp_config.hpp.on.

CMakeLists.txt Outdated
@@ -168,6 +175,9 @@ message("Configure kernels: ...")
configure_kernel("/share/jupyter/kernels/xcpp17/")
configure_kernel("/share/jupyter/kernels/xcpp20/")

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp.in"
"${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp")

Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be removed (see the comment in xeus_cpp_config.hpp.in).

Copy link
Contributor

github-actions bot commented Jun 3, 2024

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

Copy link
Contributor

github-actions bot commented Jun 4, 2024

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

Copy link
Contributor

github-actions bot commented Jun 4, 2024

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

@tharun571 tharun571 requested a review from JohanMabille June 4, 2024 18:07
CMakeLists.txt Outdated
@@ -23,18 +23,28 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")

set(XEUS_CPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

# xeus-cpp tag files
set(XEUS_CPP_DATA_DIR "share/xeus-cpp" CACHE STRING "xeus-cpp data directory")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to put these in the cache?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was there in the previous code. CACHE just turns up in the cmake config tool as setting you can set. The initial commit for it was made by @mvassilev

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. We can set them as normal variables.

@tharun571 tharun571 requested a review from vgvassilev June 5, 2024 05:31
Copy link
Contributor

github-actions bot commented Jun 5, 2024

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

Copy link
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, let's wait for @JohanMabille final say.

set(XCPP_TAGCONFS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/etc/xeus-cpp/tags.d)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp.in"
"${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using target_compile_definition would be a better alternative than configuring hpp files from cmake.
However, let's merge it for now to have a reference to test against.

@JohanMabille JohanMabille merged commit 066a23e into compiler-research:main Jun 5, 2024
10 checks passed
@JohanMabille JohanMabille mentioned this pull request Jun 18, 2024
4 tasks
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.

5 participants