Skip to content

Add a Version file allowing to identify the stdlib version from Rocq#263

Open
mattam82 wants to merge 1 commit into
rocq-prover:masterfrom
mattam82:stdlib-version
Open

Add a Version file allowing to identify the stdlib version from Rocq#263
mattam82 wants to merge 1 commit into
rocq-prover:masterfrom
mattam82:stdlib-version

Conversation

@mattam82
Copy link
Copy Markdown
Member

Part of a fix for #256, allowing to identify the released version of stdlib however it has been installed.

  • Added changelog. (is this necessary?)
  • Added / updated documentation. (notes for the release process)

Comment thread theories/All.sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why special handling of version here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This avoids an issue with the sed below which replaces ./ with From .... In the output of the rocq dep call, we get Version.v not ./Version.v.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please add a comment about it then

Comment thread theories/Version.v
@@ -0,0 +1,2 @@
From Corelib Require Import PrimString.
Definition version : string := "9.2". No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess a non-primstring-using alternative would be version : nat * nat := (9, 2)

IDK if depending on primstring is ever a problem

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know what's the best representation here either, I thought a simple string representation would be simpler to interpret by clients. I refrained from using String as it would add a dependency, on the other hand Flocq is parsing a string and encoding it using N (https://gitlab.inria.fr/flocq/flocq/-/blob/master/src/Version.v.in?ref_type=heads) What's the benefit of that representation @silene ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wanted something I could easily perform comparisons on, in Gallina (or by extension, Ltac). Using numbers makes things easy; strings not so much. (It is the usual issue, "x.10" is not lexicographically larger than "x.9".) But in the end, I do not think I ever used that feature.

@SkySkimmer
Copy link
Copy Markdown
Contributor

btw if we can finish rocq-prover/rocq#21564, it seems ocamlfind files have a version field

@mattam82
Copy link
Copy Markdown
Member Author

btw if we can finish rocq-prover/rocq#21564, it seems ocamlfind files have a version field

Yes, it would be another way to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants