cortex: support for newer boost#1460
Conversation
a399f80 to
80d3f40
Compare
johnhaddon
left a comment
There was a problem hiding this comment.
Thanks - this is a big improvement over the last PR. If I'm not mistaken, we can go even simpler though - see comments inline.
|
|
||
| tcp::resolver resolver(m_data->m_service); | ||
| tcp::resolver::query query(m_data->m_host, m_data->m_port); | ||
|
|
||
| boost::system::error_code error; | ||
| tcp::resolver::iterator iterator = resolver.resolve( query, error ); | ||
| if( !error ) | ||
| { | ||
| tcp::resolver resolver(m_data->m_service); | ||
| boost::system::error_code error; | ||
| auto endpoints = resolver.resolve(m_data->m_host, m_data->m_port, error); | ||
| if (!error) | ||
| { | ||
| error = boost::asio::error::host_not_found; | ||
| while( error && iterator != tcp::resolver::iterator() ) | ||
| { | ||
| m_data->m_socket.close(); | ||
| m_data->m_socket.connect( *iterator++, error ); | ||
| } | ||
| } | ||
| if( error ) | ||
| { | ||
| throw Exception( std::string( "Could not connect to remote display driver server : " ) + error.message() ); | ||
| for (auto it = endpoints.begin(); it != endpoints.end() && error; ++it) | ||
| { | ||
| m_data->m_socket.close(); | ||
| m_data->m_socket.connect(*it, error); | ||
| } | ||
|
|
||
| if (error) | ||
| { | ||
| throw Exception( std::string( "Could not connect to remote display driver server : " ) + error.message() ); | ||
| } | ||
| } |
There was a problem hiding this comment.
I assume the changes here are responsible for this test failure :
FAIL: testWrongHostException (ImageDisplayDriverTest.ClientServerDisplayDriverTest)
----------------------------------------------------------------------
RuntimeError: write: Bad file descriptor [system:9]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/__w/cortex/cortex/test/IECoreImage/ImageDisplayDriverTest.py", line 234, in testWrongHostException
with self.assertRaisesRegex( Exception, exceptionError ) :
AssertionError: "Could not connect to remote display driver server : Host not found" does not match "write: Bad file descriptor [system:9]"
I'm having difficulty understanding why there are changes here, especially because the diff is obfuscated by unnecessary formatting changes (if( !error ) vs if (!errror) for example). Is there an even more minimal set of changes that can be made?
There was a problem hiding this comment.
That failure was from 80d3f40 (your earlier commit). I've just started CI for your latest to see if that helps. But I'd still like to see a more minimal diff without formatting changes.
There was a problem hiding this comment.
The problem is on line 104: IECore.Exception: Could not resolve host: Host not found (authoritative)
There was a problem hiding this comment.
@johnhaddon it is changes ok ?
The CI is still failing with the test failure I highlighted above, and we can't merge while it is failing. As mentioned above, I don't know why the code had to change so much in ClientDisplayDriver.cpp. I would like to see the absolute minimum code change necessary there, without the unnecessary formatting changes, and to understand why each change is required.
I'd be happy to merge the filesystem fixes in the meantime if that would help.
|
@johnhaddon it is changes ok ? |
|
Just to note Maya 2026: Is using Boost 1.85 from what I saw in the devkit. Aligning with https://vfxplatform.com/ CY2025. |
|
I close this PR and i will wait to move to oneapi |
Generally describe what this PR will do, and why it is needed.
Changes old boost convenience to boost:::filesystem::path
Related Issues
Dependencies
Breaking Changes
Checklist