Skip to content

Don't use a context manager for _create_symlink_dir#178

Open
agriyakhetarpal wants to merge 2 commits intomainfrom
fix/drop-symlink-dir-contextmanager
Open

Don't use a context manager for _create_symlink_dir#178
agriyakhetarpal wants to merge 2 commits intomainfrom
fix/drop-symlink-dir-contextmanager

Conversation

@agriyakhetarpal
Copy link
Copy Markdown
Member

@agriyakhetarpal agriyakhetarpal commented Apr 5, 2025

Potentially closes #176. Follow-up of #152.

cc: @ryanking13

@agriyakhetarpal agriyakhetarpal added the do not merge This awaits a decision before it can be merged label Apr 5, 2025
if build_dir is None:
# If no build directory is provided, create a temporary directory

# NOTE: This is not ideal and should not be merged as-is. We need
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything that wrong with this? Temporary directories get removed on reboot anyways. Also wouldn't the alternative be... using a context manager?

@ryanking13
Copy link
Copy Markdown
Member

Why not fix get_build_env to accept non-None path instead? I think all the callers now sets the build_dir properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge This awaits a decision before it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_create_symlink_dir should no longer be a context manager

3 participants