Skip to content

boost 88 process.hpp broke v1 compatibility #480

Open

Description

@fsmoke

boost 88 process.hpp broke v1 compatibility, now there is no common header for v1 - we ware enforced to fix dozens of projects !!

As far as i know there is no groups support in v2 for now - why compat was broken? without any alternatives...

Activity

  1. klemens-morgenstern commented on Apr 11, 2025

    @klemens-morgenstern
    Collaborator

    I can add a process/v1.hpp header for 1.89 if that's all you need. If you #define BOOST_PROCESS_VERSION 1 the API would be the same.

    What's your use-case for process groups? I did not add them to v2 because they are too different between posix & windows.

  2. fsmoke commented on Apr 11, 2025

    @fsmoke
    Author

    I can add a process/v1.hpp header for 1.89 if that's all you need

    Yes this whould be nice

    we have some kind of shell launcher which run multiple child process - theese children run subchild processes and so on. But when we close/kill shell(or it crashes) - all subprocesses and subsubprocesses must be guaranteed closed

    in other words we use groups to automatic kill all (child)processes in group

  3. klemens-morgenstern commented on Apr 11, 2025

    @klemens-morgenstern
    Collaborator

    Are you running windows & posix or just one?

  4. fsmoke commented on Apr 12, 2025

    @fsmoke
    Author

    Yes, we have cross platform product for windows and couple of linux distros

  5. Nelson-numerical-software commented on Apr 14, 2025

    @Nelson-numerical-software

    Will v1 compatibility continue to be maintained or will we start migrating to v2?

  6. nega0 commented on Apr 17, 2025

    @nega0

    If this bit you too, and you got something like

    $ make |& grep error: |& cut -d: -f4-
     error: no type named 'child' in namespace 'boost::process'
     error: no type named 'opstream' in namespace 'boost::process'
     error: no member named 'std_in' in namespace 'boost::process'
     error: no member named 'std_out' in namespace 'boost::process'
     error: no member named 'null' in namespace 'boost::process'
     error: no member named 'std_err' in namespace 'boost::process'
     error: no member named 'start_dir' in namespace 'boost::process'
     error: no member named 'child' in namespace 'boost::process'

    You now want something like

    @@ -1,2 +1,11 @@
    +#include <boost/version.hpp>
    +#if BOOST_VERSION < 108800
     #include <boost/process.hpp>
     namespace process = boost::process;
    +#else
    +#include <boost/process/v1/child.hpp>
    +#include <boost/process/v1/io.hpp>
    +#include <boost/process/v1/pipe.hpp>
    +#include <boost/process/v1/start_dir.hpp>
    +namespace process = boost::process::v1;
    +#endif
  7. klemens-morgenstern commented on Apr 18, 2025

    @klemens-morgenstern
    Collaborator

    You can also define BOOST_PROCESS_VERSION 1 so all the v1 symbols are in boost::process and not boost::process::v1.

  8. jakobandersen commented on Apr 23, 2025

    @jakobandersen

    I was hit by the changes in 1.88 as well, in that I didn't even know v2 existed. Is there a changelog somewhere of what happened in each release? The overall Boost release notes have no entries for Process that I could find in multiple releases.

  9. Nelson-numerical-software commented on Apr 23, 2025

    @Nelson-numerical-software

    Will compatibility with version 1 continue to be maintained in future releases, or migration to version 2 is required ?

  10. klemens-morgenstern commented on Apr 28, 2025

    @klemens-morgenstern
    Collaborator

    There is documentation of the v2 IF here: https://www.boost.org/doc/libs/1_88_0/libs/process/doc/html/index.html#version_2
    The v2 was added several versions ago, I think in 1.81. I sadly have to admit that I am bad at release notes.

    I will keep the v1 sources around as is and may accept PRs. The v1 interface has major problems, so I had to introduce a breaking change at some point. I would strongly encourage migration.

  11. nigels-com commented on Apr 29, 2025

    @nigels-com

    We did a migration to "get with the program" and modernise some surrounding mess of our own making.
    It was the main blocker for moving to boost 1.88.0 and it does seem like we're safely on the other side now.
    One positive thing for us is that it aligns better with boost::asio, which we also have in the mix.

  12. toonetown commented on May 2, 2025

    @toonetown
    Contributor

    Is there some kind of migration guide to move from v1 to v2? For example, I cannot find anywhere where the v2 equivalent of boost::process::v1::spawn would be.

  13. klemens-morgenstern commented on May 2, 2025

    @klemens-morgenstern
    Collaborator

    You can find a summary here: https://www.boost.io/doc/libs/latest/doc/html/process.html#version_2

    spawn(...) would be process(...).detach().

  14. added a commit that references this issue on May 6, 2025
  15. 24 remaining items

  16. jwakely commented on Jan 14, 2026

    @jwakely

    There is documentation of the v2 IF here: https://www.boost.org/doc/libs/1_88_0/libs/process/doc/html/index.html#version_2 The v2 was added several versions ago, I think in 1.81. I sadly have to admit that I am bad at release notes.

    Please update the docs to say which version of Boost introduced v2, and which version made it the default. Especially since you've removed the docs for v1, so users need to go and look at the docs in old releases, but they don't know which old releases because the docs don't say anything about when the changes happened.

    You can find a summary here: https://www.boost.io/doc/libs/latest/doc/html/process.html#version_2

    It doesn't mention that there is no search_path in v2.

  17. jwakely commented on Jan 14, 2026

    @jwakely

    It doesn't mention that there is no search_path in v2.

    Edit: looks like the replacement is environment::find_executable? Maybe mention at https://www.boost.org/doc/libs/latest/libs/process/doc/html/index.html#environment that it replaces v1::search_path, for people trying to find info on how to migrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions