Giter VIP home page Giter VIP logo

Comments (8)

triska avatar triska commented on June 8, 2024

This is a great find, many thanks for looking into this!

from swipl-devel.

wvxvw avatar wvxvw commented on June 8, 2024

Oh, sure, glad I could help!

from swipl-devel.

JanWielemaker avatar JanWielemaker commented on June 8, 2024

Yes, but using relative repositories you get the proper git:// or https:// and you can move the whole tree
somewhere else. If you clone from the origin, all should work just fine. If you temperately want to
work with other local checked out version use git remote add ... to communicate. Its what I'm doing
with all the copies I've floating around and it works fine.

from swipl-devel.

wvxvw avatar wvxvw commented on June 8, 2024

@JanWielemaker what version of Git are you using? Git 2.1.0 doesn't work the way you describe. If you don't specify the full URL in .gitmodules, then it'll be resolved locally. Meaning you would have to manually create the directories for each submodule and clone them one by one (this is what prepare script was aiming to automate), but it didn't really work well because it choked on top-level directories such as bench and debian.

PS. I'm not exactly sure about what do you mean by cloning from origin, would you want to elaborate on that?

from swipl-devel.

wvxvw avatar wvxvw commented on June 8, 2024

Sorry, I take back what I wrote. This seems to be a problem with Git. If you first init a repository, then add remote, then update submodules you get this:

$ ./configure --with-world
The following submodules are not yet initialised
   bench
   packages/PDT
   packages/RDF
   packages/archive
   packages/bdb
   packages/chr
   packages/clib
   packages/clpqr
   packages/cpp
   packages/cql
   packages/http
   packages/inclpr
   packages/jpl
   packages/nlp
   packages/odbc
   packages/pengines
   packages/pldoc
   packages/plunit
   packages/protobufs
   packages/semweb
   packages/sgml
   packages/ssl
   packages/swipl-win
   packages/table
   packages/tipc
   packages/utf8proc
   packages/windows
   packages/xpce
   packages/zlib
Do you want me to run git submodule update --init? y
Submodule 'bench' (/home/wvxvw/Projects/bench.git) registered for path 'bench'
Submodule 'packages/PDT' (/home/wvxvw/Projects/packages-PDT.git) registered for path 'packages/PDT'
Submodule 'packages/RDF' (/home/wvxvw/Projects/packages-RDF.git) registered for path 'packages/RDF'
<...snip...>
Submodule 'packages/xpce' (/home/wvxvw/Projects/packages-xpce.git) registered for path 'packages/xpce'
Submodule 'packages/zlib' (/home/wvxvw/Projects/packages-zlib.git) registered for path 'packages/zlib'
fatal: repository '/home/wvxvw/Projects/bench.git' does not exist
Clone of '/home/wvxvw/Projects/bench.git' into submodule path 'bench' failed
All submodules are up-to-date

Could not find documentation.  What do you want to do?

    1) Download and unpack documentation from http://www.swi-prolog.org
       and do this again automatically next time
    2) Download and unpack documentation from http://www.swi-prolog.org
       and ask next time
    3) Warn only

Option? 1

But if you first clone then execute configuration script.

$ ./configure --with-world
The following submodules are not yet initialised
   bench
   packages/PDT
   packages/RDF
   packages/archive
   packages/bdb
   packages/chr
   packages/clib
   packages/clpqr
   packages/cpp
   packages/cql
   packages/http
   packages/inclpr
   packages/jpl
   packages/nlp
   packages/odbc
   packages/pengines
   packages/pldoc
   packages/plunit
   packages/protobufs
   packages/semweb
   packages/sgml
   packages/ssl
   packages/swipl-win
   packages/table
   packages/tipc
   packages/utf8proc
   packages/windows
   packages/xpce
   packages/zlib
Do you want me to run git submodule update --init? y
Submodule 'bench' (https://github.com/SWI-Prolog/bench.git) registered for path 'bench'
Submodule 'packages/PDT' (https://github.com/SWI-Prolog/packages-PDT.git) registered for path 'packages/PDT'
Submodule 'packages/RDF' (https://github.com/SWI-Prolog/packages-RDF.git) registered for path 'packages/RDF'
<...snip...>
Submodule 'packages/xpce' (https://github.com/SWI-Prolog/packages-xpce.git) registered for path 'packages/xpce'
Submodule 'packages/zlib' (https://github.com/SWI-Prolog/packages-zlib.git) registered for path 'packages/zlib'
Cloning into 'bench'...
remote: Counting objects: 231, done.        
remote: Total 231 (delta 0), reused 0 (delta 0), pack-reused 231        
Receiving objects: 100% (231/231), 159.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (43/43), done.
Checking connectivity... done.
Submodule path 'bench': checked out 'a578ff795bbdf7ff5215da8db23c8986bbd69f0d'
Cloning into 'packages/PDT'...
<...snip...>

And I have no idea why.

from swipl-devel.

JanWielemaker avatar JanWielemaker commented on June 8, 2024

I'm a bit lost. I thought you were trying to install from some local clone of the main git. If you
clone https://github.com/SWI-Prolog/swipl-devel.git, just running ./prepare should do the trick.
It doesn't only get the submodules (basically simply using git submodule update --init, but with
specified modules as not all of them are needed for a typical installation). It also fetches the
documentation and runs autoconf where needed. I currently use Ubuntu 14.04, which ships with
git 1.9.1. If relative URLs no longer work I assume this is a bug in git unless explicitly documented
otherwise in the git documentation.

from swipl-devel.

wvxvw avatar wvxvw commented on June 8, 2024

Sorry my comments were a bit confusing. I'll try to explain. Typically, I use Magit, which is an Emacs mode for interacting with Git. Thus, instead of directly cloning the repository, I do this:

  1. Init empty repository.
  2. Add remote.
  3. Fetch remote.
  4. Checkout master.
  5. Merge.

I also tend to give more meaningful names to remotes, for example "github" instead of "origin". What I did in the first instance thus is:

git init .
git remote add -f github https://github.com/SWI-Prolog/swipl-devel.git
Updating github
remote: Total 157692 (delta 253), reused 375 (delta 200), pack-reused 157198        
Receiving objects: 100% (157692/157692), 66.70 MiB | 657.00 KiB/s, done.
Resolving deltas: 100% (127642/127642), done.
From https://github.com/SWI-Prolog/swipl-devel
<...snip...>
git pull github master

In the second instance I did this:

git clone https://github.com/SWI-Prolog/swipl-devel.git .

It seems like if remote is given a name other than the default "origin", modules won't be resolved against it. But I'm too tired now to try to find out whether that's the actual reason.

from swipl-devel.

JanWielemaker avatar JanWielemaker commented on June 8, 2024

Seems a non-standard setup to me which breaks relative submodules. I consider the overall benefits of relative paths to valuable though. Sorry.

from swipl-devel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.