-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge libsingular-julia back and build it on demand #639
Merge libsingular-julia back and build it on demand #639
Conversation
3ba9f87
to
60be270
Compare
60be270
to
fa47e37
Compare
A few comments:
I don't really like too much automatic re-compilation, maybe this can be put behind an interactive prompt (and disallowed in non-interactive mode) except when allowed via an explicit environment flag that is set in the yml for this repository? I don't fully understand yet how versioning is supposed work in the end. This somewhat depends on the amount of changes expected to libsingular-julia, if we can do a new jll for each change to the library then the above approach might be preferrable. |
@benlorenz thanks for the feedback, very useful. I'll ponder it some more, but a quick note: yes, versioning is still a bit shaky. So far my assumption was that we'll do this:
Admittedly this is clunky and also means we'd temporarily have versions of the master branch that don't have a matching However I'd still argue that it is overall superior to what we have now, where we have to:
But of course it would be good to improve this further. Besides, I just encountered at least one other really annoying problem: I wanted to work on a feature that requires the new BTW building libsingular_julia_jll only takes a few seconds. And updating the JLL frequently shouldn't be an issue either. Back to the proposed workflow: you describe an alternative where Overall I am therefore sceptical about this approach (but I am certainly not ruling it out yet) I'd be happy to discuss this further, I certainly don't claim to have a perfect solution yet, only that even this clunky one is IMHO way better than what we have now |
fa47e37
to
30c18ae
Compare
I also hit some annoying compat issues with polymake_jll at some point and added a workaround to our |
Note to self: New plan for getting this PR ready:
This will relax the process a bit, time wise, as we can pause between each step w/o impeding the development of Singular.jl. |
224807b
to
fbe7dc4
Compare
fbe7dc4
to
5495fdd
Compare
5d54a97
to
652a22e
Compare
@hannes14 @ederc @benlorenz this is now ready to be merged from my point of view. That does not mean the work is 100% done, but it is good enough to be merged and used, and gradually improved. Once merged I'll open an issue with remaining TODOs. From the top of my head:
There is probably more but all seem to be things we can deal with gradually. So unless anyone objects I'll merge this a bit later today. Then will test it with PRs #660 and #661 by @hannes14 and @ederc and (assuming that works) make a fresh release of the JLL and Singular.jl |
README.maintainer.md
Outdated
the `libsingular_julia` build script with a new version number and using the | ||
latest commit SHA for the `master` branch of `Singular.jl`. | ||
|
||
1. Commit changes to the `deps/src/` directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Points 1 and 2 appear twice, delete (probably) the second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, thank you. Fixed now
If the source code in this repository differs from what was used to build libsingular_julia_jll, then recompile libsingular_julia. This requires a working C++ compiler. It is intended for development, not for use in releases.
652a22e
to
7835113
Compare
Merge libsingular-julia back and build it on demand
This PR resolves issue #600. That is, it merges the
libsingular-julia
back into this repository (it was removed here in 3a1d92c and moved to https://github.com/oscar-system/libsingular-julia).As a result of this PR, changes which need to update the C++ code in
libsingular-julia
in lockstep with the Julia code inSingular.jl
can be done with a single PR, and CI tests will be able to test these PRs effectively, because they will end up compiling the C++ code and using it, instead of using the latestlibsingular_julia_jll
release.This works by adding code that detects if the
libsingular-julia
code differs from what was used to buildlibsingular_julia_jll
(this is done by comparing the "git tree hash" of the source directories; for the JLL, we store this hash in a file inside the JLL). If a difference is detected then we compile the C++ code from scratch and load it instead of the JLL. This is essentially imitating what GAP.jl has been doing for quite some time. In my experience it is a major relieve when working on the C++ code and e.g. debugging it.Some decisions I made which people may wish to debate and change:
Open questions:
We don't want released versions to compile the C++ code (because this can fail in so many ways, and produces an overhead). So:
can we detect whether the package is installed as an ordinary package versus being dev'ed? (Perhaps just check for the presence of a
.git
dir in the package directory?)If so, should we either...
can we add tooling to stop us (or at least reduce the likelihood) from accidentally making a release of Singular.jl without a matching updating of
libsingular_julia_jll
?libsingular_julia_jll
is "up-to-date" (the version installed byProject.toml
, that is), and if not, it fails -- but only onmaster
, not in PRsTODO:
using Singular
, it redoes precompilation (and thus compilers the C++ code twice). Fix this!libsingular_julia_jll
to point here and contain the relevant tree-hash of the source fileslibsingular_julia_jll
is updated, change the dependency on it in Project.tomlSingular_jll
version differs and trigger a rebuild then (not urgent, for now one can always force a rebuilding by insert a space into the C++ sources somewhere)