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

Exposing global "REPLIT_LD_LOADER" property to be picked up by replenv builder #394

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

blast-hardcheese
Copy link
Contributor

Why

For better or worse, uv mandates the virtualenv being a "real" virtualenv, including bin/python symlinks. This subverts our attempts to manipulate the environment via shell-script wrappers, causing runtime library issues.

By moving the environment shuffling into the replenv builder itself, curating the environment itself instead of the wrapper scripts, we can have both uv as well as tools like rtld-loder.

What changed

  • Expose REPLIT_LD_AUDIT

Test plan

I should be able to echo $REPLIT_LD_AUDIT and get the value defined even on an empty Repl.

Rollout

  • This is fully backward and forward compatible

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner September 17, 2024 21:52
@blast-hardcheese blast-hardcheese requested review from ryantm and airportyh and removed request for a team September 17, 2024 21:52
@blast-hardcheese
Copy link
Contributor Author

I've confirmed that this puts the entry I need in the right place -- the intent is that this will replace not only the python wrappers but also the node/bun wrappers as well.

@airportyh
Copy link
Collaborator

Question, does this mean we are not setting this var at all for our current python setup?

@blast-hardcheese
Copy link
Contributor Author

@airportyh Currently the value is interpolated into the Python wrapper directly, but I'm trying to move it to "globally available" if the flag is turned on.

Is it OK to be globally enabled for all binaries within a Repl? I would presume yes, at a possible slight impact to startup speed, but effectively a no-op after that, but we'd get the benefit of broken applications and libraries working out of the box without further patching.

@blast-hardcheese blast-hardcheese merged commit fd9d667 into main Sep 18, 2024
1 check passed
@blast-hardcheese blast-hardcheese deleted the dstewart/chore/start-moving-rtld-to-replenv branch September 18, 2024 20:30
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.

2 participants