question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove the implicit "native" binaryTarget

See original GitHub issue

Bug description

I want to leave out my “native” binaryTarget, and build the client explicitly for the targets I declard in schema.prisma.

This is a problem because when multiple people (with different Operating Systems) are working on the same codebase will generate different clients - but they should be exactly the same.

Doc links: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#specify-custom-binarytargets-to-ensure-compatibility-with-the-os

How to reproduce

For example, in this case:

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["rhel-openssl-1.0.x"]
}

I want the client built ONLY for "rhel-openssl-1.0.x" and not for my "native" target as well.

The "native" target is added implicitly for some reason.

Expected behavior

No response

Prisma information

schema.prisma:

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["rhel-openssl-1.0.x"]
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  uuid      String   @id @db.Uuid
  createdAt DateTime @default(now())
}

Environment & setup

  • OS: Mac/Ubuntu/Windows
  • Database: PostgreSQL (not relevant)
  • Node.js version: v16.13.2

Prisma Version

package.json:

    ...
    "@prisma/client": "^3.12.0",
    "prisma": "^3.12.0",
    ...

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
janpiocommented, Sep 10, 2022

That’s a pretty good suggestion. Can you turn it into a new feature request issue please @dejanvasic85? Thanks.

1reaction
janpiocommented, Apr 6, 2022

Yes, that is what I confirmed (or tried to at least) with my comment above 😆 We’ll look into this. Changing this of course would not be that easy, as quite a few setups out there of course could rely on this current behavior - accidentally or by design.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C / C++ Rules
Implicit output targets​​ stripped (only built if explicitly requested): A stripped version of the binary. strip -g is run on the binary to...
Read more >
Swift Package Manager Binary Target
Hello all, I've been using SPM For awhile. previously I put the binary ***.xcframework to my private repository, but now I want to...
Read more >
bazelbuild/rules_closure - Aspect.build Rules Documentation
All closure_js_library rules with nonempty srcs have an implicit dependency on ... Therefore this flag provides the option to remove it.
Read more >
dpkg-buildpackage(1) - Linux manual page
Note that build- target and binary-target are either build and binary (default ... These are the distribution specific implicit build dependencies usually ...
Read more >
dpkg-buildpackage - build binary or source packages from ...
Note that build-target and binary-target are either build and binary (default ... These are the distribution specific implicit build dependencies usually ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found