-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add setup script, rename prefix script into local_setup #38
Conversation
82d88d5
to
71f07d5
Compare
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 77.61% 77.78% +0.17%
==========================================
Files 48 48
Lines 2519 2543 +24
Branches 400 405 +5
==========================================
+ Hits 1955 1978 +23
Misses 550 550
- Partials 14 15 +1
Continue to review full report at Codecov.
|
71f07d5
to
28e208b
Compare
colcon_core/shell/__init__.py
Outdated
@@ -310,3 +310,40 @@ def create_environment_hook( | |||
'Could not find a primary shell extension for creating an ' | |||
'environment hook') | |||
return hooks | |||
|
|||
|
|||
_colcon_prefix_path_cache = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cache the result? Can the COLCON_PREFIX_PATH
environment variable change between calls to get_colcon_prefix_path()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to describe that in the docblock:
The result is being cached based on the passed skip parameter to avoid printing the warning on repeated invocations.
While the environment isn't supposed to change during one run of the tool the fact that the result would be invalid if the environment does change isn't really a good idea.
I refactored the logic in 6694243 to actually store which warning has already been logged and just use that global information to avoid repeating the warning. The computation happens every time and is therefore correct no matter what happens to the environment.
33b1d05
to
6694243
Compare
d828ae4
to
a9bf96d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check the batch and powershell since I didn't have a Windows boot handy, but the Linux variant checks out okay, including the overlay mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I didn't check the .sh
code. I checked that sourcing setup.bat
chained workspaces successfully using some python packages. In a fresh cmd
instance sourcing setup.bat
of the last workspace in a chain resulted in aPYTHONPATH
containing all workspaces from the highest workspace to the lowest.
8809ed5
to
934b843
Compare
Ignoring failing CI which is due to a regression in the new |
While not complete (the
.bat
scripts still need to be refactored) I would like to get a first review / feedback if that is the desired result.