Personally, I keep a global @sandbox environment in which I regularly purge the contents and install new things. It’s essentially like a --temp but I can reuse it several times if I’m working on the same little bit of code. Other than that, I have some global environments dedicated to specific themes (@autodiff, @gpu) which contain relevant packages for these fields, that are amortized rather fast. It’s much better than always going Test.activate() in my experience.
I also know that there are options to make compilation less burdensome:
- disable automatic precompilation with environment variable
JULIA_PKG_PRECOMPILE_AUTO - install already available versions of packages when possible, setting preferences with variables like
JULIA_PKG_PRESERVE_TIERED_INSTALLED - keep more versions of packages precompiled by increasing
JULIA_MAX_NUM_PRECOMPILE_FILES - automatically precompile existing environments when you update Julia with PrecompileAfterUpdate.jl