Gridap Warm-up file (for PackageCompiler)
- Dominant language
- Julia
- Stars
- 879
- Forks
- 119
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 4
Description
Hi @amartinhuertas !
I have been thinking about this and I have some comments
1. The approach seems a bit complicated to me. In particular, with the clones of Gridap, Gridap Tutorials. It feels like we are trying to re-implement something that the package manager already provides.
2. Wrapping calls to PackageCompiler is a bit rigid and one needs to learn the API of the wrapper. I would prefer to use PackageCompiler directly. It is a well documented package and once the user knows how to use it, it can be useful for other Julia projects, not just Gridap.
3. This approach is vulnerable to code invalidation. When the user imports packages that were not present at this point, some code generated in the image can be invalidated.
In summary:
In Gridap, I would only provide a path to a "warm-up file", or some function returning a path in function of some arguments if we want some customization. Then, the user can use this warm-up file to call PackageCompiler in the way she/he needs for the case at hand.
Some tentative user code
```julia
using PackageCompiler
using Gridap
# load other packages that the user wants to use to avoid code invalidations
using Plots
using DrWatson
using GridapEmbedded
# Recover the warmup file for the Gridap version installed
# (package manager will handle the installation of Gridap)
warmup_gridap = Gridap.warmup_file
# Here one has the oportunity to compile more things
pkgs = [:Gridap,:OtherPackage1,...]
warmups= [warmup_gridap, other_warmup, ....]
PackageCompiler.create_sysimage(
pkgs,
sysimage_path="whatever.so",
precompile_execution_file=warmups)
```
Contributor guide
Research direction
Start with the proposed Gridap.warmup_file entry point and the PackageCompiler.create_sysimage example in the issue. Determine how Gridap should expose a warm-up file or configurable path, and confirm that the result can be passed directly to PackageCompiler while avoiding the clone-and-wrapper approach described here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100