Skip to content

Commit 587a9e4

Browse files
committed
GO-4389 Merge branch 'main' of github.com:anyproto/anytype-heart into go-4389-do-not-create-entry-space-for-new-users
# Conflicts: # core/block/editor/accountobject/accountobject.go
2 parents fb647b7 + 08bb178 commit 587a9e4

File tree

145 files changed

+8903
-5098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+8903
-5098
lines changed

.github/install_macos_sdk.sh

-22
This file was deleted.

.github/workflows/build.yml

+7-15
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ jobs:
6161
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 brew install grpcurl
6262
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 brew tap messense/macos-cross-toolchains && brew install x86_64-unknown-linux-musl
6363
npm i -g node-gyp
64-
echo "Azaza"
65-
protoc --version
66-
which x86_64-w64-mingw32-gcc
67-
which protoc
68-
echo "Azaza2"
6964
if: runner.name != 'mac-mini-org-heart'
7065
- name: Checkout
7166
uses: actions/checkout@v3
@@ -76,9 +71,6 @@ jobs:
7671
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
7772
restore-keys: |
7873
${{ runner.os }}-go-${{ matrix.go-version }}-
79-
- name: Install old MacOS SDK (for backward compatibility of CGO)
80-
run: source .github/install_macos_sdk.sh 10.15
81-
if: runner.name != 'mac-mini-org-heart'
8274
- name: Set env vars
8375
env:
8476
UNSPLASH_KEY: ${{ secrets.UNSPLASH_KEY }}
@@ -117,10 +109,10 @@ jobs:
117109
echo $FLAGS
118110
mkdir -p .release
119111
echo $SDKROOT
120-
GOOS="darwin" GOARCH="amd64" CGO_ENABLED="1" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector" -ldflags="$FLAGS" -o darwin-amd64 github.com/anyproto/anytype-heart/cmd/grpcserver
112+
GOOS="darwin" CGO_CFLAGS="-mmacosx-version-min=11" MACOSX_DEPLOYMENT_TARGET=11.0 GOARCH="amd64" CGO_ENABLED="1" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector" -ldflags="$FLAGS" -o darwin-amd64 github.com/anyproto/anytype-heart/cmd/grpcserver
121113
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
122114
echo $SDKROOT
123-
GOOS="darwin" GOARCH="arm64" CGO_ENABLED="1" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector" -ldflags="$FLAGS" -o darwin-arm64 github.com/anyproto/anytype-heart/cmd/grpcserver
115+
GOOS="darwin" CGO_CFLAGS="-mmacosx-version-min=11" MACOSX_DEPLOYMENT_TARGET=11.0 GOARCH="arm64" CGO_ENABLED="1" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector" -ldflags="$FLAGS" -o darwin-arm64 github.com/anyproto/anytype-heart/cmd/grpcserver
124116
GOOS="windows" GOARCH="amd64" CGO_ENABLED="1" CC="x86_64-w64-mingw32-gcc" CXX="x86_64-w64-mingw32-g++" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector noheic" -ldflags="$FLAGS -linkmode external -extldflags=-static" -o windows-amd64 github.com/anyproto/anytype-heart/cmd/grpcserver
125117
GOOS="linux" GOARCH="amd64" CGO_ENABLED="1" CC="x86_64-linux-musl-gcc" go build -tags="envproduction nographviz nowatchdog nosigar nomutexdeadlockdetector noheic" -ldflags="$FLAGS -linkmode external -extldflags '-static -Wl,-z stack-size=1000000'" -o linux-amd64 github.com/anyproto/anytype-heart/cmd/grpcserver
126118
ls -lha .
@@ -138,14 +130,14 @@ jobs:
138130
TEST_MNEMONIC: ${{ secrets.TEST_MNEMONIC }}
139131
PROM_KEY: ${{ secrets.PROMETHEUS_USERNAME }}
140132
PROM_PASSWORD: ${{ secrets.PROMETHEUS_PASSWORD }}
141-
if: github.event.inputs.perf-test != '0'
133+
if: github.event.inputs.perf-test != '0' || github.event_name == 'schedule'
142134
- name: Archive perf tests results
143135
uses: actions/upload-artifact@v4
144136
with:
145137
name: pprofs
146138
path: |
147139
*.pprof
148-
if: github.event.inputs.perf-test != '0'
140+
if: github.event.inputs.perf-test != '0' || github.event_name == 'schedule'
149141
- name: end run perf tests
150142
run: |
151143
rm -rf *.pprof
@@ -154,7 +146,7 @@ jobs:
154146
gh run watch ${{ github.run_id }}
155147
env:
156148
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157-
if: github.event.inputs.perf-test != '0'
149+
if: github.event.inputs.perf-test != '0' || github.event_name == 'schedule'
158150
- name: Make JS protos
159151
run: |
160152
make protos-js
@@ -224,8 +216,8 @@ jobs:
224216
cp pkg/lib/bundle/internalTypes.json ./json
225217
- name: Compile ios lib
226218
run: |
227-
go install github.com/vektra/mockery/v2@v2.42.2
228-
go install go.uber.org/mock/mockgen@v0.3.0
219+
go install github.com/vektra/mockery/v2@v2.47.0
220+
go install go.uber.org/mock/mockgen@v0.5.0
229221
make test-deps
230222
gomobile bind -tags "envproduction nogrpcserver gomobile nowatchdog nosigar nomutexdeadlockdetector timetzdata rasterizesvg" -ldflags "$FLAGS" -v -target=ios -o Lib.xcframework github.com/anyproto/anytype-heart/clientlibrary/service github.com/anyproto/anytype-heart/core || true
231223
mkdir -p dist/ios/ && mv Lib.xcframework dist/ios/

