Singular.jl depends on the Singular kernel and some C++ glue code found in
the deps/src/ directory. Compiled versions of each are distributed to users
as binary artifacts via the Julia "JLL" packages Singular_jll and
libsingular_julia_jll respectively.
The build scripts for these JLL packages can be found here:
- https://github.com/JuliaPackaging/Yggdrasil/blob/master/S/Singular/build_tarballs.jl
- https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/libsingular_julia/build_tarballs.jl
The resulting JLL packages
- https://github.com/JuliaBinaryWrappers/Singular_jll.jl
- https://github.com/JuliaBinaryWrappers/libsingular_julia_jll.jl
The sources:
Singularsources: https://github.com/Singular/Singularlibsingular_juliasources:deps/src/directory ofSingular.jl
Suppose just the C++ wrappers need to be updated, without any changes to the Singular kernel itself.
-
Commit changes to the
deps/src/directory.ex: oscar-system#661
-
After the changes are merged (and before the next
Singular.jlrelease), update thelibsingular_juliabuild script with a new version number and using the latest commit SHA for themasterbranch ofSingular.jl. -
Wait for this to be merged into Yggdrasil, and then wait for the registry to pick up the new version of
libsingular_julia_jll. -
Bump the dependence in
Singular.jlto whatever version number was used in Step 2.Version compatibility notation: https://pkgdocs.julialang.org/v1/compatibility/
-
Release a new
Singular.jl. This is done by pinging JuliaRegistrator in the comments of a commit.
After the new version of Singular.jl is picked up by the registry, it may be used
in further downstream packages.
Suppose the Singular kernel needs an update. This involves updating both build
scripts because libsingular_julia_jll will need to point to the new Singular_jll.
-
Update the Singular build script with the commit SHA of the singular sources at https://github.com/Singular/Singular
In this specific commit,
FLINT_jllwas also updated, but this is not necessary to update singular. Any build issues need to be communicated to https://github.com/Singular/Singular until you get a commit that builds on all targets. -
Wait for the Yggdrasil merge, and wait for the registry.
-
Update the
libsingular_juliabuild scripts with a new version andSingular_jlldependency.
At this point, we have a new libsingular_julia_jll in the works, and the steps
are essentially Steps 3-5 in the previous section.
-
The usual waiting.
-
Bump the
libsingular_julia_jllandSingular_jlldependencies inSingular.jl.This commit also bumps
AbstractAlgebraandNemo, but this is not necessary just to update Singular. -
Release new
Singular.jlversion.
Since updating the Singular kernel requires an update to libsingular_julia, the
steps here are the same as in the previous section. Just make sure that in
Step 3, the commit SHA used to update the libsingular_julia build scripts
contains all of the desired changes to libsingular_julia.
For testing purposes one may wish to try out Singular_jll changes locally before
submitting them as a PR to Yggdrasil. This can be done as shown in the following
shell script:
# Change into a clone of the Yggdrasil repository
git clone https://github.com/JuliaPackaging/Yggdrasil
cd Yggdrasil
# record the base path
BASEPATH=$(pwd)
# ensure building macOS binaries will work (you can omit this if you only
# want to build for Linux)
export BINARYBUILDER_AUTOMATIC_APPLE=true
# change into the directory containing the `build_tarballs.jl` we want to build
cd S/Singular_jll
# Now `build_tarballs.jl` can be modified, e.g. to pull a different set of
# sources, use different versions of dependencies, etc.
# ensure BinaryBuilder etc. is installed in the right version
# (ideally use the same Julia version as specified in `.ci/Manifest.toml`)
julia --project=$BASEPATH/.ci -e 'using Pkg; Pkg.instantiate()'
# get list of platforms etc.
julia --project=$BASEPATH/.ci build_tarballs.jl --help
# build and deploy the JLL locally. If you omit the comma-separated
# list of PLATFORMS then it will build for *all* platforms
julia --project=$BASEPATH/.ci build_tarballs.jl PLATFORMS --deploy=local