You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently loading .env files is hard to do correctly.
Rocket REALLY WANTS you to execute it through the launch or main macro respectively.
Those macros setup an async runtime and run the async method body.
This is an issue, if we want to load .env files, since "loading a .env file" entails setting all key=value pairs to the processes environment. Setting a process environment is unsafe as of the 2024 edition (and realistically should be used as such in other editions too).
Ideal Solution
Either add a feature to load .env files to rocket, or allow users to execute before the async runtime starts
The first way could even be retro-fitted into current-releases of rocket.
Why can't this be implemented outside of Rocket?
Rockets REALLY WANTS to be controlling the async runtime startup.
If any other code is already in an async runtime, it's too late to be safely setting process environment variables.
Are there workarounds usable today?
Use a "custom" async runtime startup sequence
Just Hope and pray that everything will work regardless
Alternative Solutions
No response
Additional Context
No response
System Checks
I do not believe that this feature can or should be implemented outside of Rocket.
I was unable to find a previous request for this feature.
The text was updated successfully, but these errors were encountered:
What's missing?
Currently loading .env files is hard to do correctly.
Rocket REALLY WANTS you to execute it through the launch or main macro respectively.
Those macros setup an async runtime and run the async method body.
This is an issue, if we want to load .env files, since "loading a .env file" entails setting all key=value pairs to the processes environment. Setting a process environment is unsafe as of the 2024 edition (and realistically should be used as such in other editions too).
Ideal Solution
Either add a feature to load .env files to rocket, or allow users to execute before the async runtime starts
The first way could even be retro-fitted into current-releases of rocket.
Why can't this be implemented outside of Rocket?
Rockets REALLY WANTS to be controlling the async runtime startup.
If any other code is already in an async runtime, it's too late to be safely setting process environment variables.
Are there workarounds usable today?
Alternative Solutions
No response
Additional Context
No response
System Checks
The text was updated successfully, but these errors were encountered: