neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
381 stars 114 forks source link

CMake: remove --depth for submodule --init as it's not supported #2980

Closed pramodk closed 1 week ago

pramodk commented 1 month ago

Without this, if I try to use these options, I get:

-- Sub-module : missing /gpfs/bbp.cscs.ch/project/proj16/kumbhar/266806/nrn-home/nrn-master/external/nanobind : running git submodule update --recursive;--depth;1 --init
-- ==> /usr/bin/git submodule update --recursive--depth1" --init -- /gpfs/bbp.cscs.ch/project/proj16/kumbhar/266806/nrn-home/nrn-master/external/nanobind"
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
CMake Error at cmake/ExternalProjectHelper.cmake:46 (message):
  git submodule init failed
Call Stack (most recent call first):
  cmake/ExternalProjectHelper.cmake:67 (nrn_initialize_submodule)
  CMakeLists.txt:443 (nrn_add_external_project)
azure-pipelines[bot] commented 1 month ago

✔️ 52e0dd93a518e90e4bc247cb6adc5699539212ba -> Azure artifacts URL

bbpbuildbot commented 1 month ago

Logfiles from GitLab pipeline #221597 (:white_check_mark:) have been uploaded here!

Status and direct links:

azure-pipelines[bot] commented 1 month ago

✔️ 52e0dd93a518e90e4bc247cb6adc5699539212ba -> Azure artifacts URL

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.28%. Comparing base (df21c81) to head (da8d5f1). Report is 5 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2980 +/- ## ========================================== - Coverage 67.29% 67.28% -0.01% ========================================== Files 572 572 Lines 104961 104966 +5 ========================================== - Hits 70632 70630 -2 - Misses 34329 34336 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bbpbuildbot commented 1 month ago

Logfiles from GitLab pipeline #221702 (:white_check_mark:) have been uploaded here!

Status and direct links:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

azure-pipelines[bot] commented 1 month ago

✔️ da8d5f187b1afa4cee3d89a277670c19fcab3cdd -> Azure artifacts URL

bbpbuildbot commented 1 month ago

Logfiles from GitLab pipeline #221889 (:no_entry:) have been uploaded here!

Status and direct links:

1uc commented 1 month ago

Closest is checking out branches with git clone --branch <branch_name>, but they really do mean branch, not tag, and not commit, only branches.

ferdonline commented 1 month ago
--depth
This option is valid for add and update commands

Why don't we init submodules with update i.e. git submodule update --init --recursive --depth N?

1uc commented 1 week ago

We already use git submodule update --init, see here:

  execute_process(
    COMMAND ${GIT_EXECUTABLE} submodule update ${UPDATE_OPTIONS} --init -- ${path}
    COMMAND ${GIT_EXECUTABLE} submodule update ${UPDATE_OPTIONS} --init -- ${path}
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    RESULT_VARIABLE ret)
    RESULT_VARIABLE ret)

From what Pramod posts, it's plausible that he's running on BB5 without loading a non-ancient version of git.