spacedriveapp / spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
https://spacedrive.com
GNU Affero General Public License v3.0
32.7k stars 958 forks source link

[E0583] No file found for module `prisma` prisma.rs missing in crate prisma #2024

Closed Atri10 closed 9 months ago

Atri10 commented 9 months ago

Describe the bug

Release Source : Alpha 0.2.2

At Location : crates/prisma/src/lib.rs

In File lib.rs there is referece to mod primsa but prisma.rs file is missing from primsa crate.

However there exist a file at location : crates/prisma-cli/src/bin/prisma.rs

It is quite strage that release source code is not compiling with cargo.

Reproduction

  1. Download source code form LINK.
  2. Run cargo build.

Expected behavior

No response

Platform and versions

❯ pnpm --version
8.15.1

❯ cargo --version
cargo 1.70.0 (ec8a8a0ca 2023-04-25)

❯ rustc --version
rustc 1.70.0 (90c541806 2023-05-31)

Plateform :
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free

Stack trace

PS C:\Users\Skywalker\Desktop\Tech\spacedrive-0.2.1> cargo build
warning: skipping duplicate package `api` found at `C:\Users\Skywalker\.cargo\git\checkouts\tauri-5511b58f95cd9a84\8409af7\examples\web\core\api`
warning: skipping duplicate package `app` found at `C:\Users\Skywalker\.cargo\git\checkouts\tauri-5511b58f95cd9a84\8409af7\tooling\cli\node\test\jest\fixtures\app\src-tauri`
warning: skipping duplicate package `test-macros` found at `C:\Users\Skywalker\.cargo\git\checkouts\prisma-engines-8e1416dd0e571d11\45b026c\libs\test-macros`
warning: skipping duplicate package `test-setup` found at `C:\Users\Skywalker\.cargo\git\checkouts\prisma-engines-8e1416dd0e571d11\45b026c\libs\test-setup`
   Compiling openssl-sys v0.9.97
   Compiling sd-prisma v0.1.0 (C:\Users\Skywalker\Desktop\Tech\spacedrive-0.2.1\crates\prisma)
   Compiling usvg-parser v0.36.0
   Compiling libheif-sys v2.1.0+1.17.4
   Compiling pdfium-render v0.8.16
   Compiling funty v2.0.0
   Compiling vecmath v1.0.0
   Compiling aws-smithy-query v0.60.0
   Compiling if-watch v3.1.0 (https://github.com/oscartbeaumont/if-watch.git?rev=f732786057e57250e863a9ea0b1874e4cc9907c2#f7327860)
   Compiling libp2p-tls v0.2.1
   Compiling quinn v0.10.2
   Compiling ffmpeg-sys-next v6.1.0
The following warnings were emitted during compilation:

warning: Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'

error: failed to run custom build command for `libheif-sys v2.1.0+1.17.4`

Caused by:
  process didn't exit successfully: `C:\Users\Skywalker\Desktop\Tech\spacedrive-0.2.1\target\debug\build\libheif-sys-ea9d4ca5c1e76062\build-script-build` (exit code: 1)
  --- stdout
  cargo:warning=Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'
warning: build failed, waiting for other jobs to finish...
error[E0583]: file not found for module `prisma`                                                                                                                                                                                   
 --> crates\prisma\src\lib.rs:2:1
  |
2 | pub mod prisma;
  | ^^^^^^^^^^^^^^^
  |
  = help: to create the module `prisma`, create file "crates\prisma\src\prisma.rs" or "crates\prisma\src\prisma\mod.rs"

error[E0583]: file not found for module `prisma_sync`
 --> crates\prisma\src\lib.rs:4:1
  |
4 | pub mod prisma_sync;
  | ^^^^^^^^^^^^^^^^^^^^
  |
  = help: to create the module `prisma_sync`, create file "crates\prisma\src\prisma_sync.rs" or "crates\prisma\src\prisma_sync\mod.rs"

error: failed to run custom build command for `ffmpeg-sys-next v6.1.0`                                                                                                                                                             

Caused by:
  process didn't exit successfully: `C:\Users\Skywalker\Desktop\Tech\spacedrive-0.2.1\target\debug\build\ffmpeg-sys-next-ad9a7049e5d6dd10\build-script-build` (exit code: 101)
  --- stdout
  Could not find ffmpeg with vcpkg: Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'
  cargo:rerun-if-env-changed=LIBAVUTIL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at C:\Users\Skywalker\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ffmpeg-sys-next-6.1.0\build.rs:716:14:
  called `Result::unwrap()` on an `Err` value: Could not run `PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags libavutil`
  The pkg-config command could not be found.

  Most likely, you need to install a pkg-config package for your OS.

  If you've already installed it, ensure the pkg-config command is one of the
  directories in the PATH environment variable.

  If you did not expect this build to link to a pre-installed system library,
  then check documentation of the ffmpeg-sys-next crate for an option to
  build the library from source, or disable features or dependencies
  that require pkg-config.
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error[E0433]: failed to resolve: could not find `tag` in `prisma`                                                                                                                                                                  
 --> crates\prisma\src\lib.rs:6:34
  |
6 | impl sd_cache::Model for prisma::tag::Data {
  |                                  ^^^ could not find `tag` in `prisma`

error[E0433]: failed to resolve: could not find `object` in `prisma`
  --> crates\prisma\src\lib.rs:12:34
   |
12 | impl sd_cache::Model for prisma::object::Data {
   |                                  ^^^^^^ could not find `object` in `prisma`

error[E0433]: failed to resolve: could not find `location` in `prisma`
  --> crates\prisma\src\lib.rs:18:34
   |
18 | impl sd_cache::Model for prisma::location::Data {
   |                                  ^^^^^^^^ could not find `location` in `prisma`

error[E0433]: failed to resolve: could not find `indexer_rule` in `prisma`
  --> crates\prisma\src\lib.rs:24:34
   |
24 | impl sd_cache::Model for prisma::indexer_rule::Data {
   |                                  ^^^^^^^^^^^^ could not find `indexer_rule` in `prisma`

error[E0433]: failed to resolve: could not find `file_path` in `prisma`
  --> crates\prisma\src\lib.rs:30:34
   |
30 | impl sd_cache::Model for prisma::file_path::Data {
   |                                  ^^^^^^^^^ could not find `file_path` in `prisma`

Some errors have detailed explanations: E0433, E0583.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `sd-prisma` (lib) due to 7 previous errors
error: failed to run custom build command for `openssl-sys v0.9.97`                                                                                                                                                                

Caused by:
  process didn't exit successfully: `C:\Users\Skywalker\Desktop\Tech\spacedrive-0.2.1\target\debug\build\openssl-sys-a40745ecedc1a6b5\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  running "perl" "./Configure" "--prefix=C:/Users/Skywalker/Desktop/Tech/spacedrive-0.2.1/target/debug/build/openssl-sys-ebed2b571dad2e70/out/openssl-build/install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-capieng" "no-asm" "VC-WIN64A"

  --- stderr
  thread 'main' panicked at C:\Users\Skywalker\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-300.2.1+3.2.0\src\lib.rs:611:9:

  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=C:/Users/Skywalker/Desktop/Tech/spacedrive-0.2.1/target/debug/build/openssl-sys-ebed2b571dad2e70/out/openssl-build/install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-capieng" "no-asm" "VC-WIN64A"
      Failed to execute: program not found

Additional context

No response

Atri10 commented 9 months ago

Correction : Release Source is Alpha 0.2.1

But issue also persists with 0.2.2 release.

fogodev commented 9 months ago

Did you follow our CONTRIBUTING.md file and run commands like pnpm prep ?

More specifically this part here https://github.com/spacedriveapp/spacedrive/blob/main/CONTRIBUTING.md#making-changes-locally

Atri10 commented 9 months ago

I certainly did not look at that as the title lead me to believe it would contain some guilde lines related contribution rather than the detailed process to build the app.

I suggest you extract the build instructions to other section if you prefer.

I would certainly try to build it using guidelines.

Thank you for your help.