Skip to content

Commit

Permalink
4 spaces instead of tabs (#90)
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
  • Loading branch information
sloretz committed Jun 1, 2022
1 parent daa47d8 commit 49029c6
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 123 deletions.
34 changes: 17 additions & 17 deletions user/isolated-vs-merged-workspaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ Build the workspace from :doc:`what-is-a-workspace` without any extra arguments.

.. code-block:: bash
colcon build
colcon build
Now let's look in the ``install`` folder.

::

install
├── COLCON_IGNORE
├── foo
├── lib/...
└── share/...
├── local_setup.[bash|bat|ps1|sh|zsh|...]
├── _local_setup_util_[sh|ps1|...].py
└── setup.[bash|bat|ps1|sh|zsh|...]
install
├── COLCON_IGNORE
├── foo
├── lib/...
└── share/...
├── local_setup.[bash|bat|ps1|sh|zsh|...]
├── _local_setup_util_[sh|ps1|...].py
└── setup.[bash|bat|ps1|sh|zsh|...]

Colcon created a directory ``install/foo`` and installed the package ``foo`` inside of it.
Building an isolated workspace just means every software package is installed into its own directory.
Expand All @@ -48,20 +48,20 @@ Delete the ``install`` directory and build the workspace again with the ``--merg

.. code-block:: bash
colcon build --merge-install
colcon build --merge-install
Let's look in the ``install`` folder again.

::

install
├── COLCON_IGNORE
├── lib/..
├── share/..
├── local_setup.[bash|bat|ps1|sh|zsh|...]
├── _local_setup_util_[sh|ps1|...].py
└── setup.[bash|bat|ps1|sh|zsh|...]
install
├── COLCON_IGNORE
├── lib/..
├── share/..
├── local_setup.[bash|bat|ps1|sh|zsh|...]
├── _local_setup_util_[sh|ps1|...].py
└── setup.[bash|bat|ps1|sh|zsh|...]


Notice how there's no longer a ``foo`` folder.
Expand Down
30 changes: 15 additions & 15 deletions user/using-multiple-workspaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Workspaces are **independent** if neither workspace has a package that depends o

.. code-block:: bash
source foo_ws/install/setup.bash
source bar_ws/install/setup.bash
source foo_ws/install/setup.bash
source bar_ws/install/setup.bash
The first workspace ``foo_ws`` is called the **underlay workspace**.
Expand All @@ -24,9 +24,9 @@ Independent workspaces can usually be sourced in any order.

.. note::

Be cautious when sourcing multiple workspaces.
Undefined behavior can result if packages from one depend on packages from another, meaning they're not actually independent.
Chain the workspaces instead if you're unsure.
Be cautious when sourcing multiple workspaces.
Undefined behavior can result if packages from one depend on packages from another, meaning they're not actually independent.
Chain the workspaces instead if you're unsure.


Chaining workspaces
Expand All @@ -38,13 +38,13 @@ Source the underlay in an new terminal and build the overlay.

.. code-block:: bash
# Build ping_ws
cd ping_ws
colcon build
# In a new terminal source ping_ws and build pong_ws
source ping_ws/install/setup.bash
cd pong_ws
colcon build
# Build ping_ws
cd ping_ws
colcon build
# In a new terminal source ping_ws and build pong_ws
source ping_ws/install/setup.bash
cd pong_ws
colcon build
In this example ``pong_ws`` overlays ``ping_ws``.
``pong_ws`` may have a package that depends on packages in ``ping_ws``, but ``ping_ws`` cannot have a package that depends on packages in ``pong_ws``.
Expand All @@ -53,12 +53,12 @@ Only the last workspace in a chain needs to be sourced.

.. code-block:: bash
# Sourcing pong_ws automatically sources ping_ws first
source pong_ws/install/setup.bash
# Sourcing pong_ws automatically sources ping_ws first
source pong_ws/install/setup.bash
.. note::

Use ``local_setup.[sh|bash|bat|...]`` if you want to source a workspace without automatically sourcing the underlays it depends on, such as when you've already sourced the underlay.
Use ``local_setup.[sh|bash|bat|...]`` if you want to source a workspace without automatically sourcing the underlays it depends on, such as when you've already sourced the underlay.

You can chain any number of workspaces together by repeating these step with more overlay workspace.

Expand Down

0 comments on commit 49029c6

Please sign in to comment.