Closed fmauch closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 53.42%. Comparing base (
077fd4d
) to head (5d76444
). Report is 9 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The current PR will cause the workspaces to become active at the same time:
Thank you @Oberacda! With the changes you provided, I think this is good to get merged.
Edit: Thinking about this a bit more:
This way, one could not alter the environment without robot_folders e.g. by manually sourcing a virtualenv or setting an installation path by hand. e.g.
### opening a new shell, current env is being cached away ###
ubuntu@jammy:~$ echo $PATH
/home/ubuntu/.node/bin:/home/ubuntu/.local/bin:/home/ubuntu/.node/bin:/home/ubuntu/.local/bin:/home/ubuntu/.local/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/ubuntu/.fzf/bin
ubuntu@jammy:~$ source .local/pipx/venvs/sphinx-autobuild/bin/activate
(sphinx-autobuild) ubuntu@jammy:~$ echo $PATH
/home/ubuntu/.local/pipx/venvs/sphinx-autobuild/bin:/home/ubuntu/.node/bin:/home/ubuntu/.local/bin:/home/ubuntu/.node/bin:/home/ubuntu/.local/bin:/home/ubuntu/.local/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/ubuntu/.fzf/bin
(sphinx-autobuild) ubuntu@jammy:~$ fzirob change_environment test_env
rob_folders change_environment test_env
Sourcing environment '/home/ubuntu/checkout/test_env'
Sourcing /opt/ros/rolling/setup.bash
Sourced colcon workspace /home/ubuntu/checkout/test_env/colcon_ws
Sourced misc_ws workspace from /home/ubuntu/checkout/test_env/misc_ws
Environment setup for 'test_env' done. You now have a sourced environment.
(test_env) ubuntu@jammy:~$ echo $PATH
/home/ubuntu/checkout/test_env/misc_ws/export/bin:/opt/ros/rolling/bin:/home/ubuntu/.local/bin:/home/ubuntu/.node/bin:/home/ubuntu/.local/bin:/home/ubuntu/.local/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/ubuntu/.fzf/bin
I think when souring the virtual env after robot folders, or within the setup_local.sh file, one can still alter the env.
Though it is not recommended to chain workspaces it might be desirable to source a workspace that us not the currently sourced one. With the changes introduced in version 0.5.0 this possibility was removed. This commit re-adds that functionality. The .cur_env file is always read independent of whether the ROB_FOLDERS_ACTIVE_ENV variable is set or not.