Is there a way of speeding up an alr build with gtk? Say I start a new project.
alr init --bin a98xml
alr with gtk
That is simple enough.
alr build
This takes about 4 minutes. We only have to do this once but it is 4 minutes for every project I get out of source code control. Is it safe to do this once and then copy the alire/cache directory to all the projects?
I've tried it. It seems to work but how safe is it?
If you’re using an up-to-date alr (I’m using 2.0.1, which isn’t the latest) you could check this setting (alr help settings
):
- dependencies.shared [Boolean][Default:TRUE] When true, dependencies are downloaded and built in a shared location inside the global cache. When false, dependencies are sandboxed in each workspace.
If true
, release builds are cached (look in alr version
for build folder
) using some long hash. I don’t know what makes up the hash, it’ll be some mix of compiler/flags used for the build.
I’m using aarch64-apple-darwin (Macbook Air M1), and I’ve noticed that using the default gprbuild
some crates (e.g. langkit
, libadalang
) get rebuilt anyway.