Giter Site home page Giter Site logo

gx support ( for IPFS ) about xgo HOT 4 CLOSED

karalabe avatar karalabe commented on August 26, 2024
gx support ( for IPFS )

from xgo.

Comments (4)

karalabe avatar karalabe commented on August 26, 2024 2

@lgierth @ligi If you specify a full import path, xgo will try to download it and all deps from the internet. The reason behind this decision was to allow reproducible builds that are not sensitive on some local dependency having a different version, causing weird failures.

However, xgo does have support for building local stuff, but it has to be pointed to it using a relative or absolute path, not an import path.

If the path is not a canonical import path, but rather a local path (starts with a dot . or a dash /), xgo will use the local GOPATH contents for the cross compilation.

$ mkdir /tmp/workspace
$ cd /tmp/workspace/
$ export GOPATH=/tmp/workspace/
$ export PATH=$GOPATH/bin:$PATH
$ go get -d github.com/ipfs/go-ipfs
$ cd $GOPATH/src/github.com/ipfs/go-ipfs
$ make toolkit_upgrade
$ make deps
$ xgo --targets=android-23/* ./cmd/ipfs
$ ls -al
-rwxr-xr-x  1 root     root     27820792 May  3 14:43 ipfs-android-23-386
drwxr-xr-x  3 root     root         4096 May  3 14:44 ipfs-android-23-aar
-rwxr-xr-x  1 root     root     27458756 May  3 14:42 ipfs-android-23-arm
-rwxr-xr-x  1 root     root     36925472 May  3 14:44 ipfs-android-23-arm64

from xgo.

 avatar commented on August 26, 2024

@ligi did you make deps?

@karalabe I'm wildly guessing because I've never used xgo -- does it respect GOPATH? The output looks like it downloads its own copy of the package(s), which breaks gx's non-go-get package management.

@whyrusleeping have a look -- this might be solved by gx-go rewrite --undo.

from xgo.

ligi avatar ligi commented on August 26, 2024

@karalabe thanks for the info & your work! Closing this issue then as this seems to be a feature and no bug

from xgo.

 avatar commented on August 26, 2024

Ah yes that makes a lot of sense, thanks @karalabe

from xgo.

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.