arximboldi / lager

C++ library for value-oriented design using the unidirectional data-flow architecture — Redux for C++
https://sinusoid.es/lager/
MIT License
703 stars 66 forks source link

Compiling with time travel debugger fails with type conversion issues on Windows #170

Open CamiloOY opened 1 year ago

CamiloOY commented 1 year ago

Compiling a simple counter (https://pastebin.com/RqnbmYux) with the time travel debugger causes several type conversion errors.

'<function-style-cast>': cannot convert from 'initializer list' to 'boost::hana::detail::set_insert_if_contains<deps<Ds...>::required_key_set>' 
call to object of class type 'boost::hana::detail::variadic::foldl1_t': no matching call operator found 
'&' requires l-value    
binary '==': no operator found which takes a left-hand operand of type 'void' (or there is no acceptable conversion)    
call to object of class type 'boost::hana::intersection_t': no matching call operator found 
'<function-style-cast>': cannot convert from 'initializer list' to 'deps_t' 
call to object of class type 'lager::make_store::<lambda_1>': no matching call operator found   
'store': cannot be used before it is initialized    
'lager::detail::http_debug_server_impl<debugger_t>::init': function does not take 1 arguments   

The full output log is available here: https://pastebin.com/Svae9niP

This is when building with C++20 using MSVC 2022. Compilation also fails on C++17 with the same errors.

I've also tried using the branch from #166 but that still fails to compile.

arximboldi commented 1 year ago

I have never tried building on Windows directly myself. @timpatt, @kevin--, @carsten-grimm-at-ipolog, @Siapran and @jarzec all have been working on Windows to some degree. Not sure if any of you have some clue as to whether the time travel debugger is meant to work on Windows at all?

CamiloOY commented 1 year ago

To provide some context: I found this bug because I was messing about with store enhancers trying to add middleware to Lager. My initial attempts kept failing with template errors, so I tried using the code for the debugger as a template but that still failed. At that point I suspected that there might be issues with store enhancers on Windows so tried just using the debugger enhancer without any extra code to see what would happen and that also failed.