Build system modernization#210
Conversation
Exclude contribs to enable greptile review
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@greptile Review this please |
Greptile SummaryThis PR comprehensively modernizes Gecode's build infrastructure across CMake, autoconf, and CI/CD pipelines. The changes establish uv as the unified dependency manager for Python-based build scripts, raise CMake to version 3.21 with proper GECODE_* option namespacing, and make Major Changes:
The migration is well-executed with proper backward compatibility (deprecation warnings for old CMake options), comprehensive CI coverage, and detailed changelog entries. All Python scripts use modern syntax with type hints and PEP 723 metadata for reproducible uv-based execution. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Build System Modernization] --> B[CMake Path]
A --> C[Autoconf Path]
B --> B1[CMakeLists.txt<br/>Min version 3.21]
B1 --> B2[GecodeSources.cmake<br/>Decoupled source lists]
B2 --> B3[GenerateVarImp.cmake<br/>uv-based codegen]
C --> C1[configure.ac<br/>Canonical source]
C1 --> C2[gecode-version.m4<br/>Shared metadata]
C2 --> C3[Makefile.in<br/>uv script execution]
B3 --> D[Python Scripts<br/>PEP 723 metadata]
C3 --> D
D --> D1[genvarimp.py]
D --> D2[allexamples.py]
D --> D3[genchangelog.py]
D --> D4[Other utilities]
A --> E[CI/CD Matrix]
E --> E1[Linux: autoconf + CMake]
E --> E2[macOS: autoconf + CMake]
E --> E3[Windows: CMake + MSYS2]
E1 --> F[uv dependency]
E2 --> F
E3 --> F
A --> G[Cleanup]
G --> G1[Remove contribs/]
G --> G2[Remove configure.ac.in]
G --> G3[Remove Perl scripts]
Last reviewed commit: 35fa496 |
|
The branch seems to break dependency handling when custom variable implementations are used. When I run (what used to work in the past): I run into errors of the kind As a workaround I replace the and that works okay. |
Composite cutoff generators delete owned Cutoff instances through the polymorphic base type. Those destructor calls cannot be forcibly inlined in the general case, even though the definitions live in the header. Use ordinary inline for the header-defined composite destructors while leaving forceinline on the small non-polymorphic cutoff helpers.
Fix the reviewed CMake and Autoconf build edge cases: derive FlatZinc wrapper and MiniZinc solver paths from the configured install layout, keep Qt Core package tracking separate from the Gist GUI probe, reject var-imp regeneration without inputs, and move GECODE_NO_AUTOLINK from the installed public config header to exported CMake targets. Also make MSYS/MinGW Autoconf hosts use compiler discovery instead of defaulting to cl, add the new m4 inputs to configure regeneration, clarify the uv/Python and Qt dependency docs, and hide Windows build presets on non-Windows hosts.
Include documented example .cpp files in the Doxygen input again while excluding implementation .cpp files from the library, tests, and FlatZinc tool sources. Remove stale example \relates commands that Doxygen 1.17 reports as duplicate relation commands, and keep long helper input lists out of the CMake command line by passing an input-list file to the Python generators.
Raise the uv script metadata from Python 3.9 to Python 3.11 across the remaining maintenance helpers. Also align the plain-text ChangeLog generator with the Doxygen generator so float, graph, and driver entries are not dropped.
Track successful WSAStartup calls and balance them with WSACleanup on failed connects and disconnects. Initialize the socket descriptor, avoid closing invalid descriptors, and release addrinfo on connection failure.
Bump shared release metadata to 6.4.0 and refresh the generated configure script. Update the autoconf Qt probe to require Qt 5.15 or newer and find moc from modern Qt install layouts.
Add AUTO/ON/OFF Qt and Gist modes, enforce the supported Qt baseline, and select a complete Qt stack for Gist. Tighten exported MPFR/Qt dependencies, static Gist headers, generated MiniZinc solver flags, and configured script permissions.
Remove the stale Travis configuration and add GitHub Actions smoke coverage for package consumers, Qt 5/6 Gist exports, old Qt rejection, and solver metadata.
Clean up trailing whitespace in examples, FlatZinc sources, generated parser output, and nearby headers without changing behavior.
Strengthen the CMake consumer smoke test to require GECODE_HAS_MPFR, MPFR::MPFR, and an MPFR-backed float link from the installed package.
This PR prepares Gecode 6.4.0 by modernizing the build and release surface while keeping the Autoconf path supported. The main shift is from a legacy, repository-local build setup to a smaller maintenance surface with first-class CMake packaging and current CI coverage.
In broad terms, it:
The goal is to make 6.4.0 easier to build, package, test, and consume on current platforms without dropping existing Autoconf users.