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

Add initial implementation of std::dump #1

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Add initial implementation of std::dump #1

wants to merge 17 commits into from

Conversation

foonathan
Copy link
Collaborator

No description provided.

.github/workflows/ci_tests.yml Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
namespace beman::dump {
namespace detail {
template <std::size_t N>
constexpr auto format_string = []{
Copy link

Choose a reason for hiding this comment

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

A documentation comment for this variable template would be nice.

Copy link
Member

Choose a reason for hiding this comment

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

Temporary TODO comment added

src/beman/dump/dump.cpp Outdated Show resolved Hide resolved
target_link_libraries(beman.dump.tests
PRIVATE beman::dump GTest::gtest GTest::gtest_main)

gtest_add_tests(beman.dump.tests "" AUTO)
Copy link

Choose a reason for hiding this comment

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

I think we need some kind of test that verifies that the dump() call is implemented correctly. One way this could be done is to:

  1. Write a short CMake script that runs a program that calls dump(), pipes it to a file, and verifies its output
  2. Register the CMake execution as a test using add_test

Copy link
Member

Choose a reason for hiding this comment

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

Defered to #2

Copy link
Member

Choose a reason for hiding this comment

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

It is almost trivial to redirect std::cout though, I don't see the need to write to a file, but we can discuss this later.

src/beman/dump/dump.t.cpp Outdated Show resolved Hide resolved
Full runable examples can be found in `examples/` (e.g., [./examples/identity_as_default_projection.cpp.cpp](./examples/identity_as_default_projection.cpp.cpp)).

## Building beman.example
## Building beman.dump
Copy link

Choose a reason for hiding this comment

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

There should be a ## Usage section demonstrating dump() calls.

Copy link
Member

Choose a reason for hiding this comment

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

Added TODO

.github/workflows/ci_tests.yml Show resolved Hide resolved
examples/CMakeLists.txt Show resolved Hide resolved
examples/basic.cpp Outdated Show resolved Hide resolved
@wusatosi
Copy link
Member

I was given green light to take over this PR by email.

I will try to clear up this PR and get it merged this week.

Thanks for your contribution @foonathan !

wusatosi and others added 10 commits November 12, 2024 13:38
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
@wusatosi wusatosi mentioned this pull request Nov 12, 2024
@wusatosi
Copy link
Member

To prioritize merging first, I have resolved all trivial suggestions.

Summary of TODOs:

@wusatosi
Copy link
Member

Would suggest prioritizing merging this PR to all reviewers.

@foonathan
Copy link
Collaborator Author

FYI, the underlying proposal was rejected; cplusplus/papers#2034 (comment)

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.

6 participants