Skip to content

Avoid checking out unused CMake dependency submodules - #4725

Closed
dimpase wants to merge 8 commits into
Macaulay2:developmentfrom
dimpase:lazy-cmake-submodules
Closed

dimpase wants to merge 8 commits into
Macaulay2:developmentfrom
dimpase:lazy-cmake-submodules

Conversation

@dimpase

@dimpase dimpase commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

CMake currently initializes every Git submodule during configuration, even when it finds the corresponding system libraries. For example, a system FLINT installation avoids compiling FLINT but still causes its repository to be downloaded. This adds unnecessary work on slow connections and in fresh CI checkouts.

Select submodules after library detection and BUILD_LIBRARIES overrides. Always retain the bundled engine sources and Emacs package; initialize BDWGC, FLINT, Frobby, Givaro, FFLAS-FFPACK, and GoogleTest only when their fallback is needed. Declare those fallback build rules only when selected, so empty unused source directories no longer prevent configuration. GoogleTest is unnecessary when testing is disabled.

Previously installed fallback components retain their sources and build/test targets across reconfiguration, using their installation stamps. GIT_SUBMODULE=OFF and source archives remain supported when required sources are present; missing required sources now produce an actionable error. Remove the old .nogit placeholder workaround. Documentation on submodule selection, BUILD_LIBRARIES, and offline builds is staged in the draft wiki pages on dimpase/M2. These update the CMake build guide and related FAQ; they will be transferred to the upstream wiki after this PR is merged, incorporating any further review changes. The added README documentation has been removed from this PR.

A failed combined library link check now stops configuration with the linker output, selected GMP headers/libraries, and CMAKE_PREFIX_PATH, so it does not silently select broad fallback builds. Configure with -DREBUILD_LIBRARIES_ON_LINK_FAILURE=ON to restore the previous automatic fallback; BUILD_LIBRARIES remains available for explicitly selecting dependencies to rebuild. The probe is retried on every configuration so corrected paths take effect after a failure.

Frobby's fallback configuration now receives the selected GMP_ROOT, avoiding an independent default to system GMP when M2 selected a different prefix, such as Linuxbrew.

Validation:

  • Full native CMake configuration succeeds. Local regression checks cover an unresolved symbol, conflicting GMP SONAMEs, retrying corrected library paths in the same build directory, explicit fallback selection, and the default/legacy/disabled compatibility-check modes.
  • A two-prefix fixture with the actual pinned Frobby sources confirms that passing GMP_ROOT selects the same GMP prefix as the parent configuration.
  • Local checks using temporary Git repositories covered selective checkout, pinned revisions, missing dependencies, disabled testing, retained installations, offline/source-archive operation, and failed updates. Following review, the Python regression script and its CI step have been removed from this PR.
  • Full local M2 configuration succeeds with all six optional submodule directories empty and the corresponding system libraries present. Their fallback targets are absent.
  • Full configuration from a Git worktree initializes only the four required source submodules (using local repository mirrors for validation).
  • BUILD_LIBRARIES=FLINT creates the fallback targets; a subsequent configuration with a simulated installation stamp retains its test target.
  • Workflow syntax/expression validation (actionlint -shellcheck='') and diff checks pass. Existing ShellCheck warnings in unchanged workflow commands remain. Local checks ran at low priority. No full M2 rebuild was performed.

The development CMake workflow already starts with a non-recursive checkout and can benefit directly. The recursive checkout/source-snapshot handling in #4721 needs a separate follow-up to benefit from this selection as well. No network-speed improvement has been benchmarked.

🤖 gpt-6-astra worked on this 🤖

Review follow-up: removed M2/cmake/tests/test_submodules.py and the corresponding CMake CI step. The selective-checkout implementation is unchanged. Workflow syntax/expression validation passes with ShellCheck disabled (unchanged shell commands have existing warnings), and the removal passes diff checks.

Select fallback sources after library detection, retain previously installed component targets, and check required offline sources explicitly. Add local Git regression tests to the CMake CI jobs.

Co-authored-by: Codex <noreply@openai.com>

@dimpase dimpase left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lgtm, @d-torrance

@dimpase
dimpase marked this pull request as ready for review September 18, 2026 03:28
@d-torrance d-torrance added build issue platform specific issues involving compiling M2, generating examples, or running tests Infrastructure GitHub workflows, etc. AI-generated This PR contains AI-generated code or this issue was written by AI labels Sep 21, 2026

@d-torrance d-torrance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution! I have a few comments and questions