.github/workflows/golangci-lint.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
run: go get ./...
3030
- name: golangci-lint
3131
uses: golangci/golangci-lint-action@v6
32+
env:
33+
GOEXPERIMENT: "rangefunc"
3234
with:
3335
skip-cache: true
3436
version: latest

.github/workflows/perftests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
echo "Running perf tests"
7676
RUN_COUNT=${{ github.event.inputs.perf-test }}
7777
if [[ "${{ github.event_name }}" == "schedule" ]]; then
78-
RUN_COUNT=100
78+
RUN_COUNT=10
7979
fi
8080
echo $PERF_CONFIG_STAGING > config.json
8181
mv .github/staging_fake.yml staging_fake.yml

.github/workflows/test.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
go-version: 1.22
2727
cache: false
28+
check-latest: true
2829
- name: git config
2930
run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/
3031
- name: Checkout code
@@ -49,11 +50,11 @@ jobs:
4950
cd ..
5051
gem install license_finder
5152
license_finder inherited_decisions add open/decisions.yml
52-
license_finder --enabled-package-managers gomodules
53+
GOEXPERIMENT=rangefunc license_finder --enabled-package-managers gomodules
5354
- name: Generate mocks
5455
run: |
5556
make download-tantivy-all
56-
go install go.uber.org/mock/mockgen@v0.3.0
57+
go install go.uber.org/mock/mockgen@v0.5.0
5758
CGO_ENABLED=1 CGO_CFLAGS="-Wno-deprecated-declarations -Wno-deprecated-non-prototype -Wno-xor-used-as-pow" go generate ./...
5859
- name: Go test
5960
env:
@@ -71,7 +72,7 @@ jobs:
7172
else
7273
echo "run without race detector"
7374
fi
74-
CGO_CFLAGS="-Wno-deprecated-non-prototype -Wno-unknown-warning-option -Wno-deprecated-declarations -Wno-xor-used-as-pow -Wno-single-bit-bitfield-constant-conversion" gotestsum --junitfile ~/gotestsum-report/gotestsum-report.xml -- -tags "nogrpcserver nographviz" -ldflags="-extldflags=-Wl,-ld_classic" -p 1 $(echo $PACKAGE_NAMES) $(echo $RACE) -coverprofile=coverage.out -covermode=atomic ./...
75+
GOEXPERIMENT=rangefunc CGO_CFLAGS="-Wno-deprecated-non-prototype -Wno-unknown-warning-option -Wno-deprecated-declarations -Wno-xor-used-as-pow -Wno-single-bit-bitfield-constant-conversion" gotestsum --junitfile ~/gotestsum-report/gotestsum-report.xml -- -tags "nogrpcserver nographviz" -p 1 $(echo $PACKAGE_NAMES) $(echo $RACE) -coverprofile=coverage.out -covermode=atomic ./...
7576
7677
generated_pattern='^\/\/ Code generated .* DO NOT EDIT\.$'
7778
files_list=$(grep -rl "$generated_pattern" . | grep '\.go$' | sed 's/^\.\///')
@@ -89,4 +90,4 @@ jobs:
8990
with:
9091
report_paths: '~/gotestsum-report/gotestsum-report.xml'
9192
github_token: ${{ secrets.GITHUB_TOKEN }}
92-
- uses: seriousben/go-patch-cover-action@v1
93+
- uses: seriousben/go-patch-cover-action@v1

.run/Run.run.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<configuration default="false" name="Run" type="GoApplicationRunConfiguration" factoryName="Go Application">
33
<module name="anytype-heart" />
44
<working_directory value="$PROJECT_DIR$" />
5-
<go_parameters value="-tags &quot;nomutexdeadlockdetector noauth nographviz&quot; -ldflags=&quot;-extldflags=-Wl,-ld_classic&quot;" />
5+
<go_parameters value="-tags &quot;nomutexdeadlockdetector noauth nographviz&quot;" />
66
<envs>
77
<env name="ANYDEBUG" value=":6061" />
88
<env name="ANYPROF" value=":6060" />
@@ -11,6 +11,7 @@
1111
<env name="ANYTYPE_GRPCWEB_ADDR" value="127.0.0.1:31008" />
1212
<env name="CC" value="/usr/bin/cc" />
1313
<env name="CXX" value="/usr/bin/c++" />
14+
<env name="CGO_CFLAGS" value="-Wno-deprecated-declarations -Wno-deprecated-non-prototype -Wno-xor-used-as-pow" />
1415
</envs>
1516
<EXTENSION ID="net.ashald.envfile">
1617
<option name="IS_ENABLED" value="false" />

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Anytype Heart
22
Middleware library for Anytype, distributed as part of the Anytype clients.
33

4-
## ⚠️ Important notice
5-
Due to the any-sync protocol update and the upcoming release, the current Anytype production network is not compatible with the anytype-heart main branch. This is expected to remain the case until October 23, 10:00 UTC. You can use the [v0.35.7 release](https://github.com/anyproto/anytype-heart/releases/tag/v0.35.7)
6-
74
## Docs
85
- [Build instructions](docs/Build.md)
96
- [Protobuf generation](docs/Protogen.md)

0 commit comments

Comments
 (0)