fukamachi / envy

Configuration switcher by an environment variable inspired by Config::ENV.
BSD 2-Clause "Simplified" License
57 stars 4 forks source link

Add a function to set the value of the environment variable #1

Closed eudoxia0 closed 10 years ago

eudoxia0 commented 10 years ago

Users shouldn't have to care how the configuration variable is set internally, so I added a little functionality to set the value of a given env var.

avodonosov commented 10 years ago

IMHO dependency on osicat is a huge overkill - you need a C compiler installed on your machine and cffi-grovel configured rightly to be able to invoke the C compiler. And that's only to load envy.

Moreover, the new functions introduced by this patch are not used by envy itself, because envy gets env variables using asdf::getenv, so the dependency on osicat is worthless.

fukamachi commented 10 years ago

IMHO dependency on osicat is a huge overkill - you need a C compiler installed on your machine and cffi-grovel configured rightly to be able to invoke the C compiler. And that's only to load envy.

Perhaps you're right. I'd like to remove the dependency. But, are there any other choices for osicat:makunbound-environment-variable? Both of ASDF and UIOP have no function to do it.

eudoxia0 commented 10 years ago

I've been thinking about this too and I think it would be a good idea, especially given how osicat insists on recompiling everything every time it is loaded.

avodonosov commented 10 years ago

@fukamachi, but osicat:makunbound-environment-variable is not used by envy.

avodonosov commented 10 years ago

If there are users who want to remove environment variable, they can themselves load osical and use osicat:makunbound-environment-variable, no sense to export this function from envy under different name. In particular, if envy-test needs to remove env variable, envy test can depend on osicat, instead of hardcoding osicat dependency in envy.

fukamachi commented 10 years ago

@eudoxia0 Then, can I revert this pull request?

eudoxia0 commented 10 years ago

@fukamachi I won't object, so you go ahead if you want.

fukamachi commented 10 years ago

Okay, I reverted it.