Skip to content
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

rocq: init at 9.0+rc1 #377439

Merged
merged 3 commits into from
Feb 7, 2025
Merged

rocq: init at 9.0+rc1 #377439

merged 3 commits into from
Feb 7, 2025

Conversation

proux01
Copy link
Contributor

@proux01 proux01 commented Jan 27, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@proux01
Copy link
Contributor Author

proux01 commented Jan 28, 2025

@vbgl CI green both here and on coq-community/coq-nix-toolbox#318

There is definitely room for improvement (for instance by providing better support for writing the coq compatibility packages) but this is a first working version, enabling users to test that their rocq-only packages indeed compile without the coq compatibility shim.

Please take your time if you want to review this one a bit more carefully and ask any question, this is not urgently needed.

@proux01 proux01 marked this pull request as ready for review January 28, 2025 10:22
@nix-owners nix-owners bot requested a review from philiptaron January 28, 2025 10:24
Copy link
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call it rocq-prover please!

@proux01
Copy link
Contributor Author

proux01 commented Jan 29, 2025

That's pretty long, can't we just make an alias so that we can use both?

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 29, 2025

No. Auto-complete exists and is supported by all Nix commands.

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 29, 2025

Of course, I'm not going to ask the same thing for coqPackages. I am fine with rocqPackages (rather than rocqProverPackages or whatever). But for the main package, let's be consistent with what was decided for the opam package.

@proux01
Copy link
Contributor Author

proux01 commented Jan 29, 2025

Well, it's not consistent anyway. The thing currently called rocq is closer from the rocq-core opam package. Maybe we should rename it rocq-core and add a rocq-prover metapackage?

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 29, 2025

Indeed, it would be much better to make it more consistent the way you propose!

@proux01
Copy link
Contributor Author

proux01 commented Jan 29, 2025

So let's rename to rocq-core and see in a further PR how we could get a rocq-prover metapackage (still a bit unclear to me but maybe it's just a matter of having something with propagatedBuildInputs = [ rocq-core stdlib ]).

Copy link
Contributor

@vbgl vbgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really needed to duplicate meta-fetch and extra-lib?

pkgs/applications/science/logic/rocq/default.nix Outdated Show resolved Hide resolved

{ lib, stdenv, fetchzip, fetchurl, writeText, pkg-config, gnumake42
, customOCamlPackages ? null
, ocamlPackages_4_14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naïve question: would it be better to use the current version of OCaml, i.e., 5.2 (and maybe soon 5.3)? or is OCaml 4.14 the correct thing to use to compile Rocq as of today?

This question is both for the PR author and for any careful reader such as Théo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OCaml 5 has the following disadvantages:

  • not native_compute
  • small performance penalty

My understanding is that nixpkgs doesn't really support native_compute anyway so maybe we could switch to OCaml 5. No strong opinion here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small performance penalty

I'm unsure that this is still true with OCaml 5.2.

My understanding is that nixpkgs doesn't really support native_compute anyway so maybe we could switch to OCaml 5. No strong opinion here.

Indeed! Native compute users could still override the version of OCaml to use OCaml 4.14 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small performance penalty

I'm unsure that this is still true with OCaml 5.2.

My understanding is that it will "always" remain true for fundamental reasons. But I may be wrong.

pkgs/applications/science/logic/rocq/default.nix Outdated Show resolved Hide resolved
pkgs/applications/science/logic/rocq/default.nix Outdated Show resolved Hide resolved
@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jan 29, 2025
@proux01
Copy link
Contributor Author

proux01 commented Jan 29, 2025

Is it really needed to duplicate meta-fetch and extra-lib?

Indeed, not needed.

@proux01 proux01 force-pushed the rocq branch 2 times, most recently from fb18346 to bffc16d Compare February 4, 2025 14:38
@proux01
Copy link
Contributor Author

proux01 commented Feb 4, 2025

@vbgl thanks for the review, CI green both here and on coq-community/coq-nix-toolbox#318

Copy link
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the commit messages and PR titles do not reflect anymore the actual PR contents (package name is rocq-core now).

pkgs/build-support/rocq/default.nix Show resolved Hide resolved
rocqPackages_9_0 = mkRocqPackages rocq-core_9_0;

rocqPackages = recurseIntoAttrs rocqPackages_9_0;
rocq-core = rocqPackages.rocq-core;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I'm OK with only creating rocq-core in this PR and keeping rocq-prover for later, I don't think that we should expose at the top level a package with the name rocq-core. It should probably only be made available as rocqPackages.rocq-core. In the future, when we introduce a rocq-prover package, we can make this one available at top level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think it is useful to get easy access to rocq-core.

In any case, I think we should merge this rapidly, so as to be able to test things in CIs during the RC period (we still can't test compilation without coq compat shim yet). We can still improve the little details later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that rocq-core is a bit of a strange name for something at top level.

@vbgl
Copy link
Contributor

vbgl commented Feb 7, 2025

@Zimmi48 Théo, we need your approval for merging. Thanks.

rocqPackages_9_0 = mkRocqPackages rocq-core_9_0;

rocqPackages = recurseIntoAttrs rocqPackages_9_0;
rocq-core = rocqPackages.rocq-core;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that rocq-core is a bit of a strange name for something at top level.

@vbgl vbgl merged commit e8d0b02 into NixOS:master Feb 7, 2025
27 of 28 checks passed
@proux01 proux01 deleted the rocq branch February 10, 2025 12:01
@Zimmi48
Copy link
Member

Zimmi48 commented Feb 10, 2025

Question: should some of the package descriptions be improved?

image

It seems like the Rocq Prover description could mention that it is the new name of the Coq proof assistant. Perhaps, having the coq_9_0 package mention that it is the Rocq Prover with compatibility wrappers would be nice as well, but I have no idea if this is easy to change only for coq >= 9. And indeed, we can see that for coqPackages.stdlib, the description is problematic (Compatibility metapackage for Coq Stdlib library after the Rocq renaming) given that it is at version 8.20. BTW, should this package exist at all in the coqPackages_8_20 package set?

I find it interesting BTW that coq_9_0 was listed when I searched for rocq. No idea why, but that's cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: coq "A formal proof management system" 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants