Is your feature request related to a problem? Please describe.
The tool exits almost always if it hits an exceptional state by calling std::abort. This happens via calls to value_or_exit and alike. There are a few issues with exiting the program: Most importantly, no stack unwinding is done. This will lead to problems, especially in the context of multithreading. Therefore, we can almost never use multithreading and parallel algorithms to make vcpkg faster.
Proposed solution
- Replace all calls to
value_or_exit and alike that are outside a command's perform_and_exit either with throwing an exception, vcpkg::Optional, or ExpectedS/ ExpectedT.
- Express in the function name that a function may exit on failure.
Describe alternatives you've considered
Don't use multithreading/ parallel algorithms at all. Especially parallel algorithms can lead to massive performance improvements. This way, vcpkg would be a lot slower than it could be.
Additional context
microsoft/vcpkg-tool#694 (comment)
CC: @ras0219-msft
Is your feature request related to a problem? Please describe.
The tool exits almost always if it hits an exceptional state by calling
std::abort. This happens via calls tovalue_or_exitand alike. There are a few issues with exiting the program: Most importantly, no stack unwinding is done. This will lead to problems, especially in the context of multithreading. Therefore, we can almost never use multithreading and parallel algorithms to make vcpkg faster.Proposed solution
value_or_exitand alike that are outside a command'sperform_and_exiteither with throwing an exception,vcpkg::Optional, orExpectedS/ExpectedT.Describe alternatives you've considered
Don't use multithreading/ parallel algorithms at all. Especially parallel algorithms can lead to massive performance improvements. This way, vcpkg would be a lot slower than it could be.
Additional context
microsoft/vcpkg-tool#694 (comment)
CC: @ras0219-msft