Skip to content

Make .crystal directory location configurable#844

Merged
asterite merged 1 commit intocrystal-lang:masterfrom
jhass:configurable_dot_crystal
Jun 23, 2015
Merged

Make .crystal directory location configurable#844
asterite merged 1 commit intocrystal-lang:masterfrom
jhass:configurable_dot_crystal

Conversation

@jhass
Copy link
Member

@jhass jhass commented Jun 23, 2015

  • Default behaviour unchanged
  • Allows to not clutter stuff up with .crystal directories wherever you happen to run crystal eval
  • No conflicts, generated files are already namespaced by their full path
  • Potential reusage of temporary files after changing the current working directory and compiling the same file again
  • Slight speedup by setting the location to somewhere in /tmp
  • If we later decide to put the default location into /tmp/crystal, ~/.crystal or whatever, if available, there's now a central place to implement that logic.

@bararchy
Copy link
Contributor

Yes !!! Yes please , I have like 10 different hidden .crystal folder all over my /home .
Thanks @jhass
+5 for this

@vyp
Copy link
Contributor

vyp commented Jun 23, 2015

+1 of course, but I don't think it should clutter the home directory unless it's a hidden folder. So not ~/crystal, but maybe ~/.crystal or ~/.cache/crystal or something.

@vyp
Copy link
Contributor

vyp commented Jun 23, 2015

Not that this pr does that of course, just referring to your last bullet point.

@asterite
Copy link
Member

Looks good. Should it be named CRYSTAL_TMP_DIR maybe?

@jhass
Copy link
Member Author

jhass commented Jun 23, 2015

Don't care much about the name, just used what was used in the codebase already. Should I change it?

@asterite
Copy link
Member

I wouldn't care about the name either, except that it has to be set as an ENV var. I think CRYSTAL_TMP_DIR is better, CRYSTAL_OUTPUT_DIR sounds like the dir where executables are going to be created.

@jhass jhass force-pushed the configurable_dot_crystal branch from e8878dc to 21704b5 Compare June 23, 2015 14:50
@jhass jhass force-pushed the configurable_dot_crystal branch from 21704b5 to a55d964 Compare June 23, 2015 14:51
@jhass
Copy link
Member Author

jhass commented Jun 23, 2015

Changed to CRYSTAL_CACHE_DIR after discussion on IRC.

@ysbaddaden
Copy link
Collaborator

👍 that would help with my ecryptfs home, where I sometimes hit the filename length limit.

@bcardiff
Copy link
Member

👍 I was thinking to anchor .crystal to be a sibling of the Projectfile. But fixing to the whole environment seems simpler.

asterite pushed a commit that referenced this pull request Jun 23, 2015
Make .crystal directory location configurable
@asterite asterite merged commit 4f8b454 into crystal-lang:master Jun 23, 2015
@jhass jhass deleted the configurable_dot_crystal branch June 24, 2015 11:31
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

Successfully merging this pull request may close these issues.

6 participants