FWIW Git submodules are useful for external dependencies to projects that evolve independently. For example say that Lazarus' FP-GUI widgetset manages to become usable again, it could use a submodule to track the last known working commit in the FP-GUI repository to make it a subdirectory under the FP-GUI LCL widgetset that the widgetset can use directly -- then if you break the FP-GUI API, it wont affect the FP-GUI widgetset because when people check out the Lazarus source code, they'll still get the commit that was deemed 'working'. This way the two projects can continue evolving independently without having to worry about imposed work from backward incompatible changes (at least not immediately, which is important for something that may not see much developer support for months if not years).

The annoying part of submodules is that they are *too* manual, e.g. if you change branch/HEAD/whatever it doesn't update things automatically to point to the "proper" references and you have to do things by hand. As usual, Git has an awful UX.

Of course this isn't the only way to solve this, e.g. subtrees or plain old "just copy the files over" will do the trick (AFAIK subtrees are basically automating that).

Kostas

On 4/10/26 5:42 PM, Graeme Geldenhuys via fpc-devel wrote:
Fully agree I tried them too. They are terrible!
G.


On 7 April 2026 11:16:31 BST, Juha Manninen via fpc-devel <fpc- [email protected]> wrote:

    Marco van de Voort via fpc-devel kirjoitti 7.4.2026 klo 11.41:

          Florian already mentioned the submodule problems.


    Years ago when studying Git, I tried to understand submodules. I did
    not find any valid use case for them. They were somehow weird in
    every situation. I don't remember details but partly for that reason
    I never used them myself.

    Get rid of submodules in FPC sources and those problems go away.


    Juha
    ------------------------------------------------------------------------
    fpc-devel maillist - [email protected]
    https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
    <https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel>


_______________________________________________
fpc-devel maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to