-
Notifications
You must be signed in to change notification settings - Fork 188
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
Make (certain) environment variables available at build time #25
Comments
Thank you for trying out the build pack! Rust performance can be shockingly terrible in debug mode. It's sufficiently bad that I don't want to support debug mode, because then people will turn it on, and then they'll file bugs that I have to look at (or they'll be disappointed with Rust). Much better to turn on symbols in release mode, so that things perform acceptably. So I think the right solution here is to use:
...in your project's |
Well, thanks for providing the build pack 😉 For my application, I have a build script which compiles assets (e.g. compiling In the script I also check the What do you think about reexporting So: I can completely understand your reasoning and I think you're right. I asked for a slightly different reason, as you can see. |
Hmm. Unfortunately, I don't understand the Personally, I would consider leaving CSS unminified only in the local dev environment, and always minifying it on Heroku. But that might not work for all workflows, I suppose. |
I agree. Maybe the user could specify a list of var-names in the If you want to read about |
Yeah, that seems like a pretty reasonable argument. Rather than add a configuration knob (I hate configuration knobs), maybe we could just export variables using the Would you by any chance have time to work on a PR implementing this? I have a big stack of other high-priority open source issues I need to look at soon, and a new buildpack feature like this might take weeks to bubble to the top of my list. Thank you for looking into this! |
But who decides what to export? In other words: who sets the
|
The default appears to export everything that isn't on the blacklist. I'd be OK with that. I suspect we could just add that script to the buildpack unchanged, and call it at the appropriate time, and that would work out OK. We might need to tweak the blacklist for some Rust-specific stuff. But as I mentioned above, I strongly dislike adding configuration options, and I would prefer to find a one-size-fits-all solution that Just Works™ without the user doing anything. |
Right now, this buildpack always builds with
--release
. But there are situations in which one might want to build in debug mode... or at least with debug symbols enabled.Maybe this could be added as a configuration in
RustConfig
?The text was updated successfully, but these errors were encountered: