Skip to content

Commit

Permalink
chore: migrate go-libipfs to boxo
Browse files Browse the repository at this point in the history
Resolves #9677, #9676, #9675, #9736
  • Loading branch information
Jorropo committed Mar 29, 2023
1 parent 7d69e5d commit f592db7
Show file tree
Hide file tree
Showing 107 changed files with 554 additions and 1,713 deletions.
6 changes: 3 additions & 3 deletions assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"

options "github.com/ipfs/boxo/coreiface/options"
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/files"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-libipfs/files"
options "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"
)

//go:embed init-doc
Expand Down
4 changes: 2 additions & 2 deletions blocks/blockstoreutil/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"fmt"

bs "github.com/ipfs/boxo/blockstore"
pin "github.com/ipfs/boxo/pinning/pinner"
cid "github.com/ipfs/go-cid"
bs "github.com/ipfs/go-ipfs-blockstore"
pin "github.com/ipfs/go-ipfs-pinner"
format "github.com/ipfs/go-ipld-format"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/ipfs/add_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"
"path/filepath"

"github.com/ipfs/go-libipfs/files"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
ipath "github.com/ipfs/interface-go-ipfs-core/path"
coreiface "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/boxo/coreiface/options"
ipath "github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/files"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
"github.com/ipfs/kubo/repo/fsrepo/migrations"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
pnet "github.com/libp2p/go-libp2p/core/pnet"
sockets "github.com/libp2p/go-socket-activation"

options "github.com/ipfs/boxo/coreiface/options"
cmds "github.com/ipfs/go-ipfs-cmds"
mprome "github.com/ipfs/go-metrics-prometheus"
options "github.com/ipfs/interface-go-ipfs-core/options"
goprocess "github.com/jbenet/goprocess"
ma "github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
Expand Down
8 changes: 4 additions & 4 deletions cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import (
"path/filepath"
"strings"

path "github.com/ipfs/go-path"
unixfs "github.com/ipfs/go-unixfs"
unixfs "github.com/ipfs/boxo/ipld/unixfs"
path "github.com/ipfs/boxo/path"
assets "github.com/ipfs/kubo/assets"
oldcmds "github.com/ipfs/kubo/commands"
core "github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/commands"
fsrepo "github.com/ipfs/kubo/repo/fsrepo"

options "github.com/ipfs/boxo/coreiface/options"
"github.com/ipfs/boxo/files"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-libipfs/files"
options "github.com/ipfs/interface-go-ipfs-core/options"
config "github.com/ipfs/kubo/config"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"time"

"github.com/google/uuid"
u "github.com/ipfs/boxo/util"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs-cmds/cli"
cmdhttp "github.com/ipfs/go-ipfs-cmds/http"
u "github.com/ipfs/go-ipfs-util"
logging "github.com/ipfs/go-log"
"github.com/ipfs/kubo/cmd/ipfs/util"
oldcmds "github.com/ipfs/kubo/commands"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/pinmfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/libp2p/go-libp2p/core/host"
peer "github.com/libp2p/go-libp2p/core/peer"

pinclient "github.com/ipfs/boxo/pinning/remote/client"
cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
pinclient "github.com/ipfs/go-pinning-service-http-client"

config "github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/pinmfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

merkledag "github.com/ipfs/boxo/ipld/merkledag"
ipld "github.com/ipfs/go-ipld-format"
merkledag "github.com/ipfs/go-merkledag"
config "github.com/ipfs/kubo/config"
"github.com/libp2p/go-libp2p/core/host"
peer "github.com/libp2p/go-libp2p/core/peer"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfswatch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
fsrepo "github.com/ipfs/kubo/repo/fsrepo"

fsnotify "github.com/fsnotify/fsnotify"
"github.com/ipfs/go-libipfs/files"
"github.com/ipfs/boxo/files"
process "github.com/jbenet/goprocess"
homedir "github.com/mitchellh/go-homedir"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
coreapi "github.com/ipfs/kubo/core/coreapi"
loader "github.com/ipfs/kubo/plugin/loader"

coreiface "github.com/ipfs/boxo/coreiface"
options "github.com/ipfs/boxo/coreiface/options"
cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
coreiface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
config "github.com/ipfs/kubo/config"
)

Expand Down
2 changes: 1 addition & 1 deletion config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"time"

"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/boxo/coreiface/options"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"
)
Expand Down
2 changes: 1 addition & 1 deletion config/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/boxo/coreiface/options"
crypto_pb "github.com/libp2p/go-libp2p/core/crypto/pb"
)

Expand Down
8 changes: 4 additions & 4 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"github.com/ipfs/kubo/core/commands/cmdenv"

"github.com/cheggaaa/pb"
coreiface "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/boxo/coreiface/options"
"github.com/ipfs/boxo/files"
mfs "github.com/ipfs/boxo/mfs"
cmds "github.com/ipfs/go-ipfs-cmds"
ipld "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-libipfs/files"
mfs "github.com/ipfs/go-mfs"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
mh "github.com/multiformats/go-multihash"
)

Expand Down
4 changes: 2 additions & 2 deletions core/commands/bitswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
e "github.com/ipfs/kubo/core/commands/e"

humanize "github.com/dustin/go-humanize"
bitswap "github.com/ipfs/boxo/bitswap"
"github.com/ipfs/boxo/bitswap/server"
cidutil "github.com/ipfs/go-cidutil"
cmds "github.com/ipfs/go-ipfs-cmds"
bitswap "github.com/ipfs/go-libipfs/bitswap"
"github.com/ipfs/go-libipfs/bitswap/server"
peer "github.com/libp2p/go-libp2p/core/peer"
)

Expand Down
6 changes: 3 additions & 3 deletions core/commands/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"io"
"os"

"github.com/ipfs/go-libipfs/files"
"github.com/ipfs/boxo/files"

cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"

options "github.com/ipfs/boxo/coreiface/options"
path "github.com/ipfs/boxo/coreiface/path"
cmds "github.com/ipfs/go-ipfs-cmds"
options "github.com/ipfs/interface-go-ipfs-core/options"
path "github.com/ipfs/interface-go-ipfs-core/path"
mh "github.com/multiformats/go-multihash"
)

Expand Down
6 changes: 3 additions & 3 deletions core/commands/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/ipfs/kubo/core/commands/cmdenv"

"github.com/cheggaaa/pb"
iface "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/files"
cmds "github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-libipfs/files"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/path"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/commands/cid.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"strings"
"unicode"

verifcid "github.com/ipfs/boxo/verifcid"
cid "github.com/ipfs/go-cid"
cidutil "github.com/ipfs/go-cidutil"
cmds "github.com/ipfs/go-ipfs-cmds"
verifcid "github.com/ipfs/go-verifcid"
ipldmulticodec "github.com/ipld/go-ipld-prime/multicodec"
mbase "github.com/multiformats/go-multibase"
mc "github.com/multiformats/go-multicodec"
Expand Down
4 changes: 2 additions & 2 deletions core/commands/cmdenv/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/ipfs/kubo/commands"
"github.com/ipfs/kubo/core"

coreiface "github.com/ipfs/boxo/coreiface"
options "github.com/ipfs/boxo/coreiface/options"
cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
coreiface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
)

var log = logging.Logger("core/commands/cmdenv")
Expand Down
2 changes: 1 addition & 1 deletion core/commands/cmdenv/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmdenv
import (
"fmt"

"github.com/ipfs/go-libipfs/files"
"github.com/ipfs/boxo/files"
)

// GetFileArg returns the next file from the directory or an error
Expand Down
2 changes: 1 addition & 1 deletion core/commands/cmdutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

cmds "github.com/ipfs/go-ipfs-cmds"

coreiface "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/go-cid"
coreiface "github.com/ipfs/interface-go-ipfs-core"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"

