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

link.cpp within AMQP has a compile error when the BUILD_TESTING is on. #5495

Open
ahsonkhan opened this issue Apr 5, 2024 · 3 comments
Open
Assignees
Labels
AMQP Issues related to the AMQP protocol Support in Azure Core

Comments

@ahsonkhan
Copy link
Member

#5419 (comment)

[ 19%] Building CXX object sdk/attestation/azure-security-attestation/CMakeFiles/azure-security-attestation.dir/src/attestation_client_options.cpp.o
/mnt/vss/_work/1/s/sdk/core/azure-core-amqp/src/amqp/link.cpp: In static member function ‘static void Azure::Core::Amqp::_detail::LinkImpl::OnLinkFlowOnFn(void*)’:
/mnt/vss/_work/1/s/sdk/core/azure-core-amqp/src/amqp/link.cpp:470:42: error: cannot convert ‘Azure::Core::Amqp::_detail::Link’ to ‘const std::shared_ptr<Azure::Core::Amqp::_detail::LinkImpl>&’
  470 |       link->m_eventHandler->OnLinkFlowOn(Link{link->shared_from_this()});
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |
      |                                          Azure::Core::Amqp::_detail::Link
In file included from /mnt/vss/_work/1/s/sdk/core/azure-core-amqp/src/amqp/link.cpp:12:
/mnt/vss/_work/1/s/sdk/core/azure-core-amqp/src/amqp/private/link_impl.hpp:35:64: note:   initializing argument 1 of ‘virtual void Azure::Core::Amqp::_detail::LinkImplEvents::OnLinkFlowOn(const std::shared_ptr<Azure::Core::Amqp::_detail::LinkImpl>&)’
   35 |     virtual void OnLinkFlowOn(std::shared_ptr<LinkImpl> const& link) = 0;
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
@ahsonkhan ahsonkhan added the AMQP Issues related to the AMQP protocol Support in Azure Core label Apr 5, 2024
@ahsonkhan ahsonkhan changed the title link.cpp within AMQP has a compile error when the BUILD_TESTING is off. link.cpp within AMQP has a compile error when the BUILD_TESTING is on. Apr 5, 2024
@ahsonkhan ahsonkhan added the blocking-release Blocks release label Apr 5, 2024
@LarryOsterman
Copy link
Member

What action should be taken w.r.t. this bug?

My analysis of the compiler error you reference above shows that the code as checked in is correct., the problem was an incorrect attempt at renaming the TESTING_BUILD macro.

@ahsonkhan
Copy link
Member Author

@LarryOsterman the line of code within the ifdef with BUILD_TESTING doesn't compile (line 470 below). If it's dead code, it should be removed. It currently being unreachable doesn't mean the checked in code is correct.

That is a CMake flag and not one we use in source directly. The code in question isn't using TESTING_BUILD.

#if defined(BUILD_TESTING)
link->m_eventHandler->OnLinkFlowOn(Link{link->shared_from_this()});
#else
link->m_eventHandler->OnLinkFlowOn(link->shared_from_this());
#endif

@ahsonkhan
Copy link
Member Author

Re-opening, but not marking as release blocking, since it looks like the code that doesn't compile is unreachable.

@ahsonkhan ahsonkhan reopened this Apr 6, 2024
@ahsonkhan ahsonkhan removed the blocking-release Blocks release label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMQP Issues related to the AMQP protocol Support in Azure Core
Projects
None yet
Development

No branches or pull requests

2 participants