Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add relation_on_update field to DMMF model #5118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WhyAsh5114
Copy link

Related to: prisma/prisma#25944

@CLAassistant
Copy link

CLAassistant commented Jan 10, 2025

CLA assistant check
All committers have signed the CLA.

@WhyAsh5114 WhyAsh5114 marked this pull request as ready for review January 10, 2025 18:03
@WhyAsh5114 WhyAsh5114 requested a review from a team as a code owner January 10, 2025 18:03
@WhyAsh5114 WhyAsh5114 requested review from FGoessler and removed request for a team January 10, 2025 18:03
@WhyAsh5114
Copy link
Author

Hey! This is my first PR, and am not that experienced with Rust, so please be patient with me 😅

This is something I wanted for one of my generator projects, so I added the missing field here, and once this is merged, I can update the types in the prisma repo to include this as well.

@aqrln
Copy link
Member

aqrln commented Jan 10, 2025

For some reason the button to approve a CI run doesn't show up for me now (maybe it's because I activated the new merge experience preview feature in GitHub settings) but one thing that immediately catches my attention as something that would fail is that you need to update snapshots in tests. You need to run something like this:

UPDATE_EXPECT=1 cargo test -p dmmf -F psl/all

@WhyAsh5114
Copy link
Author

okay, will try it, for some reason cargo test isn't working properly in WSL, I might need to try it natively.

I will try it for a bit, if it doesn't work in WSL, I'll get back to this tomorrow (need to install Linux)

@aqrln
Copy link
Member

aqrln commented Jan 10, 2025

I don't think WSL or bare-metal installation of Linux should make any difference. What's the exact problem you're facing, is there any specific error?

@WhyAsh5114
Copy link
Author

I ran out of storage 😭. Fixing it rn!

@WhyAsh5114
Copy link
Author

Compiling query-engine-node-api v0.1.0 (/home/anonjr/Programming/prisma-engines/query-engine/query-engine-node-api)
error: linking with `cc` failed: exit status: 1

big path
= note: /usr/bin/ld: /home/anonjr/Programming/prisma-engines/target/debug/deps/libdriver_adapters-f3bf520a3a1ff790.rlib(driver_adapters-f3bf520a3a1ff790.ev09v6p8e3dhtg1xjgjmcwvkc.rcgu.o): in function `driver_adapters::types::__register__enum__ColumnType_callback__':
          /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0x8d): undefined reference to `napi_create_object'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0x2ae): undefined reference to `napi_set_named_property'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0x518): undefined reference to `napi_set_named_property'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0x782): undefined reference to `napi_set_named_property'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0x9ec): undefined reference to `napi_set_named_property'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144:(.text._ZN15driver_adapters5types39__register__enum__ColumnType_callback__17hacc5c8f25d96e65cE+0xc56): undefined reference to `napi_set_named_property'
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/target/debug/deps/libdriver_adapters-f3bf520a3a1ff790.rlib(driver_adapters-f3bf520a3a1ff790.ev09v6p8e3dhtg1xjgjmcwvkc.rcgu.o):/home/anonjr/Programming/prisma-engines/query-engine/driver-adapters/src/types.rs:144: more undefined references to `napi_set_named_property' follow
          /usr/bin/ld: /home/anonjr/Programming/prisma-engines/target/debug/deps/libnapi-485db2fba3273acf.rlib(napi-485db2fba3273acf.napi.ee2df9165f82ad68-cgu.05.rcgu.o): in function `napi::bindgen_runtime::js_values::number::<impl napi::bindgen_runtime::js_values::ToNapiValue for i32>::to_napi_value':
          /home/anonjr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.16.13/src/bindgen_runtime/js_values/number.rs:25:(.text._ZN4napi15bindgen_runtime9js_values6number79_$LT$impl$u20$napi..bindgen_runtime..js_values..ToNapiValue$u20$for$u20$i32$GT$13to_napi_value17h526f850d7166bafcE+0x73): undefined reference to `napi_create_int32'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

error: could not compile `query-engine-node-api` (lib test) due to 1 previous error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants