Skip to content
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

Make -DUSE_REPL=On default #360

Merged
merged 12 commits into from
Dec 17, 2024
Merged

Conversation

faze-geek
Copy link
Contributor

@faze-geek faze-geek commented Dec 2, 2024

Fixes #255

@faze-geek faze-geek marked this pull request as draft December 2, 2024 10:57
@faze-geek faze-geek marked this pull request as ready for review December 2, 2024 10:57
@faze-geek
Copy link
Contributor Author

Will test this locally soon.

@@ -43,7 +43,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
endif()

option(USE_CLING "Use Cling as backend" OFF)
option(USE_REPL "Use clang-repl as backend" OFF)
option(USE_REPL "Use clang-repl as backend" ON)
Copy link
Collaborator

Choose a reason for hiding this comment

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

As the block below points out the following

  if (USE_CLING AND USE_REPL)
    message(FATAL_ERROR "We can only use Cling (USE_CLING=On) or Repl (USE_REPL=On), but not both of them.")
  endif()

What can be done if we are using REPL as default .... is to make cling and REPL mutually exclusive. Which means we only use 1 of these by default.

  1. REPL by default , cling off by default
  2. And if cling is made on .... you can set(USE_CLING ON) and unset(USE_REPL) or anything related in cmake.

So that if we encounter something like (the case you've not addressed yet)

-DUSE_CLING=ON \
-DUSE_REPL=OFF \

We can just use USE_CLING and we don't need to explicitly set REPL to off.

Copy link
Collaborator

@anutosh491 anutosh491 Dec 2, 2024

Choose a reason for hiding this comment

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

So we just end up with either the default case (which is supplying nothing, understood that repl is on and cling is off) or we just use cling=ON (understood repl would be off)

And if both if on by some chance we have the fatal error message.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

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

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.62%. Comparing base (e8b84c1) to head (cb6a3a0).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #360   +/-   ##
=======================================
  Coverage   70.62%   70.62%           
=======================================
  Files           9        9           
  Lines        3500     3500           
=======================================
  Hits         2472     2472           
  Misses       1028     1028           
Files with missing lines Coverage Δ
lib/Interpreter/Compatibility.h 88.28% <ø> (ø)
Files with missing lines Coverage Δ
lib/Interpreter/Compatibility.h 88.28% <ø> (ø)

Copy link
Contributor

github-actions bot commented Dec 9, 2024

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

@mcbarton
Copy link
Collaborator

mcbarton commented Dec 9, 2024

@faze-geek Once you get this working you will also need to update the documentation to match this change. This includes both within the docs folder as well as the README.md .

@faze-geek
Copy link
Contributor Author

@faze-geek Once you get this working you will also need to update the documentation to match this change. This includes both within the docs folder as well as the README.md .

I have tested the pull request locally now. Once you guys are satisfied with the changes, I'll make the documentation change quick.

Copy link
Contributor

@github-actions github-actions bot left a comment

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

Copy link
Contributor

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

@@ -1580,7 +1578,6 @@ jobs:
else
emcmake cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DUSE_CLING=OFF \
-DUSE_REPL=ON \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest he goes through all workflows in the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for letting me know.

@@ -1191,7 +1191,6 @@ jobs:
else
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DUSE_CLING=OFF \
Copy link
Collaborator

Choose a reason for hiding this comment

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

@faze-geek If use_repl has been made the default then we should be able to remove all the uses of use_cling=off, since it should be off by default.

@mcbarton
Copy link
Collaborator

@faze-geek I just tried to rebase your PR, but it says it cannot be due to conflicts. Can you fix these conflicts and then rebase?

Copy link
Contributor

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!

@vgvassilev vgvassilev merged commit c71069f into compiler-research:main Dec 17, 2024
47 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.

Make -DUSE_REPL=On default and remove the defines of USE_REPL.
4 participants