Skip to content
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

Alternative implementation #2

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Alternative implementation #2

wants to merge 5 commits into from

Conversation

rhaschke
Copy link

@rhaschke rhaschke commented Nov 19, 2023

Implement the desired behavior by intercepting add_argument() and installing additional type resolvers for folder arguments to be resolved w.r.t. the workspace root.
Realizes colcon/colcon-core#595 (comment)
Fixes #1 (comment)

The --log-base argument is handled differently than other base-folder arguments.
Its default value is None, meaning that the environment variable COLCON_LOG_PATH
or the default path is used if the command-line argument is missing.
As we cannot easily change the default path (which is hardcoded in colcon-core),
we override the environment variable instead.
When running from a symlinked subfolder, os.getcwd() and Path.cwd()
return the real path with all all symlinks resolved.
This resulted in the workspace root to be found w.r.t. the real path
instead the actual logical one.
@Timple
Copy link

Timple commented Dec 21, 2023

Awesome, thank you for implementing symlink resolving. We use those as well 🙂

@rhaschke
Copy link
Author

Ping @cottsay for a review of this.

@andrejpan
Copy link

How exactly could I use this? I glanced at Colcon docs. However, I did find out how I could install the extension manually.

@agyoungs
Copy link

agyoungs commented Aug 8, 2024

This looks to be pretty useful. Is there any movement on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants