-
Couldn't load subscription status.
- Fork 697
Bignums as a separate opam package #498
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
Conversation
|
Once you have the separate repository maybe you would like to update the |
|
Indeed |
As I mentioned two working groups ago, I'm working on rebasing primitive integers on trunk. I'm afraid this work goes a bit against making the retroknowledge modular, since it adds an However, it is still doable to ship separately the libraries built on top of it. The treatment of 63-bit integers themselves is fairly lightweight. |
Precisely because there is no way in the foreseeable future to move the retroknowledge code out of Coq, I would suggest not to remove |
|
Ok for leaving in the stdlib the stuff about |
2970c3d to
d785952
Compare
|
What is the transition strategy for user developments? |
|
During the WG discussion, we agreed to merge this. We were worried about the backward compatibility of developments importing the OPAM package and even suggested to publish an empty package for 8.6. But @letouzey made the remark offline that if the package compiles with both 8.6 and 8.7, no action is required to ensure backward compatibility, apart from setting the right dependency constraints in the OPAM package. |
|
An external repository for bignums code is ready here https://github.com/coq/bignums . |
|
@letouzey you are right, we should add the removed function back, in a deprecated way, sorry for that. This change was done when we had not settled on Ocaml Anyways, for most plugins, the only solution is indeed to have their own compat layer or to ship two different files. However note that given the amount of changes in 8.7
is really a futile goal. |
:) We mean this for scripts. Given the current shape of the plugin API, it would be counter productive to guarantee compatibility. On this particular example, I'm a bit surprised, though, I thought @ejgallego had made sure there was a way to maintain compatibility, following a comment by Guillaume. |
|
I re-added some missing functions, but not this one in particular. |
|
Indeed as @maximedenes points out, given the current OCaml API model and the things discussed for the next Coq versions, ML-level compatibility will be far from stellar I'm afraid. Adding your plugin to Travis can help alleviate some of the pain. However IMO given what the release schedule is going to be we should really recommend a synchronized release model to plugin authors. That is to say: if you are a plugin author, when Coq 2019.04 comes out, you release the 2019.04 version of your plugin, then you move development to Coq 2019.10. IMHO this is feasible now as a 6 months rate should be OK for Coq. [Note that other projects such as GCC or Linux deem 6 months too long and they release way often]. |
|
Sorry @letouzey , |
|
@ejgallego, indeed |
d785952 to
cdc4e0f
Compare
|
Rebased, and directly propose the removal of BigN, BigZ, BigQ now that we have an separate repo for them ( https://github.com/coq/bignums ). |
|
There multiple failures. Some of them are expected (CoLoR relying on BigN), some of them easy to fix (doc), some unexpected (CompCert). |
|
@letouzey Are you working on a fix, or should we postpone this to 8.8? |
|
@maximedenes : Working on it today... |
cdc4e0f to
264aca6
Compare
|
Rebased + fixed |
|
The CompCert failure is a really minor consequence of the removal of For devs really relying on bignums (Color, MathClasses and its dependency Formal_topology), I'll provide overlays declaring my new repository as dependency for these devs |
|
@ejgallego : does the new version of travis stuff suits you ? |
dev/ci/ci-basic-overlay.sh
Outdated
| # Bignums | ||
| ######################################################################## | ||
| : ${Bignums_CI_BRANCH:=master} | ||
| : ${Bignums_CI_GITURL:=https://github.com/coq/bignums.git} |
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.
minor nit, it should be bignums_CI_BRANCH etc... as I hope soon much of this boilerplate is handled automagically, but the name should correspond to the entry in ci-bignums
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.
Done
36598d1 to
ded6399
Compare
|
@ejgallego I believe @letouzey is waiting for your feedback on this one. |
|
Oh sorry I didn't see it, sure it looks almost fine, they were really nits. However I would like to see the install stuff corrected, but it is not a blocker for a merger as we can take care of it later. |
|
|
||
| # Setup Bignums | ||
|
|
||
| source ${ci_dir}/ci-bignums.sh |
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.
I see your point here but I don't think we want to use source to install packages, please, define an install function similarly to what we do for math-comp.
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.
I don't think we want to use source to install packages
Why not ? I personally find it cleaner this way, with stuff about bignums located in ci-bignums.sh rather that who knows elsewhere. But I won't fight over this. I'll implement what you ask if I've 5min today, otherwise feel free to do what you what if that gets merged.
| then | ||
| source ${ci_dir}/ci-common.sh | ||
| fi | ||
|
|
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.
See my comment below.
| sed -i -e "s/From Coq Require Export BigN/From Bignums Require Export BigN/" ${Color_CI_DIR}/Util/*/*.v | ||
| sed -i -e "s/From Coq Require Import BigZ/From Bignums Require Import BigZ/" ${Color_CI_DIR}/Util/*/*.v | ||
| sed -i -e "s/From Coq Require Export BigZ/From Bignums Require Export BigZ/" ${Color_CI_DIR}/Util/*/*.v | ||
|
|
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.
This should be eventually integrated in CoLoR, I suggest we ask Frédéric to do an 8.7 branch.
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.
Didn't we say at the WG that this would even be a backward compatible fix?
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.
Please be precise when you speak of compatibility, since it might mean many many things. Yes the above change is "backward compatible" in the way I've been asked to ensure : after applying this change, CoLoR may still compiles with Coq 8.6 ... at the condition that the new bignums package (available both for 8.6 and 8.7) is correctly installed first.
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.
@ejgallego : agreed concerning the need of a 8.7 branch of CoLoR, but the sed stuff should do meanwhile (no nice overlay tricks for svn, right ?). And I don't think it's worth bothering Frédéric before this PR gets merged.
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.
Sure as I said below I am just adding notes so we don't forget, none of my remarks is blocking.
| # Setup Bignums | ||
|
|
||
| source ${ci_dir}/ci-bignums.sh | ||
|
|
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.
replace by install_bignum
|
|
||
| source ${ci_dir}/ci-bignums.sh | ||
|
|
||
| # Setup Math-Classes |
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.
ditto.
ded6399 to
d0c5f46
Compare
|
Rebased + removed the CompCert overlay (already merged :-). |
|
@maximedenes : all green here, at last :-) |
See now https://github.com/coq/bignums Int31 is still in the stdlib. Some proofs there has be adapted to avoid the need for BigNumPrelude.
22b1555 to
268ccbb
Compare
See PR#498 rocq-prover/rocq#498 In addition to this commit, you should also have fetched and compiled the new bignums packages before compiling math-classes : git clone https://github.com/coq/bignums.git && cd bignums && make && make install
Not fully ready yet (but no real showstopper either), this PR is to mark my intention to migrate Bignums (Int31, BigN, BigZ, BigQ) out of Coq repository, and place them instead in a dedicated opam package, ideally as soon as Coq 8.7.
Why ?
Already done
plugins/bignums)Still to be done
plugins/bignums