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

Kdb rewrite cpp spec #4949

Merged
merged 3 commits into from
May 31, 2023
Merged

Kdb rewrite cpp spec #4949

merged 3 commits into from
May 31, 2023

Conversation

hannes99
Copy link
Contributor

@hannes99 hannes99 commented May 27, 2023

Basics

Adds spec for cpp commands, so help/error messages are now generated by opts for both C and C++ commands. Nothing else really happens in this PR, except that cmerge -> merge.

  • Short descriptions of your changes are in the release notes
    (added as entry in doc/news/_preparation_next_release.md which contains _(my name)_)
    Please always add them to the release notes.
  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildservers are happy. If not, fix in this order:
    • add a line in doc/news/_preparation_next_release.md
    • reformat the code with scripts/dev/reformat-all
    • make all unit tests pass
    • fix all memleaks
    • fix the CI itself (or rebase if already fixed)
  • The PR is rebased with current master.

Checklist

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation (see Documentation Guidelines)
  • I fixed all affected decisions (see Decision Process)
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in reuse syntax

Review

Labels

  • Add the "work in progress" label if you do not want the PR to be reviewed yet.
  • Add the "ready to merge" label if everything is done and no further pushes are planned by you.

@hannes99 hannes99 requested a review from kodebach May 27, 2023 14:27
@hannes99 hannes99 force-pushed the kdb_rewrite_cpp_spec branch 6 times, most recently from e5fdf64 to 606508b Compare May 27, 2023 15:39
@hannes99 hannes99 mentioned this pull request May 27, 2023
19 tasks
@hannes99 hannes99 force-pushed the kdb_rewrite_cpp_spec branch 2 times, most recently from 4138cfa to 1aae751 Compare May 27, 2023 18:25
Copy link
Member

@kodebach kodebach left a comment

Choose a reason for hiding this comment

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

Very nice. A clean simple solution for including the C++ code.

For the docs: We know prefer one sentence per line for new/updated docs (see here). I know many old docs are not written like this, so it can be easy to ignore this and follow the existing style in a file. But the new style really makes diffs easier to read, especially for small changes.

Otherwise, mostly questions and small suggestions. Nothing that really needs to change for a merge IMO.

One small but really nice addition would also be, if you added a KDB_WITHOUT_CPP CMake variable. Which would exclude all C++ files from kdb together with something like this in the main.c:

#ifdef KDB_WITHOUT_CPP
cppCommand cppSubcommands[] = {};
#else
cppCommand cppSubcommands[] = {
   // ... actual commands ...
};
#endif

Alternatively, KDB_WITHOUT_CPP could include a dummy .c which defines cpp_main as a function that just prints "C++ not included". Then it would actually be possible to build kdb without C++ (I think).

doc/help/kdb-merge.md Outdated Show resolved Hide resolved
doc/help/kdb-merge.md Outdated Show resolved Hide resolved
doc/help/kdb-merge.md Outdated Show resolved Hide resolved
doc/help/kdb-merge.md Outdated Show resolved Hide resolved
doc/help/kdb-merge.md Outdated Show resolved Hide resolved
tests/shell/include_common.sh.in Show resolved Hide resolved
src/tools/kdb/main.c Show resolved Hide resolved
src/tools/kdb/main.c Outdated Show resolved Hide resolved
src/tools/kdb/main.c Outdated Show resolved Hide resolved
src/tools/kdb/mount.c Outdated Show resolved Hide resolved
@hannes99
Copy link
Contributor Author

Thanks for the feedback!

@hannes99
Copy link
Contributor Author

jenkins build libelektra please

1 similar comment
@hannes99
Copy link
Contributor Author

jenkins build libelektra please

Copy link
Member

@kodebach kodebach left a comment

Choose a reason for hiding this comment

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

LGTM now

@hannes99 hannes99 merged commit 2755648 into kdb_rewrite_base May 31, 2023
3 of 12 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.

None yet

2 participants