ros2 / ros2/launch

Change `env` and `additional_env` type in `ExecuteProcess`

Open
#260 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
155
Forks
182
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Feature request

Feature description

The expected type of both parameters is now:

Optional[Dict[SomeSubstitutionsType, SomeSubstitutionsType]]

But SomeSubstitutionsType is not always hashable.
I would recommend changing it too:

Optional[Iterable[Tuple[SomeSubstitutionType, SomeSubstitutionsType]]]

For backwards compatibility, maybe a better idea is to accept both:

Optional[Union[
    Iterable[Tuple[SomeSubstitutionType, SomeSubstitutionsType]],
    Dict[Union[Substitution, Text], SomeSubstitutionsType],
]]

See https://github.com/ros2/launch/pull/226#discussion_r291359167.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ExecuteProcess entry point and its env and additional_env parameters, then read the linked pull request discussion for the compatibility context. Done means the parameters accept non-hashable substitution values through iterable key-value pairs while preserving the requested backwards-compatible dictionary form.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.