Skip to content

Commit ca08708

Browse files
authored
Merge pull request #2625 from anyproto/GO-5601-update-any-sync
GO-5601 update any sync
2 parents 201b95c + c92bcd2 commit ca08708

File tree

4 files changed

+77
-70
lines changed

4 files changed

+77
-70
lines changed

core/files/files.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,13 @@ func (s *service) newExistingFileResult(lock *sync.Mutex, fileId domain.FileId,
206206
func (s *service) addFileRootNode(ctx context.Context, spaceID string, fileInfo *storage.FileInfo, fileNode ipld.Node) (ipld.Node, *storage.FileKeys, error) {
207207
dagService := s.dagServiceForSpace(spaceID)
208208
keys := &storage.FileKeys{KeysByPath: make(map[string]string)}
209-
outer := uio.NewDirectory(dagService)
209+
outer, err := uio.NewDirectory(dagService)
210+
if err != nil {
211+
return nil, nil, err
212+
}
210213
outer.SetCidBuilder(cidBuilder)
211214

212-
err := helpers.AddLinkToDirectory(ctx, dagService, outer, schema.LinkFile, fileNode.Cid().String())
215+
err = helpers.AddLinkToDirectory(ctx, dagService, outer, schema.LinkFile, fileNode.Cid().String())
213216
if err != nil {
214217
return nil, nil, err
215218
}
@@ -441,14 +444,17 @@ func getOrGenerateSymmetricKey(linkName string, opts AddOptions) (symmetric.Key,
441444
*/
442445
func (s *service) addFilePairNode(ctx context.Context, spaceID string, file *storage.FileInfo) (ipld.Node, error) {
443446
dagService := s.dagServiceForSpace(spaceID)
444-
pair := uio.NewDirectory(dagService)
447+
pair, err := uio.NewDirectory(dagService)
448+
if err != nil {
449+
return nil, err
450+
}
445451
pair.SetCidBuilder(cidBuilder)
446452

447453
if file.MetaHash == "" {
448454
return nil, fmt.Errorf("metaHash is empty")
449455
}
450456

451-
err := helpers.AddLinkToDirectory(ctx, dagService, pair, MetaLinkName, file.MetaHash)
457+
err = helpers.AddLinkToDirectory(ctx, dagService, pair, MetaLinkName, file.MetaHash)
452458
if err != nil {
453459
return nil, fmt.Errorf("add meta link: %w", err)
454460
}

core/files/images.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,16 @@ func (s *service) addImageRootNode(ctx context.Context, spaceID string, dirEntri
153153
dagService := s.dagServiceForSpace(spaceID)
154154
keys := &storage.FileKeys{KeysByPath: make(map[string]string)}
155155

156-
outer := uio.NewDirectory(dagService)
156+
outer, err := uio.NewDirectory(dagService)
157+
if err != nil {
158+
return nil, nil, err
159+
}
157160
outer.SetCidBuilder(cidBuilder)
158161

159-
inner := uio.NewDirectory(dagService)
162+
inner, err := uio.NewDirectory(dagService)
163+
if err != nil {
164+
return nil, nil, err
165+
}
160166
inner.SetCidBuilder(cidBuilder)
161167

162168
for _, entry := range dirEntries {

go.mod

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/anyproto/anytype-heart
22

3-
go 1.23.8
3+
go 1.23.10
44

5-
toolchain go1.23.11
5+
toolchain go1.24.0
66

77
require (
88
github.com/JohannesKaufmann/html-to-markdown v1.4.0
99
github.com/PuerkitoBio/goquery v1.10.2
1010
github.com/VividCortex/ewma v1.2.0
1111
github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786
1212
github.com/anyproto/any-store v0.3.3
13-
github.com/anyproto/any-sync v0.9.2
13+
github.com/anyproto/any-sync v0.9.6
1414
github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250716122732-cdcfe3a126bb
1515
github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250801122506-553f6c085a23
1616
github.com/anyproto/go-chash v0.1.0
@@ -30,7 +30,7 @@ require (
3030
github.com/dsoprea/go-exif/v3 v3.0.1
3131
github.com/dsoprea/go-jpeg-image-structure/v2 v2.0.0-20221012074422-4f3f7e934102
3232
github.com/ethereum/go-ethereum v1.13.15
33-
github.com/gabriel-vasile/mimetype v1.4.8
33+
github.com/gabriel-vasile/mimetype v1.4.9
3434
github.com/gin-gonic/gin v1.10.0
3535
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
3636
github.com/go-chi/chi/v5 v5.2.1
@@ -55,12 +55,12 @@ require (
5555
github.com/huandu/skiplist v1.2.1
5656
github.com/iancoleman/strcase v0.3.0
5757
github.com/improbable-eng/grpc-web v0.15.0
58-
github.com/ipfs/boxo v0.29.1
59-
github.com/ipfs/go-block-format v0.2.0
58+
github.com/ipfs/boxo v0.33.1
59+
github.com/ipfs/go-block-format v0.2.2
6060
github.com/ipfs/go-cid v0.5.0
6161
github.com/ipfs/go-datastore v0.8.2
6262
github.com/ipfs/go-ds-flatfs v0.5.5
63-
github.com/ipfs/go-ipld-format v0.6.0
63+
github.com/ipfs/go-ipld-format v0.6.2
6464
github.com/ipfs/go-log v1.0.5
6565
github.com/joho/godotenv v1.5.1
6666
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25
@@ -85,7 +85,7 @@ require (
8585
github.com/otiai10/copy v1.14.1
8686
github.com/otiai10/opengraph/v2 v2.1.0
8787
github.com/pkg/errors v0.9.1
88-
github.com/prometheus/client_golang v1.22.0
88+
github.com/prometheus/client_golang v1.23.0
8989
github.com/pseudomuto/protoc-gen-doc v1.5.1
9090
github.com/quic-go/quic-go v0.54.0
9191
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
@@ -114,7 +114,7 @@ require (
114114
golang.org/x/oauth2 v0.30.0
115115
golang.org/x/sys v0.34.0
116116
golang.org/x/text v0.27.0
117-
google.golang.org/grpc v1.71.0
117+
google.golang.org/grpc v1.73.0
118118
google.golang.org/protobuf v1.36.6
119119
gopkg.in/Graylog2/go-gelf.v2 v2.0.0-20180125164251-1832d8546a9f
120120
gopkg.in/natefinch/lumberjack.v2 v2.2.1
@@ -168,7 +168,7 @@ require (
168168
github.com/gammazero/deque v1.0.0 // indirect
169169
github.com/gin-contrib/sse v0.1.0 // indirect
170170
github.com/go-errors/errors v1.4.2 // indirect
171-
github.com/go-logr/logr v1.4.2 // indirect
171+
github.com/go-logr/logr v1.4.3 // indirect
172172
github.com/go-logr/stdr v1.2.2 // indirect
173173
github.com/go-ole/go-ole v1.3.0 // indirect
174174
github.com/go-openapi/jsonpointer v0.19.6 // indirect
@@ -201,11 +201,10 @@ require (
201201
github.com/inconshreveable/mousetrap v1.1.0 // indirect
202202
github.com/ipfs/bbloom v0.0.4 // indirect
203203
github.com/ipfs/go-bitfield v1.1.0 // indirect
204-
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
205-
github.com/ipfs/go-ipld-legacy v0.2.1 // indirect
204+
github.com/ipfs/go-ipld-legacy v0.2.2 // indirect
206205
github.com/ipfs/go-log/v2 v2.6.0 // indirect
207206
github.com/ipfs/go-metrics-interface v0.3.0 // indirect
208-
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
207+
github.com/ipld/go-codec-dagpb v1.7.0 // indirect
209208
github.com/ipld/go-ipld-prime v0.21.0 // indirect
210209
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
211210
github.com/jinzhu/copier v0.3.5 // indirect
@@ -214,12 +213,12 @@ require (
214213
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
215214
github.com/leodido/go-urn v1.4.0 // indirect
216215
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
217-
github.com/libp2p/go-libp2p v0.42.0 // indirect
216+
github.com/libp2p/go-libp2p v0.42.1 // indirect
218217
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
219218
github.com/mailru/easyjson v0.7.7 // indirect
220219
github.com/mattn/go-colorable v0.1.13 // indirect
221220
github.com/mattn/go-isatty v0.0.20 // indirect
222-
github.com/miekg/dns v1.1.66 // indirect
221+
github.com/miekg/dns v1.1.67 // indirect
223222
github.com/minio/sha256-simd v1.0.1 // indirect
224223
github.com/mitchellh/copystructure v1.2.0 // indirect
225224
github.com/mitchellh/go-homedir v1.1.0 // indirect
@@ -274,18 +273,18 @@ require (
274273
github.com/zeebo/errs v1.4.0 // indirect
275274
go.opencensus.io v0.24.0 // indirect
276275
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
277-
go.opentelemetry.io/otel v1.34.0 // indirect
278-
go.opentelemetry.io/otel/metric v1.34.0 // indirect
279-
go.opentelemetry.io/otel/trace v1.34.0 // indirect
276+
go.opentelemetry.io/otel v1.37.0 // indirect
277+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
278+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
280279
golang.org/x/arch v0.8.0 // indirect
281280
golang.org/x/crypto v0.40.0 // indirect
282281
golang.org/x/mod v0.26.0 // indirect
283282
golang.org/x/sync v0.16.0 // indirect
284283
golang.org/x/term v0.33.0 // indirect
285284
golang.org/x/time v0.12.0 // indirect
286285
golang.org/x/tools v0.35.0 // indirect
287-
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
288-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
286+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
287+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
289288
gopkg.in/ini.v1 v1.67.0 // indirect
290289
gopkg.in/yaml.v2 v2.4.0 // indirect
291290
lukechampine.com/blake3 v1.4.1 // indirect

0 commit comments

Comments
 (0)