flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
401 stars 235 forks source link

move bootstrap to dev/make_dist.sh #1993

Closed edgarcosta closed 1 month ago

edgarcosta commented 1 month ago

In particular, moved printf $flint_version > VERSION before ./bootstrap.sh See: https://github.com/Homebrew/homebrew-core/pull/166490#issuecomment-2123447266 and https://github.com/sagemath/sage/issues/38048

albinahlback commented 1 month ago

Yeah, seems like I never updated the VERSION file for any patch I made. If it works, please merge when you feel it is ready.

edgarcosta commented 1 month ago

I think I will need to make a couple more changes.

I triggered a release using this branch on my fork: https://github.com/edgarcosta/flint/releases/tag/v3.1.3-p1 and things work as expected.

flint-3.1.3-p1 # grep -rF "3.1.3-p1"
./configure:# Generated by GNU Autoconf 2.71 for FLINT 3.1.3-p1.
./configure:PACKAGE_VERSION='3.1.3-p1'
./configure:PACKAGE_STRING='FLINT 3.1.3-p1'
./configure:\`configure' configures FLINT 3.1.3-p1 to adapt to many kinds of systems.
./configure:     short | recursive ) echo "Configuration of FLINT 3.1.3-p1:";;
./configure:FLINT configure 3.1.3-p1
./configure:It was created by FLINT $as_me 3.1.3-p1, which was
./configure:FLINT_VERSION_FULL=3.1.3-p1
./configure:tail=3.1.3-p1
./configure:This file was extended by FLINT $as_me 3.1.3-p1, which was
./configure:FLINT config.status 3.1.3-p1

but the VERSION file still says 3.1.0 😭

dimpase commented 3 days ago

Why don't you use ./configure to fill VERSION in ?

edgarcosta commented 3 days ago

@dimpase where would ./configure get that information from?

dimpase commented 3 days ago

how does one obtain the correct version in PACKAGE_VERSION ?

edgarcosta commented 3 days ago

Here: https://github.com/flintlib/flint/blob/main/configure.ac#L60

dimpase commented 3 days ago

this does not look plausible - then PACKAGE_VERSION would still be 3.1.0, not what is shown above.

dimpase commented 3 days ago

I am not sure what the problem is - for me, on the current main branch, version value in VERSION gets correctly written into flint.pc by ./configure.

By the way, it would be prudent to bump the minimal autoconf version in AC_PREREQ(2.62) to something sane, like 2.69. Note that 2.62 is from 2008 and is really, really obsolete.

edgarcosta commented 3 days ago

Releases are triggered via git tags, not necessarily by changing the file VERSION, and many times we forgot about that, e.g., https://github.com/flintlib/flint/blob/v3.1.3/VERSION

Now, we do printf $flint_version > VERSION in the github action, where $flint_version is the tag