Giter VIP home page Giter VIP logo

Comments (9)

Xiphoseer avatar Xiphoseer commented on August 16, 2024

At a first glance, it looks like the build script for paradox-typed-db might be missing this file: https://github.com/Xiphoseer/paradox-typed-db/blob/main/spec.json

Can you check whether that's there and explain how you build the API server?

from paradox-typed-db.

MajickTek avatar MajickTek commented on August 16, 2024

Hi @Xiphoseer Im simply calling cargo install --git https://github.com/Xiphoseer/lu-res-api-server.git --branch main so it should be downloading straight from the github repository. Shouldn't be missing any files unless your cargo script is missing something

from paradox-typed-db.

Xiphoseer avatar Xiphoseer commented on August 16, 2024

Hi, so it lookes like I messed up the dependecies between two repos (specifically https://github.com/LUDevNet/ParadoxServer (API Server) and https://github.com/Xiphoseer/paradox-typed-db). There was a dev branch for the API server that corresponds to the latest version of typed-db, but that latest version was unfortunately also picked up by the one on main which you tried to use.

I just merged the relevant branches and pushed a new release build, that should work for you. Let me know if the problem persists even with those changes.

from paradox-typed-db.

wertercatt avatar wertercatt commented on August 16, 2024

Can confirm, this is still happening.

wertercatt@DESKTOP-PKL6KKB:~$ sudo !!
sudo cargo install --git https://github.com/Xiphoseer/lu-res-api-server.git --branch main
    Updating git repository `https://github.com/Xiphoseer/lu-res-api-server.git`
  Installing paradox-server v0.1.0 (https://github.com/Xiphoseer/lu-res-api-server.git?branch=main#f85b7a7e)
    Updating git repository `https://github.com/Xiphoseer/assembly_rs.git`
    Updating crates.io index
    Updating git repository `https://github.com/Xiphoseer/paradox-typed-db.git`
  Downloaded once_cell v1.9.0
  Downloaded headers-core v0.2.0
  Downloaded matches v0.1.9
  Downloaded async-compression v0.3.12
  Downloaded serde_json v1.0.78
  Downloaded version_check v0.9.4
  Downloaded http-body v0.4.4
  Downloaded tokio-macros v1.7.0
  Downloaded quote v0.6.13
  Downloaded num-traits v0.2.14
  Downloaded lazy_static v1.4.0
  Downloaded futures-channel v0.3.19
  Downloaded crossbeam-utils v0.8.6
  Downloaded maplit v1.0.2
  Downloaded pin-utils v0.1.0
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded ppv-lite86 v0.2.16
  Downloaded pin-project-internal v1.0.10
  Downloaded pest_meta v2.1.3
  Downloaded rand_chacha v0.3.1
  Downloaded rand_core v0.6.3
  Downloaded proc-macro2 v0.4.30
  Downloaded proc-macro2 v1.0.36
  Downloaded rand v0.8.4
  Downloaded quick-xml v0.20.0
  Downloaded regex v1.5.4
  Downloaded quick-error v2.0.1
  Downloaded mio v0.7.14
  Downloaded md5 v0.7.0
  Downloaded filetime v0.2.15
  Downloaded pest v2.1.3
  Downloaded sfhash v0.1.1
  Downloaded scoped-tls v1.0.0
  Downloaded same-file v1.0.6
  Downloaded sha-1 v0.9.8
  Downloaded strsim v0.8.0
  Downloaded spin v0.5.2
  Downloaded thiserror-impl v1.0.30
  Downloaded sharded-slab v0.1.4
  Downloaded thiserror v1.0.30
  Downloaded thread_local v1.1.4
  Downloaded textwrap v0.11.0
  Downloaded try-lock v0.2.3
  Downloaded untrusted v0.7.1
  Downloaded want v0.3.0
  Downloaded unicode-xid v0.2.2
  Downloaded toml v0.5.8
  Downloaded rustls v0.19.1
  Downloaded twoway v0.1.8
  Downloaded tracing-core v0.1.21
  Downloaded walkdir v2.3.2
  Downloaded vec_map v0.8.2
  Downloaded autocfg v1.0.1
  Downloaded yaml-rust v0.4.5
  Downloaded byte-tools v0.3.1
  Downloaded webpki v0.21.4
  Downloaded tracing-subscriber v0.2.25
  Downloaded unicode-segmentation v1.8.0
  Downloaded buf_redux v0.8.4
  Downloaded base64 v0.13.0
  Downloaded warp v0.3.2
  Downloaded structopt v0.3.26
  Downloaded syn v0.15.44
  Downloaded syn v1.0.86
  Downloaded brotli-decompressor v2.3.2
  Downloaded alloc-no-stdlib v2.0.3
  Downloaded crc32fast v1.3.1
  Downloaded crc v2.1.0
  Downloaded digest v0.9.0
  Downloaded crossbeam-channel v0.5.2
  Downloaded digest v0.8.1
  Downloaded tokio v1.16.1
  Downloaded eyre v0.6.6
  Downloaded futures-macro v0.3.19
  Downloaded env_logger v0.7.1
  Downloaded flate2 v1.0.22
  Downloaded generic-array v0.14.5
  Downloaded form_urlencoded v1.0.1
  Downloaded fnv v1.0.7
  Downloaded futures-util v0.3.19
  Downloaded fake-simd v0.1.2
  Downloaded hashbrown v0.11.2
  Downloaded getrandom v0.2.4
  Downloaded color-eyre v0.5.11
  Downloaded generic-array v0.12.4
  Downloaded futures-sink v0.3.19
  Downloaded headers v0.3.6
  Downloaded httpdate v1.0.2
  Downloaded httparse v1.5.1
  Downloaded itoa v1.0.1
  Downloaded humantime v1.3.0
  Downloaded http v0.2.6
  Downloaded inotify v0.9.6
  Downloaded itoa v0.4.8
  Downloaded gimli v0.26.1
  Downloaded indenter v0.3.3
  Downloaded hyper v0.14.16
  Downloaded joinery v2.1.0
  Downloaded mapr v0.8.0
  Downloaded linked-hash-map v0.5.4
  Downloaded memchr v2.4.1
  Downloaded multipart v0.18.0
  Downloaded minimal-lexical v0.2.1
  Downloaded mime_guess v2.0.3
  Downloaded mime v0.3.16
  Downloaded nom v7.1.0
  Downloaded libc v0.2.116
  Downloaded nom-supreme v0.6.0
  Downloaded notify v5.0.0-pre.13
  Downloaded num_cpus v1.13.1
  Downloaded opaque-debug v0.3.0
  Downloaded pest_generator v2.1.3
  Downloaded owo-colors v1.3.0
  Downloaded pin-project-lite v0.2.8
  Downloaded proc-macro-error v1.0.4
  Downloaded opaque-debug v0.2.3
  Downloaded quick-error v1.2.3
  Downloaded quote v1.0.15
  Downloaded ucd-trie v0.1.3
  Downloaded serde v1.0.136
  Downloaded tracing-error v0.1.2
  Downloaded unicase v2.6.0
  Downloaded ring v0.16.20
  Downloaded tokio-util v0.6.9
  Downloaded openapiv3 v0.5.0
  Downloaded object v0.27.1
  Downloaded num-derive v0.2.5
  Downloaded encoding_rs v0.8.30
  Downloaded brotli v3.3.3
  Downloaded indent_write v2.2.0
  Downloaded handlebars v3.5.5
  Downloaded heck v0.3.3
  Downloaded h2 v0.3.11
  Downloaded futures-core v0.3.19
  Downloaded displaydoc v0.2.3
  Downloaded derive-new v0.5.9
  Downloaded crc-catalog v1.1.1
  Downloaded color-spantrace v0.1.6
  Downloaded cpufeatures v0.2.1
  Downloaded byteorder v1.4.3
  Downloaded aho-corasick v0.7.18
  Downloaded backtrace v0.3.64
  Downloaded cfg-if v1.0.0
  Downloaded bitflags v1.3.2
  Downloaded bincode v1.3.3
  Downloaded block-padding v0.1.5
  Downloaded block-buffer v0.9.0
  Downloaded block-buffer v0.7.3
  Downloaded arrayvec v0.7.2
  Downloaded ansi_term v0.12.1
  Downloaded tracing v0.1.29
  Downloaded atty v0.2.14
  Downloaded adler v1.0.2
  Downloaded alloc-stdlib v0.2.1
  Downloaded unicode-width v0.1.9
  Downloaded unicode-xid v0.1.0
  Downloaded tracing-attributes v0.1.18
  Downloaded tokio-stream v0.1.8
  Downloaded termcolor v1.1.2
  Downloaded tower-service v0.3.1
  Downloaded tokio-rustls v0.22.0
  Downloaded tempfile v3.3.0
  Downloaded socket2 v0.4.4
  Downloaded serde_yaml v0.8.23
  Downloaded structopt-derive v0.4.18
  Downloaded slab v0.4.5
  Downloaded serde_derive v1.0.136
  Downloaded signal-hook-registry v1.4.0
  Downloaded serde_urlencoded v0.7.1
  Downloaded sct v0.6.1
  Downloaded sha-1 v0.8.2
  Downloaded regex-syntax v0.6.25
  Downloaded rustc-demangle v0.1.21
  Downloaded safemem v0.3.3
  Downloaded remove_dir_all v0.5.3
  Downloaded bytemuck_derive v1.0.1
  Downloaded brownstone v1.1.0
  Downloaded serde_test v1.0.136
  Downloaded clap v2.34.0
  Downloaded pin-project v1.0.10
  Downloaded miniz_oxide v0.4.4
  Downloaded indexmap v1.8.0
  Downloaded pest_derive v2.1.0
  Downloaded log v0.4.14
  Downloaded cc v1.0.72
  Downloaded bytes v1.1.0
  Downloaded inotify-sys v0.1.5
  Downloaded futures-task v0.3.19
  Downloaded fastrand v1.7.0
  Downloaded bytemuck v1.7.3
  Downloaded percent-encoding v2.1.0
  Downloaded addr2line v0.17.0
  Downloaded typenum v1.15.0
  Downloaded ryu v1.0.9
  Downloaded pretty_env_logger v0.4.0
  Downloaded displaydoc v0.1.7
  Downloaded 196 crates (18.5 MB) in 1.27s (largest was `ring` at 5.1 MB)
   Compiling proc-macro2 v1.0.36
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.86
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.116
   Compiling serde v1.0.136
   Compiling serde_derive v1.0.136
   Compiling version_check v0.9.4
   Compiling autocfg v1.0.1
   Compiling memchr v2.4.1
   Compiling log v0.4.14
   Compiling once_cell v1.9.0
   Compiling pin-project-lite v0.2.8
   Compiling lazy_static v1.4.0
   Compiling serde_test v1.0.136
   Compiling serde_json v1.0.78
   Compiling bytes v1.1.0
   Compiling cc v1.0.72
   Compiling futures-core v0.3.19
   Compiling itoa v1.0.1
   Compiling proc-macro2 v0.4.30
   Compiling typenum v1.15.0
   Compiling ryu v1.0.9
   Compiling unicode-xid v0.1.0
   Compiling futures-task v0.3.19
   Compiling syn v0.15.44
   Compiling futures-sink v0.3.19
   Compiling adler v1.0.2
   Compiling minimal-lexical v0.2.1
   Compiling fnv v1.0.7
   Compiling crc32fast v1.3.1
   Compiling bitflags v1.3.2
   Compiling hashbrown v0.11.2
   Compiling untrusted v0.7.1
   Compiling futures-util v0.3.19
   Compiling spin v0.5.2
   Compiling num-derive v0.2.5
   Compiling encoding_rs v0.8.30
   Compiling unicode-segmentation v1.8.0
   Compiling quick-error v1.2.3
   Compiling alloc-no-stdlib v2.0.3
   Compiling pin-utils v0.1.0
   Compiling slab v0.4.5
   Compiling httparse v1.5.1
   Compiling ucd-trie v0.1.3
   Compiling futures-channel v0.3.19
   Compiling ppv-lite86 v0.2.16
   Compiling mime v0.3.16
   Compiling base64 v0.13.0
   Compiling maplit v1.0.2
   Compiling crossbeam-utils v0.8.6
   Compiling cpufeatures v0.2.1
   Compiling unicode-width v0.1.9
   Compiling opaque-debug v0.3.0
   Compiling httpdate v1.0.2
   Compiling try-lock v0.2.3
   Compiling matches v0.1.9
   Compiling eyre v0.6.6
   Compiling safemem v0.3.3
   Compiling fastrand v1.7.0
   Compiling arrayvec v0.7.2
   Compiling remove_dir_all v0.5.3
   Compiling regex-syntax v0.6.25
   Compiling gimli v0.26.1
   Compiling percent-encoding v2.1.0
   Compiling owo-colors v1.3.0
   Compiling termcolor v1.1.2
   Compiling crc-catalog v1.1.1
   Compiling same-file v1.0.6
   Compiling strsim v0.8.0
   Compiling joinery v2.1.0
   Compiling bytemuck v1.7.3
   Compiling ansi_term v0.12.1
   Compiling sfhash v0.1.1
   Compiling rustc-demangle v0.1.21
   Compiling tower-service v0.3.1
   Compiling indent_write v2.2.0
   Compiling vec_map v0.8.2
   Compiling itoa v0.4.8
   Compiling indenter v0.3.3
   Compiling scoped-tls v1.0.0
   Compiling md5 v0.7.0
   Compiling byteorder v1.4.3
   Compiling quick-error v2.0.1
   Compiling tracing-core v0.1.21
   Compiling sharded-slab v0.1.4
   Compiling thread_local v1.1.4
   Compiling unicase v2.6.0
   Compiling nom v7.1.0
   Compiling generic-array v0.14.5
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling indexmap v1.8.0
   Compiling miniz_oxide v0.4.4
   Compiling num-traits v0.2.14
   Compiling http v0.2.6
   Compiling humantime v1.3.0
   Compiling alloc-stdlib v0.2.1
   Compiling pest v2.1.3
   Compiling heck v0.3.3
   Compiling textwrap v0.11.0
   Compiling form_urlencoded v1.0.1
   Compiling brownstone v1.1.0
   Compiling crc v2.1.0
   Compiling walkdir v2.3.2
   Compiling ring v0.16.20
   Compiling backtrace v0.3.64
   Compiling brotli-decompressor v2.3.2
   Compiling tracing-subscriber v0.2.25
   Compiling want v0.3.0
   Compiling pest_meta v2.1.3
   Compiling aho-corasick v0.7.18
   Compiling buf_redux v0.8.4
   Compiling object v0.27.1
   Compiling twoway v0.1.8
   Compiling addr2line v0.17.0
   Compiling quote v1.0.15
   Compiling quote v0.6.13
   Compiling mio v0.7.14
   Compiling signal-hook-registry v1.4.0
   Compiling num_cpus v1.13.1
   Compiling getrandom v0.2.4
   Compiling atty v0.2.14
   Compiling inotify-sys v0.1.5
   Compiling socket2 v0.4.4
   Compiling tempfile v3.3.0
   Compiling filetime v0.2.15
   Compiling mapr v0.8.0
   Compiling headers-core v0.2.0
   Compiling http-body v0.4.4
   Compiling crossbeam-channel v0.5.2
   Compiling brotli v3.3.3
   Compiling mime_guess v2.0.3
   Compiling regex v1.5.4
   Compiling nom-supreme v0.6.0
   Compiling rand_core v0.6.3
   Compiling clap v2.34.0
   Compiling inotify v0.9.6
   Compiling flate2 v1.0.22
   Compiling digest v0.9.0
   Compiling block-buffer v0.9.0
   Compiling env_logger v0.7.1
   Compiling rand_chacha v0.3.1
   Compiling notify v5.0.0-pre.13
   Compiling sha-1 v0.9.8
   Compiling rand v0.8.4
   Compiling pretty_env_logger v0.4.0
   Compiling webpki v0.21.4
   Compiling sct v0.6.1
   Compiling headers v0.3.6
   Compiling multipart v0.18.0
   Compiling pest_generator v2.1.3
   Compiling rustls v0.19.1
   Compiling tokio-macros v1.7.0
   Compiling tracing-attributes v0.1.18
   Compiling thiserror-impl v1.0.30
   Compiling futures-macro v0.3.19
   Compiling displaydoc v0.1.7
   Compiling derive-new v0.5.9
   Compiling pin-project-internal v1.0.10
   Compiling displaydoc v0.2.3
   Compiling bytemuck_derive v1.0.1
   Compiling structopt-derive v0.4.18
   Compiling pest_derive v2.1.0
   Compiling tokio v1.16.1
   Compiling tracing v0.1.29
   Compiling thiserror v1.0.30
   Compiling tracing-error v0.1.2
   Compiling assembly-core v0.3.0 (https://github.com/Xiphoseer/assembly_rs.git?rev=d9cd46b29b7a7e92166b0f23a4082851ed04cffc#d9cd46b2)
   Compiling color-spantrace v0.1.6
   Compiling color-eyre v0.5.11
   Compiling assembly-maps v0.3.0 (https://github.com/Xiphoseer/assembly_rs.git?rev=d9cd46b29b7a7e92166b0f23a4082851ed04cffc#d9cd46b2)
   Compiling pin-project v1.0.10
   Compiling structopt v0.3.26
   Compiling tokio-util v0.6.9
   Compiling tokio-stream v0.1.8
   Compiling tokio-rustls v0.22.0
   Compiling async-compression v0.3.12
   Compiling assembly-fdb v0.1.0 (https://github.com/Xiphoseer/assembly_rs.git?rev=d9cd46b29b7a7e92166b0f23a4082851ed04cffc#d9cd46b2)
   Compiling quick-xml v0.20.0
   Compiling serde_urlencoded v0.7.1
   Compiling bincode v1.3.3
   Compiling toml v0.5.8
   Compiling h2 v0.3.11
   Compiling linked-hash-map v0.5.4
   Compiling assembly-xml v0.2.0 (https://github.com/Xiphoseer/assembly_rs.git?rev=d9cd46b29b7a7e92166b0f23a4082851ed04cffc#d9cd46b2)
   Compiling yaml-rust v0.4.5
   Compiling assembly-pack v0.3.2 (https://github.com/Xiphoseer/assembly_rs.git?rev=d9cd46b29b7a7e92166b0f23a4082851ed04cffc#d9cd46b2)
   Compiling handlebars v3.5.5
   Compiling serde_yaml v0.8.23
   Compiling openapiv3 v0.5.0
   Compiling paradox-typed-db v0.1.0 (https://github.com/Xiphoseer/paradox-typed-db.git?rev=f9e35a5a35feaf14dc70ca75feff70760711dc6e#f9e35a5a)
error: failed to run custom build command for `paradox-typed-db v0.1.0 (https://github.com/Xiphoseer/paradox-typed-db.git?rev=f9e35a5a35feaf14dc70ca75feff70760711dc6e#f9e35a5a)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installO72KvY/release/build/paradox-typed-db-dffac89c08b9a2d6/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /root/.cargo/git/checkouts/paradox-typed-db-aba9554673c5c7a8/f9e35a5/build.rs:289:11
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `paradox-server v0.1.0 (https://github.com/Xiphoseer/lu-res-api-server.git?branch=main#f85b7a7e)`, intermediate artifacts can be found at `/tmp/cargo-installO72KvY`

Caused by:
  build failed

from paradox-typed-db.

Xiphoseer avatar Xiphoseer commented on August 16, 2024

@wertercatt do you have rustfmt in your PATH? Can you try just running that on it's own (no parameters) to see what happens?

Looking a bit closer, this could come from writing any of 4 files to OUT_DIR (set by cargo when invoking build.rs) or maybe when calling rustfmt.

If that is missing, can you try rustup component add rustfmt (if Ubuntu has rustup installed)

from paradox-typed-db.

Xiphoseer avatar Xiphoseer commented on August 16, 2024

yeah it seems like ubuntu doesn't ship rustfmt by defaukt until 22.04. But it should be in the relevant -update source you can add to apt and I can make it optional in the build.

e.g. https://packages.ubuntu.com/focal-updates/rustfmt

from paradox-typed-db.

wertercatt avatar wertercatt commented on August 16, 2024

Yeah, rustfmt wasn't installed. After apt installing it, I got a new error instead.

error[E0309]: the associated type `<Self as TypedRow<'_, '_>>::Table` may not live long enough
  --> /home/wertercatt/.cargo/git/checkouts/paradox-typed-db-aba9554673c5c7a8/f9e35a5/src/lib.rs:75:46
   |
75 |                     return Some(Self::new(r, table));
   |                                              ^^^^^
   |
   = help: consider adding an explicit lifetime bound `<Self as TypedRow<'_, '_>>::Table: 'b`...
   = note: ...so that the reference type `&<Self as TypedRow<'_, '_>>::Table` does not outlive the data it points at

error[E0309]: the associated type `<R as TypedRow<'_, '_>>::Table` may not live long enough
   --> /home/wertercatt/.cargo/git/checkouts/paradox-typed-db-aba9554673c5c7a8/f9e35a5/src/lib.rs:114:49
    |
114 |         self.inner.next().map(|row| R::new(row, self.table))
    |                                                 ^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `<R as TypedRow<'_, '_>>::Table: 'b`...
    = note: ...so that the reference type `&<R as TypedRow<'_, '_>>::Table` does not outlive the data it points at

   Compiling hyper v0.14.16
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0309`.
error: could not compile `paradox-typed-db`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `paradox-server v0.1.0 (https://github.com/LUDevNet/ParadoxServer#f85b7a7e)`, intermediate artifacts can be found at `/tmp/cargo-install0maXWn`

Caused by:
  build failed

from paradox-typed-db.

Xiphoseer avatar Xiphoseer commented on August 16, 2024

I just moved the issue to the repo that actually contains the broken code. Commit 032830e should solve both problems, i.e. both just printing a warning when rustfmt isn't found and the lifetime issue. It looks like the compiler is smart enough to derive the correct lifetimes from Rust 1.56.0 onwards (I'm usually on stable), but it doesn't hurt to be just that little bit more explicit to support the older compiler versions like the ones that ship with ubuntu by default.

from paradox-typed-db.

Xiphoseer avatar Xiphoseer commented on August 16, 2024

Closing this because I downloaded Rust 1.54.0, compiled paradox server with it once before the change which reproduced the error and once after the change which worked, so I'm reasonably certain it's actually solved. LMK if there are any issues that remain.

from paradox-typed-db.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.