ipfspath "github.com/ipfs/boxo/path"
cid "github.com/ipfs/go-cid"
cidenc "github.com/ipfs/go-cidutil/cidenc"
cmds "github.com/ipfs/go-ipfs-cmds"
ipfspath "github.com/ipfs/go-path"
//gipfree "github.com/ipld/go-ipld-prime/impl/free"
//gipselector "github.com/ipld/go-ipld-prime/traversal/selector"
//gipselectorbuilder "github.com/ipld/go-ipld-prime/traversal/selector/builder"
Expand Down
6 changes: 3 additions & 3 deletions core/commands/dag/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"time"

"github.com/cheggaaa/pb"
iface "github.com/ipfs/boxo/coreiface"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
blocks "github.com/ipfs/go-libipfs/blocks"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/kubo/core/commands/cmdenv"

gocar "github.com/ipfs/boxo/ipld/car"
cmds "github.com/ipfs/go-ipfs-cmds"
gocar "github.com/ipld/go-car"
selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse"
)

Expand Down
2 changes: 1 addition & 1 deletion core/commands/dag/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"io"

"github.com/ipfs/boxo/coreiface/path"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/kubo/core/commands/cmdenv"

"github.com/ipld/go-ipld-prime"
Expand Down
6 changes: 3 additions & 3 deletions core/commands/dag/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"errors"
"io"

"github.com/ipfs/boxo/coreiface/options"
"github.com/ipfs/boxo/files"
gocarv2 "github.com/ipfs/boxo/ipld/car/v2"
cid "github.com/ipfs/go-cid"
cmds "github.com/ipfs/go-ipfs-cmds"
ipld "github.com/ipfs/go-ipld-format"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
"github.com/ipfs/go-libipfs/files"
"github.com/ipfs/interface-go-ipfs-core/options"
gocarv2 "github.com/ipld/go-car/v2"

"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
Expand Down
4 changes: 2 additions & 2 deletions core/commands/dag/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import (
"bytes"
"fmt"

blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipldlegacy "github.com/ipfs/go-ipld-legacy"
blocks "github.com/ipfs/go-libipfs/blocks"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/cmdutils"
"github.com/ipld/go-ipld-prime/multicodec"
basicnode "github.com/ipld/go-ipld-prime/node/basic"

"github.com/ipfs/boxo/files"
cmds "github.com/ipfs/go-ipfs-cmds"
ipld "github.com/ipfs/go-ipld-format"
"github.com/ipfs/go-libipfs/files"
mc "github.com/multiformats/go-multicodec"

// Expected minimal set of available format/ienc codecs.
Expand Down
2 changes: 1 addition & 1 deletion core/commands/dag/resolve.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dagcmd

import (
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/kubo/core/commands/cmdenv"

cmds "github.com/ipfs/go-ipfs-cmds"
Expand Down
6 changes: 3 additions & 3 deletions core/commands/dag/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"io"
"os"

"github.com/ipfs/go-merkledag/traverse"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/ipld/merkledag/traverse"
"github.com/ipfs/kubo/core/commands/cmdenv"
"github.com/ipfs/kubo/core/commands/e"

mdag "github.com/ipfs/boxo/ipld/merkledag"
cmds "github.com/ipfs/go-ipfs-cmds"
mdag "github.com/ipfs/go-merkledag"
)

func dagStat(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
Expand Down
4 changes: 2 additions & 2 deletions core/commands/dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package commands
import (
"testing"

"github.com/ipfs/go-namesys"
"github.com/ipfs/boxo/namesys"

ipns "github.com/ipfs/go-ipns"
ipns "github.com/ipfs/boxo/ipns"
"github.com/libp2p/go-libp2p/core/test"
)

Expand Down
4 changes: 2 additions & 2 deletions core/commands/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"io"

namesys "github.com/ipfs/go-namesys"
nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
nsopts "github.com/ipfs/boxo/coreiface/options/namesys"
namesys "github.com/ipfs/boxo/namesys"
cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
ncmd "github.com/ipfs/kubo/core/commands/name"

Expand Down
Loading

0 comments on commit f592db7

Please sign in to comment.