Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev/doc/howto_release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* generate changelog with dev/tools/generate-release-changelog.sh
and update doc/sphinx/changes.rst accordingly
* update doc/sphinx/conf.py (particularly is_a_released_version)
* update theories/Version.v
* check the result of "make refman-html"
(in _build/default/doc/refman-html)
* if need be, update supported versions of Rocq in .nix/config.nix
Expand Down
4 changes: 3 additions & 1 deletion 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

Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ if [ "$1" = "-unsorted" ]; then
else
rocqdep="xargs rocq dep -Q . Stdlib -sort"
fi
find . -regex '.*/[^.][^/]*[.]v' ! -path ./All.v | sort | $rocqdep | \
find . -regex '.*/[^.][^/]*[.]v' ! -path ./All.v ! -path ./Version.v | sort | $rocqdep | \
sed -e 's#\./#From Stdlib Require Export #g' -e 's#\.v\s*#.\n#g' -e 's#/#.#g'

printf 'From Stdlib Require Export Version.\n'
2 changes: 2 additions & 0 deletions theories/Version.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
From Corelib Require Import PrimString.
Definition version : string := "9.2".
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.

Loading