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

Initial merge with xeus-clang-repl - Capture outputs #59

Merged

Conversation

alexander-penev
Copy link
Collaborator

No description provided.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

Copy link
Contributor

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

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

src/xinterpreter.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

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.

Not sure to understand why an additional capture is required around Cpp::process. Isn't the initial cpature of std::cout and std::cerr enough?

src/xinterpreter.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

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

src/xinterpreter.cpp Show resolved Hide resolved
src/xinterpreter.cpp Outdated Show resolved Hide resolved
src/xinterpreter.cpp Outdated Show resolved Hide resolved
src/xinterpreter.cpp Outdated Show resolved Hide resolved
src/xinterpreter.cpp Outdated Show resolved Hide resolved
~StreamRedirectRAII() {
std::string out = Cpp::EndStdStreamCapture();
*err = Cpp::EndStdStreamCapture();
std::cout << out;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably print out where err is printed...

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's address that in a separate PR.

alexander-penev and others added 4 commits April 16, 2024 20:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
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

src/xinterpreter.cpp Outdated Show resolved Hide resolved
@anutosh491
Copy link
Collaborator

Hey @alexander-penev could you maybe squash the commits into a couple meaningful ones. Would make it easier for reviewing !

@vgvassilev
Copy link
Contributor

Hey @alexander-penev could you maybe squash the commits into a couple meaningful ones. Would make it easier for reviewing !

Often squashing loses the previous comments. Maybe we can squash on merge. If you click on the “files changed” tab you will see everything squashed.

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.

LGTM, but I still don't understand why this is needed.

  • Are kStdErr and kStdOut different beasts from std::cerr and std::cout ? => this is for capturing fprintf, thanks @vgvassilev for the offline explanation
  • Also, why capturing / restoring them on each execute request instead of doing it upon creation / destruction of the interpreter?

@JohanMabille JohanMabille merged commit 06218f5 into compiler-research:main Apr 19, 2024
7 checks passed
@alexander-penev alexander-penev deleted the MergeXeusClangReplMini branch April 19, 2024 10:15
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.

4 participants