better handling of environment variables?
#6
Closed
opened 5 years ago by mbutterick
·
5 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I’m working on a project where I’d like to use mutiple environment variables (not just
POLLEN
). You don’t need Pollen’s permission to do this, but ordinarily the cache only tracks the value of thePOLLEN
variable itself, so if you use others, the cache will not be invalidated correctly (assuming that the other environment variables affect the output).I’m thinking of adding
pollen/setup
value — let’s call itenvvar-watchlist
— that would allow a project to specify the environment variables that matter. (Simply looking at all the environment variables is not a good policy.)Thoughts? Objections? Improvements?
I'd love this feature! If possible, I'd also love a feature that enables Racket file that calls
render
to communicate Racket values to Pollen files that are being rendered -- though I understand if that's not possible. Dealing with namespaces is hard.Can you give me an example?
BTW I’ve now pushed an update with
envvar-watchlist
:Someone asks in the Slack channel a few months ago about this. Pretty much, s/he wants to render twice, each with different parameter. Trying to mutate variables doesn't work because they live in different namespace. The final solution we came up with is using environment variables, but being able to use Racket values are obviously better and less restrictive than using environment variables.
(The Slack post was gone due to Slack limitation)
Well if they come back and post a question here, I will look into it. Otherwise I can only speculate …