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

env/option_env failing to be linted by plrustc #393

Open
thomcc opened this issue Oct 31, 2023 · 7 comments
Open

env/option_env failing to be linted by plrustc #393

thomcc opened this issue Oct 31, 2023 · 7 comments

Comments

@thomcc
Copy link
Contributor

thomcc commented Oct 31, 2023

Because this is unrelated to #387 it deserves it's own issue.

Fixing it outright seems difficult (still not sure how), I think it'd probably be fine to try wiping the env on entry to plrustc when compiling the plrust user crate though. Because it seems specific to the env macro (and not a more general thing) that should be enough.

@eeeebbbbrrrr
Copy link
Contributor

It’s unclear to me what effect wiping the environment would have on Postgres. It can get some settings from the environment but I don’t know if that’s during startup only (I’d hope!) or if it happens during runtime too

@thomcc
Copy link
Contributor Author

thomcc commented Oct 31, 2023

This would just be inside plrustc.

@eeeebbbbrrrr
Copy link
Contributor

oh. well, should plrust clear the env for the cargo Command it spawns? We currently do this, but could do more:

fn sanitize_env(command: &mut Command) {

@thomcc
Copy link
Contributor Author

thomcc commented Oct 31, 2023

Nah, I think we'd do this inside plrustc itself, to make sure we don't mess something up with cargo.

@thomcc
Copy link
Contributor Author

thomcc commented Oct 31, 2023

This is pretty annoying to do correctly so I think we'll do this slightly incorrectly and hope it doesn't break anything.

@workingjubilee
Copy link
Contributor

On the scale of code crimes we commit, it probably will be far from the top.

@thomcc
Copy link
Contributor Author

thomcc commented Oct 31, 2023

... That is quite true.

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

No branches or pull requests

3 participants