Comment thread M2/BUILD/README.md Resolved
Comment thread M2/cmake/configure.cmake Resolved
Comment thread M2/cmake/submodules.cmake Resolved
Comment thread M2/cmake/tests/test_submodules.py Outdated
@@ -0,0 +1,130 @@
"""Exercise selective CMake checkout with local Git repositories (no network)."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the purpose of this python script?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's to be run in CI. 🤖 says:

The Python script tests the new submodule-selection logic using temporary local Git repositories,
without network access or compiling M2. 
It checks that required submodules are fetched at their pinned revisions, 
unused dependencies are skipped, and offline builds and failed updates are handled correctly. 
It runs in CI to catch regressions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems like overkill to check something as simple as "did we check out the right submodules"? Also the cmake/tests directory is new, and we don't have any similar Python scripts anywhere.

I'd recommend swapping this out for a simple shell command in the workflow. Claude suggested the following:

- name: Check unused submodules were not checked out
  if: matrix.build-system == 'cmake'
  run: |
    for m in bdwgc flint frobby givaro fflas_ffpack googletest; do
      if git submodule status ../../submodules/$m | grep -qv '^-'; then
        echo "::error::submodule $m was checked out"; exit 1
      fi
    done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In fact, we could drop the "if" since the autotools build already has this behavior

dimpase and others added 2 commits September 21, 2026 13:14
Co-authored-by: Codex <noreply@openai.com>
Set the alias before submodule selection and provide it in the standalone test fixture.

Co-authored-by: Codex <noreply@openai.com>
Comment thread M2/cmake/submodules.cmake

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's already an option to disable cloning submodules, which you could enable on github builds if you'd like. Moving submodule handling all to this file is a good idea, but otherwise the rest of this PR adds unnecessary complexity imo.

@dimpase

dimpase commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

python stuff with the associated CI step dropped, OK now?

@dimpase
dimpase requested a review from mahrud October 7, 2026 23:19
EXCLUDE_FROM_ALL ON
STEP_TARGETS install
)
set(GOOGLETEST_FOUND ${GTEST_FOUND})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did you move this line all the way to line 121 as opposed to ~688?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

because GOOGLETEST_FOUND is needed on the line 122, where submodules.make is included. The latter uses it on line 8.

# https://github.com/ivmai/bdwgc/
# TODO: add environment variables GC_LARGE_ALLOC_WARN_INTERVAL and GC_ABORT_ON_LEAK
# Note: Starting with 8.0, libatomic_ops is not necessary for C11 or C++14.
if(_m2_build_bdwgc)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are these checks necessary? Even if we don't need to clone a submodule, or even if git isn't available, we can safely call ExternalProject_Add here, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

well, not quite. ExternalProject_Add without a download method requires a nonempty source directory—even if its target won’t be built. Therefore those guards. Cf https://cmake.org/cmake/help/latest/module/ExternalProject.html#download-step-options

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's why we called file(TOUCH ${_submodule}/.nogit).

@dimpase dimpase Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

isn't it cleaner just not have directories if there is no stuff there?
(and as submodules are gone here, calling anything nogit is just wrong)
So this just treating the dependencies in question as normal external dependencies, without any old hacks left)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oops, not all submodules are gone, I am conflating other PRs here

@antonleykin antonleykin left a comment

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 don't understand much of the submodules mechanics, but as long as this PR simplifies things, it is fine to merge.

Comment thread M2/cmake/submodules.cmake Outdated
Comment on lines +4 to +5
set(_m2_required_submodules submodules/memtailor submodules/mathic submodules/mathicgb)
foreach(_name IN ITEMS bdwgc flint frobby givaro fflas_ffpack googletest)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hardcoding this list here makes maintenance of submodules more mysterious and ad hoc.

@dimpase dimpase Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree. This is addressed in 82d16ca

Comment thread M2/cmake/submodules.cmake
Comment on lines +32 to +34
foreach(_path IN LISTS _m2_required_submodules)
file(GLOB _m2_submodule_files "${CMAKE_SOURCE_DIR}/${_path}/*")
list(FILTER _m2_submodule_files EXCLUDE REGEX "/\\.(git|nogit)$")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's this block doing? You said you're not using .nogit files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Older non-Git configurations may have left .nogit placeholders in empty submodule directories. Neither these nor .git metadata count as source files.

I can add this as a source comment if you like.
This check can be removed some time later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

comment added in 82d16ca

@mahrud

mahrud commented Oct 20, 2026

Copy link
Copy Markdown
Member

@dimpase could you clarify what is the precise issue that this PR solves, or in what way it simplifies the submodule handling in cmake?

@dimpase

dimpase commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

checking out a large submodule takes a while. It's a waste of internet bandwidth and time if it is not needed.

Comment thread M2/cmake/submodules.cmake
Comment on lines +42 to +74
foreach(_entry IN LISTS _m2_gitmodule_paths)
string(REGEX REPLACE "^[ \t]*path[ \t]*=[ \t]*" "" _path "${_entry}")
string(STRIP "${_path}" _path)
if(NOT _path MATCHES "^M2/")
continue()
endif()
string(REGEX REPLACE "^M2/" "" _path "${_path}")

if(_path MATCHES "^submodules/([^/]+)$")
set(_name "${CMAKE_MATCH_1}")
string(TOUPPER "${_name}" _upper)
set(_option_name "${_upper}")
if(_name STREQUAL "googletest")
set(_option_name GTEST)
endif()
if(NOT _option_name IN_LIST _m2_library_options)
# Engine sources have no system-library alternative.
set(_m2_build_${_name} TRUE)
else()
_m2_select_fallback("${_name}")
endif()
if(_m2_build_${_name})
list(APPEND _m2_required_submodules "${_path}")
list(APPEND _m2_update_submodules "${_path}")
endif()
else()
# Keep the editor submodule's existing warning/skip behavior when absent.
list(APPEND _m2_update_submodules "${_path}")
endif()
endforeach()
if(NOT _m2_update_submodules)
message(FATAL_ERROR "No M2 submodule paths found in ${_m2_gitmodules}")
endif()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@antonleykin, I understand exactly how the submodule mechanics works, and genuinely do not think this is a simplification of what we already have. It shaves ~20 seconds off from CMake's configure step, but trying to decipher this block here wasted 20 minutes of my time and I still don't fully understand it. As I see it, merging it makes the system more complicated and dependent on a coding agent for maintenance.

That said, as I said in the other CMake PR, feel free to disregard my review and merge if anyone who wants it can say that they 100% understand it and take responsibility for its maintenance.

@dimpase

dimpase commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

20 seconds?
To quote the description:

CMake currently initializes every Git submodule during configuration, even when it finds the corresponding system libraries. For example, a system FLINT installation avoids compiling FLINT but still causes its repository to be downloaded. This adds unnecessary work on slow connections and in fresh CI checkouts.

it's easily takes 20 seconds on a very fast net to check out flint (if your disk is slow it will take more) - which will also take 200Mb of disk.


This sort of setup just looks bad in the eyes of potential users. They think that if the devs are too lazy to optimise the build, the quality of the soft isn't great, either...

@mahrud

mahrud commented Oct 21, 2026

Copy link
Copy Markdown
Member

Here's a GitHub build before this PR, from 12:03:43 -> 12:03:58 (15s):

2026-10-21T12:03:43.9352488Z -- Submodule update
2026-10-21T12:03:43.9632174Z Submodule 'M2/Macaulay2/editors/emacs' (https://github.com/Macaulay2/M2-emacs.git) registered for path 'Macaulay2/editors/emacs'
2026-10-21T12:03:43.9637875Z Submodule 'M2/submodules/bdwgc' (https://github.com/ivmai/bdwgc.git) registered for path 'submodules/bdwgc'
2026-10-21T12:03:43.9646192Z Submodule 'M2/submodules/fflas-ffpack' (https://github.com/Macaulay2/fflas-ffpack.git) registered for path 'submodules/fflas_ffpack'
2026-10-21T12:03:43.9652763Z Submodule 'M2/submodules/flint' (https://github.com/flintlib/flint) registered for path 'submodules/flint'
2026-10-21T12:03:43.9660501Z Submodule 'M2/submodules/frobby' (https://github.com/Macaulay2/frobby.git) registered for path 'submodules/frobby'
2026-10-21T12:03:43.9666972Z Submodule 'M2/submodules/givaro' (https://github.com/linbox-team/givaro) registered for path 'submodules/givaro'
2026-10-21T12:03:43.9673711Z Submodule 'M2/submodules/googletest' (https://github.com/google/googletest.git) registered for path 'submodules/googletest'
2026-10-21T12:03:43.9680330Z Submodule 'M2/submodules/mathic' (https://github.com/Macaulay2/mathic) registered for path 'submodules/mathic'
2026-10-21T12:03:43.9687394Z Submodule 'M2/submodules/mathicgb' (https://github.com/Macaulay2/mathicgb) registered for path 'submodules/mathicgb'
2026-10-21T12:03:43.9694289Z Submodule 'M2/submodules/memtailor' (https://github.com/Macaulay2/memtailor) registered for path 'submodules/memtailor'
2026-10-21T12:03:43.9722307Z Cloning into '/home/runner/work/M2/M2/M2/Macaulay2/editors/emacs'...
2026-10-21T12:03:44.1884867Z Cloning into '/home/runner/work/M2/M2/M2/submodules/bdwgc'...
2026-10-21T12:03:47.5358054Z Cloning into '/home/runner/work/M2/M2/M2/submodules/fflas_ffpack'...
2026-10-21T12:03:48.2671148Z Cloning into '/home/runner/work/M2/M2/M2/submodules/flint'...
2026-10-21T12:03:53.8009426Z Cloning into '/home/runner/work/M2/M2/M2/submodules/frobby'...
2026-10-21T12:03:54.1841947Z Cloning into '/home/runner/work/M2/M2/M2/submodules/givaro'...
2026-10-21T12:03:54.7034258Z Cloning into '/home/runner/work/M2/M2/M2/submodules/googletest'...
2026-10-21T12:03:56.3618605Z Cloning into '/home/runner/work/M2/M2/M2/submodules/mathic'...
2026-10-21T12:03:56.5450212Z Cloning into '/home/runner/work/M2/M2/M2/submodules/mathicgb'...
2026-10-21T12:03:56.8836876Z Cloning into '/home/runner/work/M2/M2/M2/submodules/memtailor'...
2026-10-21T12:03:57.1009729Z Submodule path 'Macaulay2/editors/emacs': checked out 'ae882ab04da19f62c62462ef9604251a0b30a9f5'
2026-10-21T12:03:57.1466990Z Submodule path 'submodules/bdwgc': checked out '4fab5386df64466b2b61fc7209bef033cad1e6cc'
2026-10-21T12:03:57.2016249Z Submodule path 'submodules/fflas_ffpack': checked out '497d81cbc6a8539857e8b4c7d9bca5d1828b6739'
2026-10-21T12:03:57.7415113Z Submodule path 'submodules/flint': checked out '92f8444a0e9be75beff8b8413ebfa9a6c21dd260'
2026-10-21T12:03:57.8489985Z Submodule path 'submodules/frobby': checked out '76835ddecc6869640936ea55c313033b2767915d'
2026-10-21T12:03:57.8922505Z Submodule path 'submodules/givaro': checked out 'd6177a2518ded619e8b94b44a47c803105ad6ba0'
2026-10-21T12:03:57.9374959Z Submodule path 'submodules/googletest': checked out '063de7e9578f82b369302001269680b4b1553359'
2026-10-21T12:03:57.9530855Z Submodule path 'submodules/mathic': checked out '95af837bcce4517965d28fb19902d050a8b6a98a'
2026-10-21T12:03:57.9799483Z Submodule path 'submodules/mathicgb': checked out 'eae920070f0e9f8b34c08148f4caab7f89195601'
2026-10-21T12:03:58.0034833Z Submodule path 'submodules/memtailor': checked out 'a74747f70d5d4f2c79c9707b64c5086eb8c051b9'
2026-10-21T12:03:58.1445654Z -- Copying gftables from /usr/share/singular/factory//gftables

and here is the latest build in this PR 22:24:04 -> 22:24:06 (2s):

2026-10-20T22:24:04.3405555Z -- Updating required submodules: submodules/memtailor;submodules/mathic;submodules/mathicgb;Macaulay2/editors/emacs
2026-10-20T22:24:04.3759827Z Submodule 'M2/Macaulay2/editors/emacs' (https://github.com/Macaulay2/M2-emacs.git) registered for path 'Macaulay2/editors/emacs'
2026-10-20T22:24:04.3764270Z Submodule 'M2/submodules/mathic' (https://github.com/Macaulay2/mathic) registered for path 'submodules/mathic'
2026-10-20T22:24:04.3770331Z Submodule 'M2/submodules/mathicgb' (https://github.com/Macaulay2/mathicgb) registered for path 'submodules/mathicgb'
2026-10-20T22:24:04.3775875Z Submodule 'M2/submodules/memtailor' (https://github.com/Macaulay2/memtailor) registered for path 'submodules/memtailor'
2026-10-20T22:24:04.3803995Z Cloning into '/home/runner/work/M2/M2/M2/Macaulay2/editors/emacs'...
2026-10-20T22:24:04.8572039Z Cloning into '/home/runner/work/M2/M2/M2/submodules/mathic'...
2026-10-20T22:24:05.5759273Z Cloning into '/home/runner/work/M2/M2/M2/submodules/mathicgb'...
2026-10-20T22:24:06.0592580Z Cloning into '/home/runner/work/M2/M2/M2/submodules/memtailor'...
2026-10-20T22:24:06.4319498Z Submodule path 'Macaulay2/editors/emacs': checked out 'ae882ab04da19f62c62462ef9604251a0b30a9f5'
2026-10-20T22:24:06.4471509Z Submodule path 'submodules/mathic': checked out '95af837bcce4517965d28fb19902d050a8b6a98a'
2026-10-20T22:24:06.4787760Z Submodule path 'submodules/mathicgb': checked out 'eae920070f0e9f8b34c08148f4caab7f89195601'
2026-10-20T22:24:06.4902614Z Submodule path 'submodules/memtailor': checked out 'a74747f70d5d4f2c79c9707b64c5086eb8c051b9'
2026-10-20T22:24:06.5996485Z -- Copying gftables from /usr/share/singular/factory//gftables

I'm not opposed to the concept of only fetching the necessary submodules, only that your coding agent did so in an unnecessarily complicated way. I doubt the users will notice either way.

Also, I can give many situations in which this PR won't even solve the problem you're suggesting. For instance, if there's a linking error between the libraries (this happens to me regularly if different libraries are linked with different gmp versions), cmake defaults to building all the libraries, so everything submodule will be fetched anyway.

Report the linker output and selected GMP paths by default instead of discarding every library discovery result. REBUILD_LIBRARIES_ON_LINK_FAILURE restores the previous automatic fallback when requested. Always rerun the probe so corrected paths take effect after a failed configuration.
The child CMake configuration otherwise searches independently and can pick a system GMP even when M2 found GMP under another prefix, such as Linuxbrew. Pass GMP_ROOT to prefer the same installation.
"Use -DBUILD_LIBRARIES=ALL to explicitly rebuild all supported dependencies.\n\n"
"To restore automatic rebuilding after a failed link check, configure with "
"-DREBUILD_LIBRARIES_ON_LINK_FAILURE=ON.\n\n"
"Link check output:\n${LIBRARY_COMPATIBILITY_OUTPUT}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you just pass my gmp library mismatch example to your coding agent?! The example I gave is one of many situations that library incompatibility can happen, and most often the solution is indeed rerunning the build-libraries target, as the message you deleted suggested, and giving a fatal error means the user can't even do that! Moreover, even in the limited gmp version mismatch situation, passing -DBUILD_LIBRARIES=... will not prevent this fatal error, which means it'll be impossible to build M2!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I haven't deleted anything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

giving a fatal error is not the end. There is an option to explicitly stick to the current behaviour.

Moreover, one of the last commits fix a bug which let frobby to shop around for a gmp, rather than using one found by the cmake builder already

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

an incompatibility like this is a bug in the build system. It's not something one is forced to live with forever

@dimpase dimpase Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What happened is that not all such cases were checked. Sorry. A learning curve :-(

I started digging why. Apparently, as 🤖 was previously told here not to write tests for cmake files, cf (d2ddc78) it literally replaced tests written in Python it runs on its code with sequences of commands it executed "manually". Not dissimilar to humans here. :-)

Perhaps it's not a good idea with AI-written build systems to keep to old habits of not writing tests...

Keep compatible fallback installations, but retry a failed combined link
check without the installed libraries explicitly selected by BUILD_LIBRARIES.
Only enable their rebuilds when the remaining libraries link successfully.

Invalidate the selected ExternalProject configure/build/install/test stamps
so build-libraries repairs the installation. A successful post-build probe
retains it, avoiding repeated rebuilds with the same cached option.
@dimpase
dimpase requested a review from mahrud October 22, 2026 04:55
@mahrud
mahrud removed their request for review October 22, 2026 15:18
@dimpase

dimpase commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

perhaps the bottom line here is that software in submodules become a problem for the build system as soon as they start competing with their system-wide analogs; while it's possible to have "rebuild everything from scratch" mode working OK, anything beyond this is a major project, needing testing of the build system itself, etc.

perhaps we just need a carpet "ignore submodules" option in cmake to have a chance for reliable quick rebuilds.

@dimpase

dimpase commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

superceded by #4757 and #4758

@dimpase dimpase closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-generated This PR contains AI-generated code or this issue was written by AI build issue platform specific issues involving compiling M2, generating examples, or running tests Infrastructure GitHub workflows, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants