microsoft / microsoft/SPTAG

Please include support for boost 1.70

Open
#133 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
5k
Forks
622
Avg merge
8h 37m
Merged PRs (30d)
5

Description

Issue

In boost 1.7 the use of the io_context and the strand has been changed. This causes a breaking change in the Socket/Connection.cpp compilation in the constructor for the variable m_strand and m_heartbeatTimer. The call to p_socket.get_executor().context() fails and is no longer supported.

Below are some links to similar posts about this in other places:
boost asio issues
rstudio issues
boost docs
boost beast issues

Changes to get it building

  • I cloned the repo, removed the m_strand from the Connection.h/cpp file.
  • I replaced line 62 boost::asio::ip::tcp::socket socket(m_ioContext); in client.cpp with boost::asio::ip::tcp::socket socket(boost::asio::make_strand( m_ioContext ));
  • I changed the m_heatbeatTimer construction in the connection.cpp file to be this instead m_heartbeatTimer(p_socket.get_executor())

I am unsure if these changes are proper, but it was enough to get it building and for my use I will not need this class. I see there are other topics about this, but this seems like a simple fix if what I did is still semantically/functionally correct (my knowledge of boost is very low).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Socket/Connection.h and Socket/Connection.cpp, then inspect the socket construction in client.cpp and the Boost Asio 1.70 history linked in the issue. Check whether the proposed executor, strand, and heartbeat timer changes preserve the existing behavior, and verify that the project builds successfully with Boost 1.70.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.