[GH-ISSUE #5044] [Bug] error compilation lock_database.get_collab from docker-compose at flowy-database2 #2244

Closed
opened 2026-03-23 21:20:53 +00:00 by mirror · 1 comment
Owner

Originally created by @mathben on GitHub (Apr 3, 2024).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5044

Bug Description

From docker-compose
After compiling flowy-server
got error «lock_database.get_collab»

91.36 error[E0599]: no method named get_collab found for struct parking_lot::lock_api::MutexGuard<'_, parking_lot::RawMutex, collab_database::database::Database> in the current scope
91.36 --> flowy-database2/src/manager.rs:245:52
91.36 |
91.36 245 | if let Some(lock_collab) = lock_database.get_collab().try_lock() {
91.36 | ^^^^^^^^^^ help: there is a method with a similar name: get_cell
91.36
92.67 For more information about this error, try rustc --explain E0599.
92.69 error: could not compile flowy-database2 (lib) due to previous error

EDIT 1 : works with tag 0.5.3

How to Reproduce

git clone git@github.com:AppFlowy-IO/AppFlowy.git
cd frontend/scripts/docker-buildfiles/

Expected Behavior

Fix error[E0599]: no method named get_collab found for struct parking_lot::lock_api::MutexGuard<'_, parking_lot::RawMutex, collab_database::database::Database> in the current scope

Works like version 0.5.3

Operating System

Ubuntu 20.04

AppFlowy Version(s)

main

Screenshots

=> [builder 21/25] RUN source ~/.cargo/env && cargo binstall duckscript_cli -y 2.4s
=> [builder 22/25] COPY . /appflowy 0.3s
=> [builder 23/25] RUN sudo chown -R makepkg: /appflowy 2.4s
=> [builder 24/25] WORKDIR /appflowy 0.0s
=> ERROR [builder 25/25] RUN cd frontend && source ~/.cargo/env && cargo make appflowy-flutter-deps-tools && cargo make flutter_clean && OPENSSL_STATIC=1 ZSTD_SYS_USE_PKG_CONFIG=1 ROCKS 117.4s

[builder 25/25] RUN cd frontend && source ~/.cargo/env && cargo make appflowy-flutter-deps-tools && cargo make flutter_clean && OPENSSL_STATIC=1 ZSTD_SYS_USE_PKG_CONFIG=1 ROCKSDB_LIB_DIR="/usr/lib/" cargo make -p production-linux-x86_64 appflowy-linux:
0.307 [cargo-make] INFO - cargo make 0.37.10
1.617 [cargo-make] INFO - Project: dart-ffi
1.617 [cargo-make] INFO - Build File: Makefile.toml
1.617 [cargo-make] INFO - Task: appflowy-flutter-deps-tools
1.617 [cargo-make] INFO - Profile: development
1.617 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=development" "--makefile" "/appflowy/frontend/Makefile.toml" "appflowy-flutter-deps-tools"
1.764 [cargo-make][1] INFO - Project: dart-ffi
1.764 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml
1.764 [cargo-make][1] INFO - Task: appflowy-flutter-deps-tools
1.764 [cargo-make][1] INFO - Profile: development
1.764 [cargo-make][1] INFO - Running Task: legacy-migration
1.767 [cargo-make][1] INFO - Running Task: install_targets
1.846 info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date
1.852 /home/makepkg/.pub-cache/bin/protoc-gen-dart
1.853 [cargo-make][1] INFO - Skipping Task: install_flutter_protobuf
1.853 [cargo-make][1] INFO - Build Done in 0.20 seconds.
1.854 [cargo-make] INFO - Build Done in 1.55 seconds.
1.888 [cargo-make] INFO - cargo make 0.37.10
1.991 [cargo-make] INFO - Project: dart-ffi
1.991 [cargo-make] INFO - Build File: Makefile.toml
1.991 [cargo-make] INFO - Task: flutter_clean
1.991 [cargo-make] INFO - Profile: development
1.991 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=development" "--makefile" "/appflowy/frontend/Makefile.toml" "flutter_clean"
2.128 [cargo-make][1] INFO - Project: dart-ffi
2.128 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml
2.128 [cargo-make][1] INFO - Task: flutter_clean
2.128 [cargo-make][1] INFO - Profile: development
2.128 [cargo-make][1] INFO - Running Task: legacy-migration
2.132 [cargo-make][1] INFO - Running Task: rust_lib_clean
2.234 [cargo-make][1] INFO - Running Task: rm_macro_build_cache
2.239 [cargo-make][1] INFO - Running Task: remove_files_with_pattern
2.254 [cargo-make][1] INFO - Running Task: remove_files_with_pattern
2.257 [cargo-make][1] INFO - Running Task: rm_dart_generated_protobuf_files
2.258 [cargo-make][1] INFO - Running Task: rm_dart_generated_event_files
2.259 [cargo-make][1] INFO - Build Done in 0.23 seconds.
2.260 [cargo-make] INFO - Build Done in 0.37 seconds.
2.293 [cargo-make] INFO - cargo make 0.37.10
2.396 [cargo-make] INFO - Project: dart-ffi
2.396 [cargo-make] INFO - Build File: Makefile.toml
2.396 [cargo-make] INFO - Task: appflowy-linux
2.396 [cargo-make] INFO - Profile: production-linux-x86_64
2.396 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=production-linux-x86_64" "--makefile" "/appflowy/frontend/Makefile.toml" "appflowy-linux"
2.532 [cargo-make][1] INFO - Project: dart-ffi
2.532 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml
2.532 [cargo-make][1] INFO - Task: appflowy-linux
2.532 [cargo-make][1] INFO - Profile: production-linux-x86_64
2.532 [cargo-make][1] INFO - Running Task: legacy-migration
2.535 [cargo-make][1] INFO - Running Task: echo_env
2.539 -------- Env Parameters --------
2.539 CRATE_TYPE: cdylib
2.539 BUILD_FLAG: release
2.539 TARGET_OS: linux
2.539 RUST_COMPILE_TARGET: x86_64-unknown-linux-gnu
2.539 FEATURES: dart,rev-sqlite
2.539 PRODUCT_EXT:
2.539 APP_ENVIRONMENT: production
2.539 BUILD_ARCHS:
2.539 BUILD_VERSION:
2.543 /home/makepkg/.pub-cache/bin/protoc-gen-dart
2.543 [cargo-make][1] INFO - Skipping Task: install_flutter_protobuf
2.544 [cargo-make][1] INFO - Running Task: setup-crate-type
2.548 [cargo-make][1] INFO - Running Task: set-app-version
2.550 APP_VERSION: 0.5.3
2.550 [cargo-make][1] INFO - Running Task: sdk-release-build
2.634 Updating git repository https://github.com/AppFlowy-IO/AppFlowy-Cloud
3.659 Updating git repository https://github.com/AppFlowy-IO/AppFlowy-Collab
4.262 Updating git repository https://github.com/LucasXu0/rust-rocksdb
4.706 Updating git submodule https://github.com/facebook/rocksdb.git
15.69 Updating git submodule https://github.com/google/snappy.git
16.12 Updating git submodule https://github.com/google/benchmark.git
16.55 Updating git submodule https://github.com/google/googletest.git
18.11 Updating git repository https://github.com/appflowy/y-crdt
19.34 Updating crates.io index
21.01 Downloading crates ...
21.09 Downloaded aead v0.5.2
[...]
89.36 Compiling flowy-document-pub v0.1.0 (/appflowy/frontend/rust-lib/flowy-document-pub)
89.36 Compiling flowy-storage v0.1.0 (/appflowy/frontend/rust-lib/flowy-storage)
90.05 Compiling flowy-server v0.1.0 (/appflowy/frontend/rust-lib/flowy-server)
=> => # |
=> => # 245 | if let Some(lock_collab) = lock_database.get_collab().try_lock() {
=> => # | ^^^^^^^^^^ help: there is a method with a similar name: get_cell
=> => # For more information about this error, try rustc --explain E0599.
=> => # error: could not compile flowy-database2 (lib) due to previous error
=> => # warning: build failed, waiting for other jobs to finish...

Additional Context

No response

Originally created by @mathben on GitHub (Apr 3, 2024). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5044 ### Bug Description From docker-compose After compiling flowy-server got error «lock_database.get_collab» 91.36 error[E0599]: no method named `get_collab` found for struct `parking_lot::lock_api::MutexGuard<'_, parking_lot::RawMutex, collab_database::database::Database>` in the current scope 91.36 --> flowy-database2/src/manager.rs:245:52 91.36 | 91.36 245 | if let Some(lock_collab) = lock_database.get_collab().try_lock() { 91.36 | ^^^^^^^^^^ help: there is a method with a similar name: `get_cell` 91.36 92.67 For more information about this error, try `rustc --explain E0599`. 92.69 error: could not compile `flowy-database2` (lib) due to previous error EDIT 1 : works with tag 0.5.3 ### How to Reproduce git clone git@github.com:AppFlowy-IO/AppFlowy.git cd frontend/scripts/docker-buildfiles/ ### Expected Behavior Fix error[E0599]: no method named `get_collab` found for struct `parking_lot::lock_api::MutexGuard<'_, parking_lot::RawMutex, collab_database::database::Database>` in the current scope Works like version 0.5.3 ### Operating System Ubuntu 20.04 ### AppFlowy Version(s) main ### Screenshots => [builder 21/25] RUN source ~/.cargo/env && cargo binstall duckscript_cli -y 2.4s => [builder 22/25] COPY . /appflowy 0.3s => [builder 23/25] RUN sudo chown -R makepkg: /appflowy 2.4s => [builder 24/25] WORKDIR /appflowy 0.0s => ERROR [builder 25/25] RUN cd frontend && source ~/.cargo/env && cargo make appflowy-flutter-deps-tools && cargo make flutter_clean && OPENSSL_STATIC=1 ZSTD_SYS_USE_PKG_CONFIG=1 ROCKS 117.4s ------ > [builder 25/25] RUN cd frontend && source ~/.cargo/env && cargo make appflowy-flutter-deps-tools && cargo make flutter_clean && OPENSSL_STATIC=1 ZSTD_SYS_USE_PKG_CONFIG=1 ROCKSDB_LIB_DIR="/usr/lib/" cargo make -p production-linux-x86_64 appflowy-linux: 0.307 [cargo-make] INFO - cargo make 0.37.10 1.617 [cargo-make] INFO - Project: dart-ffi 1.617 [cargo-make] INFO - Build File: Makefile.toml 1.617 [cargo-make] INFO - Task: appflowy-flutter-deps-tools 1.617 [cargo-make] INFO - Profile: development 1.617 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=development" "--makefile" "/appflowy/frontend/Makefile.toml" "appflowy-flutter-deps-tools" 1.764 [cargo-make][1] INFO - Project: dart-ffi 1.764 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml 1.764 [cargo-make][1] INFO - Task: appflowy-flutter-deps-tools 1.764 [cargo-make][1] INFO - Profile: development 1.764 [cargo-make][1] INFO - Running Task: legacy-migration 1.767 [cargo-make][1] INFO - Running Task: install_targets 1.846 info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date 1.852 /home/makepkg/.pub-cache/bin/protoc-gen-dart 1.853 [cargo-make][1] INFO - Skipping Task: install_flutter_protobuf 1.853 [cargo-make][1] INFO - Build Done in 0.20 seconds. 1.854 [cargo-make] INFO - Build Done in 1.55 seconds. 1.888 [cargo-make] INFO - cargo make 0.37.10 1.991 [cargo-make] INFO - Project: dart-ffi 1.991 [cargo-make] INFO - Build File: Makefile.toml 1.991 [cargo-make] INFO - Task: flutter_clean 1.991 [cargo-make] INFO - Profile: development 1.991 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=development" "--makefile" "/appflowy/frontend/Makefile.toml" "flutter_clean" 2.128 [cargo-make][1] INFO - Project: dart-ffi 2.128 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml 2.128 [cargo-make][1] INFO - Task: flutter_clean 2.128 [cargo-make][1] INFO - Profile: development 2.128 [cargo-make][1] INFO - Running Task: legacy-migration 2.132 [cargo-make][1] INFO - Running Task: rust_lib_clean 2.234 [cargo-make][1] INFO - Running Task: rm_macro_build_cache 2.239 [cargo-make][1] INFO - Running Task: remove_files_with_pattern 2.254 [cargo-make][1] INFO - Running Task: remove_files_with_pattern 2.257 [cargo-make][1] INFO - Running Task: rm_dart_generated_protobuf_files 2.258 [cargo-make][1] INFO - Running Task: rm_dart_generated_event_files 2.259 [cargo-make][1] INFO - Build Done in 0.23 seconds. 2.260 [cargo-make] INFO - Build Done in 0.37 seconds. 2.293 [cargo-make] INFO - cargo make 0.37.10 2.396 [cargo-make] INFO - Project: dart-ffi 2.396 [cargo-make] INFO - Build File: Makefile.toml 2.396 [cargo-make] INFO - Task: appflowy-linux 2.396 [cargo-make] INFO - Profile: production-linux-x86_64 2.396 [cargo-make] INFO - Execute Command: "cargo" "make" "--disable-check-for-updates" "--no-on-error" "--loglevel=info" "--profile=production-linux-x86_64" "--makefile" "/appflowy/frontend/Makefile.toml" "appflowy-linux" 2.532 [cargo-make][1] INFO - Project: dart-ffi 2.532 [cargo-make][1] INFO - Build File: /appflowy/frontend/Makefile.toml 2.532 [cargo-make][1] INFO - Task: appflowy-linux 2.532 [cargo-make][1] INFO - Profile: production-linux-x86_64 2.532 [cargo-make][1] INFO - Running Task: legacy-migration 2.535 [cargo-make][1] INFO - Running Task: echo_env 2.539 -------- Env Parameters -------- 2.539 CRATE_TYPE: cdylib 2.539 BUILD_FLAG: release 2.539 TARGET_OS: linux 2.539 RUST_COMPILE_TARGET: x86_64-unknown-linux-gnu 2.539 FEATURES: dart,rev-sqlite 2.539 PRODUCT_EXT: 2.539 APP_ENVIRONMENT: production 2.539 BUILD_ARCHS: 2.539 BUILD_VERSION: 2.543 /home/makepkg/.pub-cache/bin/protoc-gen-dart 2.543 [cargo-make][1] INFO - Skipping Task: install_flutter_protobuf 2.544 [cargo-make][1] INFO - Running Task: setup-crate-type 2.548 [cargo-make][1] INFO - Running Task: set-app-version 2.550 APP_VERSION: 0.5.3 2.550 [cargo-make][1] INFO - Running Task: sdk-release-build 2.634 Updating git repository `https://github.com/AppFlowy-IO/AppFlowy-Cloud` 3.659 Updating git repository `https://github.com/AppFlowy-IO/AppFlowy-Collab` 4.262 Updating git repository `https://github.com/LucasXu0/rust-rocksdb` 4.706 Updating git submodule `https://github.com/facebook/rocksdb.git` 15.69 Updating git submodule `https://github.com/google/snappy.git` 16.12 Updating git submodule `https://github.com/google/benchmark.git` 16.55 Updating git submodule `https://github.com/google/googletest.git` 18.11 Updating git repository `https://github.com/appflowy/y-crdt` 19.34 Updating crates.io index 21.01 Downloading crates ... 21.09 Downloaded aead v0.5.2 [...] 89.36 Compiling flowy-document-pub v0.1.0 (/appflowy/frontend/rust-lib/flowy-document-pub) 89.36 Compiling flowy-storage v0.1.0 (/appflowy/frontend/rust-lib/flowy-storage) 90.05 Compiling flowy-server v0.1.0 (/appflowy/frontend/rust-lib/flowy-server) => => # | => => # 245 | if let Some(lock_collab) = lock_database.get_collab().try_lock() { => => # | ^^^^^^^^^^ help: there is a method with a similar name: `get_cell` => => # For more information about this error, try `rustc --explain E0599`. => => # error: could not compile `flowy-database2` (lib) due to previous error => => # warning: build failed, waiting for other jobs to finish... ### Additional Context _No response_
mirror 2026-03-23 21:20:53 +00:00
  • closed this issue
  • added the
    cloud
    label
Author
Owner

@LucasXu0 commented on GitHub (Apr 3, 2024):

@mathben Thanks for reporting. We'll update the collab commits in the AppFlowy repo to the main branch later.

Updated: We have fixed the issue and pushed the changes to the main branch.

<!-- gh-comment-id:2033460862 --> @LucasXu0 commented on GitHub (Apr 3, 2024): @mathben Thanks for reporting. We'll update the collab commits in the AppFlowy repo to the main branch later. Updated: We have fixed the issue and pushed the changes to the main branch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#2244
No description provided.