Skip to content

Conversation

drewdzzz
Copy link
Collaborator

@drewdzzz drewdzzz commented Apr 1, 2025

See commits for details.
The PR fixes CI along the way.

Closes #106

@drewdzzz drewdzzz force-pushed the client_decode_tags branch from 7163e57 to b1022fb Compare April 1, 2025 14:06
@drewdzzz
Copy link
Collaborator Author

drewdzzz commented Apr 1, 2025

Ignoring clang-format suggestion:

diff --git a/src/Client/ResponseReader.hpp b/src/Client/ResponseReader.hpp
index 3cac8dc..1d5c82a 100644
--- a/src/Client/ResponseReader.hpp
+++ b/src/Client/ResponseReader.hpp
@@ -101,8 +101,7 @@ struct Data {
 	std::pair<it_t, it_t> iters;
 
 	/** Unpacks tuples to passed container. */
-	template<class T>
-	bool decode(T&& tuples)
+	template <class T> bool decode(T &&tuples)
 	{
 		it_t itr = iters.first;
 		bool ok = mpp::decode(itr, std::forward<T>(tuples));

drewdzzz added 2 commits April 1, 2025 17:11
GitHub Actions has deprecated `ubuntu-20.04`, its jobs are getting
canceled often and it is going to be completely removed in a few weeks,
so let's replace it with the newer `ubuntu-24.04` version.
Lately, CMake 4.0 was released, and some GitHub Actions runners started
to use it. CMake 4.0 does not support versions older than 3.5 anymore,
and we fetch MsgPuck library for the tests that requires 2.8 minimum
version.

Let's override minimum required version with CMake option in order to
generate build files of MsgPuck successfully.
@drewdzzz drewdzzz force-pushed the client_decode_tags branch 10 times, most recently from 978acac to f27d653 Compare April 2, 2025 07:39
drewdzzz added 3 commits April 2, 2025 10:59
The new warning forbids to move an objects to itself - in our case, it's
the purpose of the case, so let's ignore the warning there. The problem
failed build on `ubuntu-24.04` GitHub Actions runner.
Some compilers produce a warning when variable-length arrays are used,
so using them in buffer test failed CI on `ubuntu-24.04` GitHub Actions
runner. We don't use VLAs across the connector, so let's simply get rid
of them in the buffer test - mark variables used for their sizes as
`constexpr`.
Our MsgPack decoder allows to pass rvalue reference - it is needed to
use tags like `mpp::as_raw` or handy `std::forward_as_tuple` helper.
However, we accept only lvalues in the data decoder, hence, client
cannot use those features of MsgPack decoder. Let's accept universal
reference instead to accept both lvalues and rvalues in client data
decoder - do not forget to use `std::forward` for perfect passing.

Closes tarantool#106
@drewdzzz drewdzzz force-pushed the client_decode_tags branch from f27d653 to b50f17a Compare April 2, 2025 08:00
@drewdzzz drewdzzz marked this pull request as ready for review April 2, 2025 09:25
Copy link
Member

@CuriousGeorgiy CuriousGeorgiy 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 please address my questions.

@CuriousGeorgiy
Copy link
Member

CuriousGeorgiy commented Apr 6, 2025

@drewdzzz I don't like that we keep ignoring linter suggestions. Let's try to figure out how to make it useful.

I guess we need to:

  1. Tweak the linter options.
  2. Reformat the whole codebase in 1 commit.

I would do 1 for a while (e.g., in this case, we need to tweak the BreakAfterReturnType option), and then once we more or less converge, we could do 2.

@drewdzzz
Copy link
Collaborator Author

drewdzzz commented Apr 7, 2025

I don't like that we keep ignoring linter suggestions.

Yep, there is even issue #92 dedicated to our annoying linter.
Actually, it's useful sometimes, and it doesn't fail master workflows, so it's not critical to just ignore it for now.
But yep, we should definitely should do something about it. I'll try to tweak some options when I'll have time for it.

Are you OK with merging this PR without fixing linter?

@drewdzzz drewdzzz assigned CuriousGeorgiy and unassigned drewdzzz Apr 7, 2025
@drewdzzz drewdzzz merged commit 9d9642c into tarantool:master Apr 7, 2025
42 of 43 checks passed
@drewdzzz drewdzzz deleted the client_decode_tags branch April 7, 2025 12:46
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.

Support family tags in response reader

3 participants