From afd62af3cfb2eaf2668136f095df3e2b743dcd70 Mon Sep 17 00:00:00 2001 From: Cheng Date: Wed, 29 Jun 2022 11:45:27 +1000 Subject: [PATCH 1/9] documenting struggles with submodules --- docs/libraries.md | 150 +++++++++++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 62 deletions(-) diff --git a/docs/libraries.md b/docs/libraries.md index ab14d36..815fdd4 100644 --- a/docs/libraries.md +++ b/docs/libraries.md @@ -95,34 +95,34 @@ Libraries are best dealt with as [Git submodules]. [build libraries]:https://git-scm.com/book/en/v2/Git-Tools-Submodules -Git submodules leak complexity and surprising and inconvenient behaviour -all over the place if one is trying to make a change that affects multiple -modules simultaneously. But having your libraries separate from your git -repository results in non portable surprises and complexity. Makes it hard -for anyone else to build your project, because they will have to, by hand, -tell your project where the libraries are on their system. +Git submodules leak complexity and surprising and inconvenient +behaviour all over the place if one is trying to make a change that affects +multiple modules simultaneously. But having your libraries separate from +your git repository results in non portable surprises and complexity. Makes +it hard for anyone else to build your project, because they will have to, by +hand, tell your project where the libraries are on their system. -When one is developing code, you normally have a git branch. But -the git commit of the master project in which the submodule is -contained does not notice its subproject has changed, unless the -subproject head has changed. And the subject project head will not -change if it points to a name, rather than to a particular commit. For -ones changes to a submodule to be reflected in the master project in -any consistent or predictable way, the submodule has to be in -detached head mode, with the head pointing directly to a commit, -rather than pointing to a branch that points to a commit. +When one is developing code, you normally have a git branch. But the git +commit of the master project in which the submodule is contained does +not notice its subproject has changed, unless the subproject head has +changed. And the subject project head will not change if it points to a +name, rather than to a particular commit. For ones changes to a submodule +to be reflected in the master project in any consistent or predictable way, +the submodule has to be in detached head mode, with the head pointing +directly to a commit, rather than pointing to a branch that points to a +commit. -Git commands in master project do not look inside the subproject. -They just look at the subproject's head. +Git commands in master project do not look inside the subproject. They +just look at the subproject's head. -This means that signing off on changes to a submodule is -irrelevant. One signs off on the master project, which includes the -hash of that submodule commit. +This means that signing off on changes to a submodule is irrelevant. One +signs off on the master project, which includes the hash of that submodule +commit. -When one is changing submodules for the use of a particular -project, making related changes in the master project and -submodules, one should not track the changes by creating and -updating branch names in the submodule, but by creating and +When one is changing submodules for the use of a particular project, +making related changes in the master project and submodules, one should +not track the changes by creating and updating branch names in the +submodule, but by creating and updating branch names in the containing module, so that the commits in the submodule have no name in the submodule, the submodule is always in detached head state, albeit the head may be @@ -146,37 +146,25 @@ the primary project module,and when you have done with a submodule, git switch --detach ``` -Within the submodule, commits are nameless with detached head, except -when you are working on them, the name in primary module naming a -group of related commits in several submodules, which commits do not -usually receive independent names of their own, even though the commits -have to be made within the submodule, not in the containing module -which names the complete set of interrelated commits. +From the point of view of the containing superproject, submodule +commits are nameless with detached head, except when you are working +on them, the name in primary module naming a group of related commits + in several submodules, which commits do not receive independent names + of their own, even though the commits have to be made within the + submodule, not in the containing module which names the complete set of + interrelated commits. The submodule commits may well belong to different branches and tags in -the superproject, but in the submodules, they are nameless in that all the -submodule commits wind up attached to the same branch, your submodule tracking -branch. +the superproject, but the submodules know nothing of superproject +names, and the superproject knows nothing of submodules names. -In this case, working on submodules as part of a single larger project, you should set - -```bash -git config --local submodule.recurse true -``` - -In the primary project, so that you conveniently push and pull a -group of related changes as one thing, and the build for the whole -project should treat the submodule libraries as having a -dependency on module/.git/modules/submodule/HEAD, rather than -checking every single file in the submodules every time to see -if one has changed, for there could be an enormous number of -them. The primary build should invoke the submodule build, which -*will* check each file in the submodule for changes, only when the -submodule detached head has changed. And therefore, you want it -to change, you want the submodule head to be nameless and -detached, whenever you modify a submodule as part of a larger -project where you test your changes by rebuilding the whole -project to make sure all your related changes fit together. + The primary build should invoke the submodule build, which *will* check + each file in the submodule for changes, only when the submodule + detached head has changed. And therefore, you want it to change, you + want the submodule head to be nameless and detached, whenever you + modify a submodule as part of a larger project where you test your + changes by rebuilding the whole project to make sure all your related + changes fit together. When tracking an upstream submodule that has submodules of its own, which have their own upstreams @@ -189,17 +177,33 @@ git pull upstream --recurse-submodules=on-demand «their-latest-release» Make sure things still work. Get everything working. (You do have unit test, right?) + +When you are working a submodule, your branch has to have a name, or +when you push it and pull it, strange things will happen. But the +superproject pushes and pulls by commit, not by name, so when you are +done, + then: +git submodule foreach --recursive 'git push` + ```bash git submodule foreach --recursive 'git switch --detach' -git submodule foreach --recursive 'git push origin HEAD:«your-tracking-branch»' +git submodule foreach --recursive 'git push` ``` + +As its own thing, a submodule has branches with names. As a component +of a superproject, it has nameless commits. + +If you are in a submodule directory of the superproject, and you push and +pull, what you are pushing and pulling had better have a name, or else +unpleasant surprises will happen. If you are in the superproject directory +and pushing and pulling the whole thing, that commit better be detached. + You pull a named release of the project that is a submodule of your project from `upstream`, diddling with it to make it work with your project, then -you push it to `origin` as a nameless commit, though you probably gave the -various commits you made while working on it temporary and local names -with `switch -c yet-another-idea` +you push it to `origin` under its own name, the you detach it from its name, +so the superproject will know that the submodule has been changed. All of which, of course, presupposes you have already set unit tests, upstream, origin, and your tracking branch appropriately. @@ -209,8 +213,7 @@ repository, on your remote submodule repository they need to have a name to be pushed to, hence you need to have a tracking branch in each of your remote images of each of your submodules, and that tracking branch will need to point to the root of a tree of all the nameless commits that the -names and commits -in your superproject that contains this submodules point to. +names and commits in your superproject that contains this submodules point to. You want `.gitmodules` in your local image of the repository to reflect the location and fork of your new remote repository, with @@ -225,10 +228,33 @@ you rely someone else's compiled code, things break and you get accidental and deliberate backdoors, which is a big concern when you are doing money and cryptography. -GitSubmodules is hierarchical, but source code has strange loops. The Bob -module uses the Alice module and the Carol module, but Alice uses Bob -and Carol, and Carol uses Alice and Bob. How do you make sure that all -your modules are using the same commit of Alice? +When your submodules are simply your copy of someone else code, it gets + little bit messy. When you change them, it gets messier. + +And visual studio's handling of submodules is just broken and buggy. A +command that works in git-bash will produce unexpected surprising, and +unpleasant results in visual studio's git. I really need to give up on +visual studio, it is closed source code, and turning bad. + +When one developer makes minor changes in submodule to make it work +with the whole project on which several developers are working on, no +end of mysterious grief ensues, because strange and curiously difficult to +identify differences appear between builds that Git would normally ensure +are the same build. Submodules are a halfway house between completely +absorbing the other party's code into your code, and using it as a prebuilt +library. Instead, we have walls dividing the project into pieces, which is a +lot less grief than on big pile of code, but managing those walls winds up +taking a lot of time, and mistakes get made because a git commit in a +project with submodules that have changed does not mean quite the same +thing, nor have quite the same behaviour, as git commit in a project with +unchanging submodules. But then truly integrating a project that is the +product of a great deal of time by a great many of people, and managing it + thereafter, is likely to take up a great deal more time. + +Git Submodules is hierarchical, but source code has strange loops. The +Bob module uses the Alice module and the Carol module, but Alice uses +Bob and Carol, and Carol uses Alice and Bob. How do you make sure that +all your modules are using the same commit of Alice? Well, if modules have strange loops you make one of them the master, and the rest of them direct submodules of that master, brother subs to each From 51b4208cca79874bc88fa6d48ba97f89817201cf Mon Sep 17 00:00:00 2001 From: Cheng Date: Wed, 29 Jun 2022 12:28:52 +1000 Subject: [PATCH 2/9] oops, should merge more often Merge screwed up in confidently reconciling incompatible edits --- winConfig.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winConfig.bat b/winConfig.bat index 85f4b61..2c905e2 100644 --- a/winConfig.bat +++ b/winConfig.bat @@ -1,5 +1,7 @@ -echo on +echo off call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2022\BuildTools\VC\Auxiliary\Build\vcvarsamd64_x86.bat +call C:\"Program Files"\"Microsoft Visual Studio"\2022\Community\VC\Auxiliary\Build\vcvars64.bat" +echo on cd libsodium msbuild libsodium.vcxproj -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m echo off From 969b0e1ac35d41b96da31b4325fd1f1853142dbb Mon Sep 17 00:00:00 2001 From: Cheng Date: Wed, 29 Jun 2022 13:23:35 +1000 Subject: [PATCH 3/9] fixed .attributes file in submodule --- mpir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpir b/mpir index 20795fa..230d8be 160000 --- a/mpir +++ b/mpir @@ -1 +1 @@ -Subproject commit 20795fa90044ea9adfc5a2e28c9a60d8e2eebcbd +Subproject commit 230d8bee7bcad4c36a380a14e5bd19fb8071f18d From 5bcf29c1d80f444aa61046c929864994b04b1ec7 Mon Sep 17 00:00:00 2001 From: Cheng Date: Thu, 30 Jun 2022 16:17:49 +1000 Subject: [PATCH 4/9] Ignoring build products in submodule, saner and safer gitattributes in primary project. --- .gitattributes | 45 +++++++++++++++------------------------------ mpir | 2 +- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9e9a0f8..5635875 100644 --- a/.gitattributes +++ b/.gitattributes @@ -38,37 +38,22 @@ Makefile text eol=lf encoding=utf-8 # Force binary files to be binary -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp +*.webp binary +*.gif binary +*.jpg binary +*.png binary +*.pdf binary +*.doc binary +*.DOC binary +*.docx binary +*.DOCX binary +*.dot binary +*.DOT binary +*.PDF binary +*.rtf binary +*.RTF binary + -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary ############################################################################### # diff behavior for common document formats # diff --git a/mpir b/mpir index 230d8be..c7f9435 160000 --- a/mpir +++ b/mpir @@ -1 +1 @@ -Subproject commit 230d8bee7bcad4c36a380a14e5bd19fb8071f18d +Subproject commit c7f9435392ede4c7f2c887a44d7a9ca7d724f4dc From 2371674072cbbe7ff791b0ffa0e1f2298967ffa4 Mon Sep 17 00:00:00 2001 From: Cheng Date: Thu, 30 Jun 2022 16:55:37 +1000 Subject: [PATCH 5/9] moving files to clean up root directory --- rho.ico => docs/rho.ico | Bin wallet.manifest => msvc/wallet.manifest | 0 wallet.rc => msvc/wallet.rc | 0 wallet.vcxproj => msvc/wallet.vcxproj | 0 winConfig.bat => msvc/winConfig.bat | 0 ILog.cpp => src/ILog.cpp | 0 ILog.h => src/ILog.h | 0 ISqlit3Impl.cpp => src/ISqlit3Impl.cpp | 0 ISqlite3.h => src/ISqlite3.h | 0 app.cpp => src/app.cpp | 0 app.h => src/app.h | 0 db_accessors.h => src/db_accessors.h | 0 display_wallet.cpp => src/display_wallet.cpp | 0 display_wallet.h => src/display_wallet.h | 0 frame.cpp => src/frame.cpp | 0 frame.h => src/frame.h | 0 .../introspection_of_standard_C_types.h | 0 localization.cpp => src/localization.cpp | 0 localization.h => src/localization.h | 0 mpir_and_base58.cpp => src/mpir_and_base58.cpp | 0 mpir_and_base58.h => src/mpir_and_base58.h | 0 rho.xpm => src/rho.xpm | 0 ristretto255.cpp => src/ristretto255.cpp | 0 ristretto255.h => src/ristretto255.h | 0 rotime.cpp => src/rotime.cpp | 0 rotime.h => src/rotime.h | 0 secrets.cpp => src/secrets.cpp | 0 secrets.h => src/secrets.h | 0 slash6.cpp => src/slash6.cpp | 0 slash6.h => src/slash6.h | 0 stdafx.cpp => src/stdafx.cpp | 0 stdafx.h => src/stdafx.h | 0 testbed.cpp => src/testbed.cpp | 0 unit_test.cpp => src/unit_test.cpp | 0 .../welcome_to_rhocoin.cpp | 0 welcome_to_rhocoin.h => src/welcome_to_rhocoin.h | 0 36 files changed, 0 insertions(+), 0 deletions(-) rename rho.ico => docs/rho.ico (100%) rename wallet.manifest => msvc/wallet.manifest (100%) rename wallet.rc => msvc/wallet.rc (100%) rename wallet.vcxproj => msvc/wallet.vcxproj (100%) rename winConfig.bat => msvc/winConfig.bat (100%) rename ILog.cpp => src/ILog.cpp (100%) rename ILog.h => src/ILog.h (100%) rename ISqlit3Impl.cpp => src/ISqlit3Impl.cpp (100%) rename ISqlite3.h => src/ISqlite3.h (100%) rename app.cpp => src/app.cpp (100%) rename app.h => src/app.h (100%) rename db_accessors.h => src/db_accessors.h (100%) rename display_wallet.cpp => src/display_wallet.cpp (100%) rename display_wallet.h => src/display_wallet.h (100%) rename frame.cpp => src/frame.cpp (100%) rename frame.h => src/frame.h (100%) rename introspection_of_standard_C_types.h => src/introspection_of_standard_C_types.h (100%) rename localization.cpp => src/localization.cpp (100%) rename localization.h => src/localization.h (100%) rename mpir_and_base58.cpp => src/mpir_and_base58.cpp (100%) rename mpir_and_base58.h => src/mpir_and_base58.h (100%) rename rho.xpm => src/rho.xpm (100%) rename ristretto255.cpp => src/ristretto255.cpp (100%) rename ristretto255.h => src/ristretto255.h (100%) rename rotime.cpp => src/rotime.cpp (100%) rename rotime.h => src/rotime.h (100%) rename secrets.cpp => src/secrets.cpp (100%) rename secrets.h => src/secrets.h (100%) rename slash6.cpp => src/slash6.cpp (100%) rename slash6.h => src/slash6.h (100%) rename stdafx.cpp => src/stdafx.cpp (100%) rename stdafx.h => src/stdafx.h (100%) rename testbed.cpp => src/testbed.cpp (100%) rename unit_test.cpp => src/unit_test.cpp (100%) rename welcome_to_rhocoin.cpp => src/welcome_to_rhocoin.cpp (100%) rename welcome_to_rhocoin.h => src/welcome_to_rhocoin.h (100%) diff --git a/rho.ico b/docs/rho.ico similarity index 100% rename from rho.ico rename to docs/rho.ico diff --git a/wallet.manifest b/msvc/wallet.manifest similarity index 100% rename from wallet.manifest rename to msvc/wallet.manifest diff --git a/wallet.rc b/msvc/wallet.rc similarity index 100% rename from wallet.rc rename to msvc/wallet.rc diff --git a/wallet.vcxproj b/msvc/wallet.vcxproj similarity index 100% rename from wallet.vcxproj rename to msvc/wallet.vcxproj diff --git a/winConfig.bat b/msvc/winConfig.bat similarity index 100% rename from winConfig.bat rename to msvc/winConfig.bat diff --git a/ILog.cpp b/src/ILog.cpp similarity index 100% rename from ILog.cpp rename to src/ILog.cpp diff --git a/ILog.h b/src/ILog.h similarity index 100% rename from ILog.h rename to src/ILog.h diff --git a/ISqlit3Impl.cpp b/src/ISqlit3Impl.cpp similarity index 100% rename from ISqlit3Impl.cpp rename to src/ISqlit3Impl.cpp diff --git a/ISqlite3.h b/src/ISqlite3.h similarity index 100% rename from ISqlite3.h rename to src/ISqlite3.h diff --git a/app.cpp b/src/app.cpp similarity index 100% rename from app.cpp rename to src/app.cpp diff --git a/app.h b/src/app.h similarity index 100% rename from app.h rename to src/app.h diff --git a/db_accessors.h b/src/db_accessors.h similarity index 100% rename from db_accessors.h rename to src/db_accessors.h diff --git a/display_wallet.cpp b/src/display_wallet.cpp similarity index 100% rename from display_wallet.cpp rename to src/display_wallet.cpp diff --git a/display_wallet.h b/src/display_wallet.h similarity index 100% rename from display_wallet.h rename to src/display_wallet.h diff --git a/frame.cpp b/src/frame.cpp similarity index 100% rename from frame.cpp rename to src/frame.cpp diff --git a/frame.h b/src/frame.h similarity index 100% rename from frame.h rename to src/frame.h diff --git a/introspection_of_standard_C_types.h b/src/introspection_of_standard_C_types.h similarity index 100% rename from introspection_of_standard_C_types.h rename to src/introspection_of_standard_C_types.h diff --git a/localization.cpp b/src/localization.cpp similarity index 100% rename from localization.cpp rename to src/localization.cpp diff --git a/localization.h b/src/localization.h similarity index 100% rename from localization.h rename to src/localization.h diff --git a/mpir_and_base58.cpp b/src/mpir_and_base58.cpp similarity index 100% rename from mpir_and_base58.cpp rename to src/mpir_and_base58.cpp diff --git a/mpir_and_base58.h b/src/mpir_and_base58.h similarity index 100% rename from mpir_and_base58.h rename to src/mpir_and_base58.h diff --git a/rho.xpm b/src/rho.xpm similarity index 100% rename from rho.xpm rename to src/rho.xpm diff --git a/ristretto255.cpp b/src/ristretto255.cpp similarity index 100% rename from ristretto255.cpp rename to src/ristretto255.cpp diff --git a/ristretto255.h b/src/ristretto255.h similarity index 100% rename from ristretto255.h rename to src/ristretto255.h diff --git a/rotime.cpp b/src/rotime.cpp similarity index 100% rename from rotime.cpp rename to src/rotime.cpp diff --git a/rotime.h b/src/rotime.h similarity index 100% rename from rotime.h rename to src/rotime.h diff --git a/secrets.cpp b/src/secrets.cpp similarity index 100% rename from secrets.cpp rename to src/secrets.cpp diff --git a/secrets.h b/src/secrets.h similarity index 100% rename from secrets.h rename to src/secrets.h diff --git a/slash6.cpp b/src/slash6.cpp similarity index 100% rename from slash6.cpp rename to src/slash6.cpp diff --git a/slash6.h b/src/slash6.h similarity index 100% rename from slash6.h rename to src/slash6.h diff --git a/stdafx.cpp b/src/stdafx.cpp similarity index 100% rename from stdafx.cpp rename to src/stdafx.cpp diff --git a/stdafx.h b/src/stdafx.h similarity index 100% rename from stdafx.h rename to src/stdafx.h diff --git a/testbed.cpp b/src/testbed.cpp similarity index 100% rename from testbed.cpp rename to src/testbed.cpp diff --git a/unit_test.cpp b/src/unit_test.cpp similarity index 100% rename from unit_test.cpp rename to src/unit_test.cpp diff --git a/welcome_to_rhocoin.cpp b/src/welcome_to_rhocoin.cpp similarity index 100% rename from welcome_to_rhocoin.cpp rename to src/welcome_to_rhocoin.cpp diff --git a/welcome_to_rhocoin.h b/src/welcome_to_rhocoin.h similarity index 100% rename from welcome_to_rhocoin.h rename to src/welcome_to_rhocoin.h From b989390a6b4b90732e238001ed52a5129d3e0323 Mon Sep 17 00:00:00 2001 From: Cheng Date: Thu, 30 Jun 2022 20:54:26 +1000 Subject: [PATCH 6/9] builds after files moved --- Icon.ico | Bin 45451 -> 0 bytes msvc/wallet.rc | 2 +- msvc/wallet.vcxproj | 79 +++++++++++++++++++------------------ msvc/winConfig.bat | 8 ++-- src/ISqlit3Impl.cpp | 2 +- {sqlite3 => src}/sqlite3.h | 0 wallet.sln | 2 +- 7 files changed, 48 insertions(+), 45 deletions(-) delete mode 100644 Icon.ico rename {sqlite3 => src}/sqlite3.h (100%) diff --git a/Icon.ico b/Icon.ico deleted file mode 100644 index 5d06b9f2857b39f0b5d3395e3e7999ba6bcc3a38..0000000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X_#rKiMwP57DY~`4`VikWR!W_an+gf1)px vHI}#k5wcVo5)y*8y8vc3wJ)k8`?X}$7ah_Kn$R;(zCt~-GL&alJ}>=0A=}t% diff --git a/msvc/wallet.rc b/msvc/wallet.rc index 6b72f9f..9e1a334 100644 --- a/msvc/wallet.rc +++ b/msvc/wallet.rc @@ -2,7 +2,7 @@ // The visual studio resource editor will screw it up. #pragma code_page(65001) // UTF-8 // this icon is used with wxFrame::SetIcon() -AAArho ICON "rho.ico" +AAArho ICON "../docs/rho.ico" // set this to 1 if you don't want to use manifest resource (manifest resource // is needed to enable visual styles on Windows XP - see docs/msw/winxp.txt diff --git a/msvc/wallet.vcxproj b/msvc/wallet.vcxproj index c8e4738..49c8256 100644 --- a/msvc/wallet.vcxproj +++ b/msvc/wallet.vcxproj @@ -43,15 +43,19 @@ true - GSL\include;wxWidgets\include\msvc;wxWidgets\include;libsodium\src\libsodium\include;mpir;$(IncludePath) - wxWidgets\lib\vc_x64_lib\;libsodium\Build\Debug\X64;mpir\lib\x64\Debug;$(LibraryPath) + $(SolutionDir)wxWidgets\include\msvc;$(SolutionDir)wxWidgets\include;$(SolutionDir)libsodium\src\libsodium\include;$(SolutionDir)mpir;$(IncludePath) + $(SolutionDir)wxWidgets\lib\vc_x64_lib\;$(SolutionDir)libsodium\Build\Debug\X64;$(SolutionDir)mpir\lib\x64\Debug;$(LibraryPath) + $(SolutionDir)build\$(Configuration)\ + $(SolutionDir)build\$(Configuration)\ false - GSL\include;wxWidgets\include\msvc;wxWidgets\include;libsodium\src\libsodium\include;mpir;$(IncludePath) - wxWidgets\lib\vc_x64_lib\;libsodium\Build\Release\X64;mpir\lib\x64\Release;$(LibraryPath) + $(SolutionDir)wxWidgets\include\msvc;$(SolutionDir)wxWidgets\include;$(SolutionDir)libsodium\src\libsodium\include;$(SolutionDir)mpir;$(IncludePath) + $(SolutionDir)wxWidgets\lib\vc_x64_lib\;$(SolutionDir)libsodium\Build\Release\X64;$(SolutionDir)mpir\lib\x64\Release;$(LibraryPath) + $(SolutionDir)build\$(Configuration)\ + $(SolutionDir)build\$(Configuration)\ @@ -119,60 +123,59 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + NotUsing NotUsing - + NotUsing NotUsing - - - - - + + + + + NotUsing NotUsing - + NotUsing NotUsing - + Create Create - - - /utf-8 %(AdditionalOptions) + + - + - + diff --git a/msvc/winConfig.bat b/msvc/winConfig.bat index 2c905e2..fb3fff9 100644 --- a/msvc/winConfig.bat +++ b/msvc/winConfig.bat @@ -94,28 +94,28 @@ IF %ERRORLEVEL% NEQ 0 ( echo on cd ..\..\.. -msbuild wallet.vcxproj -p:Configuration=Debug;Platform=x64 -m +msbuild wallet.sln -p:Configuration=Debug;Platform=x64 -m echo off IF %ERRORLEVEL% NEQ 0 ( PAUSE GOTO:EOF ) echo on -msbuild wallet.vcxproj -p:Configuration=Release;Platform=x64 -m +msbuild wallet.sln -p:Configuration=Release;Platform=x64 -m echo off IF %ERRORLEVEL% NEQ 0 ( PAUSE GOTO:EOF ) echo on -.\x64\Debug\wallet.exe --complete --test +.\build\Debug\wallet.exe --complete --test echo off IF %ERRORLEVEL% NEQ 0 ( echo failed unit test on debug build ) ELSE ( echo passed unit test on debug build) echo on -.\x64\Release\wallet.exe --complete --test +.\build\Release\wallet.exe --complete --test echo off IF %ERRORLEVEL% NEQ 0 ( echo failed unit test on release build diff --git a/src/ISqlit3Impl.cpp b/src/ISqlit3Impl.cpp index 75716eb..cebd543 100644 --- a/src/ISqlit3Impl.cpp +++ b/src/ISqlit3Impl.cpp @@ -14,7 +14,7 @@ #include // for shared_ptr, unique_ptr #include #include "ISqlite3.h" -#include "sqlite3/sqlite3.h" +#include "sqlite3.h" static auto error_message(int rc, sqlite3* pdb) { return std::string("Sqlite3 Error: ") + sqlite3_errmsg(pdb) + ". Sqlite3 error number=" + std::to_string(rc); diff --git a/sqlite3/sqlite3.h b/src/sqlite3.h similarity index 100% rename from sqlite3/sqlite3.h rename to src/sqlite3.h diff --git a/wallet.sln b/wallet.sln index 268ac46..45b6602 100644 --- a/wallet.sln +++ b/wallet.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.32014.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wallet", "wallet.vcxproj", "{B1EC18D5-FA70-4A59-8CAE-EDC65A358314}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wallet", "msvc/wallet.vcxproj", "{B1EC18D5-FA70-4A59-8CAE-EDC65A358314}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2F7D488C-DC53-4ECE-87E2-4FEA32C153EF}" EndProject From d17bca2afb20984bc1159bf9c1d2700f8907a266 Mon Sep 17 00:00:00 2001 From: Cheng Date: Fri, 1 Jul 2022 09:58:59 +1000 Subject: [PATCH 7/9] default check everything is too damned slow --- .gitconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitconfig b/.gitconfig index 46ee228..0b6dbaa 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,7 +11,4 @@ alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ / | grep -v ^'alias ' | sort [commit] gpgSign = true -[submodule] - active = * - recurse = true From f4b761bed6a7b2f9f9f6a797a1ba192f6fa5219a Mon Sep 17 00:00:00 2001 From: Cheng Date: Sun, 3 Jul 2022 07:32:12 +1000 Subject: [PATCH 8/9] finally updated the .gitmodules files to reflect the the remote repo move --- .gitmodules | 6 +++--- wxWidgets | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index d7903af..61e9099 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "libsodium"] path = libsodium - url = cpal.pw:~/libsodium.git + url = git@rho.la:~/libsodium.git [submodule "mpir"] path = mpir - url = cpal.pw:~/mpir.git + url = git@rho.la:~/mpir.git [submodule "wxWidgets"] path = wxWidgets - url = cpal.pw:~/wxWidgets.git + url = git@rho.la:~/wxWidgets.git diff --git a/wxWidgets b/wxWidgets index 270d386..5beff53 160000 --- a/wxWidgets +++ b/wxWidgets @@ -1 +1 @@ -Subproject commit 270d38601df59429710dda66832d8d91e3701296 +Subproject commit 5beff5392a2a760ef38a3a25b51db57c004a32cb From 9210e8cdafb3fe674cabd8b78b462ba14bbc9f58 Mon Sep 17 00:00:00 2001 From: Cheng Date: Sun, 3 Jul 2022 08:53:53 +1000 Subject: [PATCH 9/9] Documented the painful process of moving a remote repository --- .gitmodules | 3 +++ docs/libraries.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- wxWidgets | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 61e9099..b632f5a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,12 @@ [submodule "libsodium"] path = libsodium url = git@rho.la:~/libsodium.git + branch = rho-fork [submodule "mpir"] path = mpir url = git@rho.la:~/mpir.git + branch = rho-fork [submodule "wxWidgets"] path = wxWidgets url = git@rho.la:~/wxWidgets.git + branch = rho-fork \ No newline at end of file diff --git a/docs/libraries.md b/docs/libraries.md index 815fdd4..6636e93 100644 --- a/docs/libraries.md +++ b/docs/libraries.md @@ -112,8 +112,51 @@ the submodule has to be in detached head mode, with the head pointing directly to a commit, rather than pointing to a branch that points to a commit. +You will import a submodule from someone else's project, but eventually you and your team are going to make minor changes to it to customize it to your project. In which case you will need your own remote team repo, in place of the original other team's repo. + +Construct the copied remote repositories so that their default branch is your tracking branch, not the upstream branch. + +``` bash +git init --bare -b «our_branch» +``` + +Then, in your local repository where you created the new branch, reset +the remote in your local repository to the new remote by editing `.gitconfig` +and push «our_branch» from your local in which you created your team's new +submodule branch to the remote. + +or +``` bash +git clone --bare «their_remote» -b«their_stable_branch_or_release_tag» +cd «our_new_remote» +git symbolic-ref HEAD refs/heads/«our_new_branch» +``` + +If you fail to set your remote to your team's default branch, then your +local repositories will keep getting reset back to their team's branch, and +chaos ensues. + + +When moving the remote of a submodule in your local repository (usually from their team's remote to your team's remote) you update `.gitmodules` in your superproject, and in each submodule that has submodules of its own, then + +```bash +git submodule update --init --recursive --force +git submodule foreach --recursive 'git status && git switch «our_branch» && git status && git remote -v && git switch --detach' +``` + +Your submodule remotes propagate from `.gitmodules` file of your superproject, and their branch propagates from the superproject *and* from the remote default branch. + +And the branch will *also* propagate from `.gitmodules` if `branch = ...` is set. + +Because git is a distributed archive, it is perfectly possible, and often +necessary, to work with all these set to different values, *provided* that +everyone is mindful that they are set to different values, and the +consequences and implications of them being set to different values. Which +consequences and implications get complicated, unobvious, difficult to +predict, and surprising when you are working with submodules. + Git commands in master project do not look inside the subproject. They -just look at the subproject's head. +just look at the subprojects head. This means that signing off on changes to a submodule is irrelevant. One signs off on the master project, which includes the hash of that submodule diff --git a/wxWidgets b/wxWidgets index 5beff53..a8e46b7 160000 --- a/wxWidgets +++ b/wxWidgets @@ -1 +1 @@ -Subproject commit 5beff5392a2a760ef38a3a25b51db57c004a32cb +Subproject commit a8e46b7fdd0c3554bb4a55d729415c91c59d4cba