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

Don't print platform detection warnings when custom binaries are provided #17900

Open
aqrln opened this issue Feb 12, 2023 · 5 comments
Open
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript. topic: env topic: linux topic: openssl
Milestone

Comments

@aqrln
Copy link
Member

aqrln commented Feb 12, 2023

Currently the output on NixOS (e.g., nix-shell -p nodePackages.prisma --run "prisma --version") is too noisy:

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Warning Precompiled engine files are not available for nixos.
prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
prisma                  : 4.10.1
@prisma/client          : Not found
Current platform        : linux-nixos
Query Engine (Node-API) : libquery-engine  (at ../../../nix/store/sfbq6v19zqjakvwj9w8vz97wsqcv7q61-prisma-engines-4.10.1/lib/libquery_engine.node, resolved by PRISMA_QUERY_ENGINE_LIBRARY)
Migration Engine        : migration-engine-cli  (at ../../../nix/store/sfbq6v19zqjakvwj9w8vz97wsqcv7q61-prisma-engines-4.10.1/bin/migration-engine, resolved by PRISMA_MIGRATION_ENGINE_BINARY)
Format Wasm             : @prisma/prisma-fmt-wasm 4.10.1-1.80b351cc7c06d352abe81be19b8a89e9c6b7c110
Default Engines Hash    : ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5
Studio                  : 0.481.0

Also, an identical warning about OpenSSL is printed twice.

When custom binaries are provided, these warnings become less useful at best or misleading at worst, so it's best to skip them.

@aqrln aqrln added kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript. domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. topic: linux topic: openssl labels Feb 12, 2023
@VanCoding
Copy link

I'm having the same issue. The warning indeed makes no sense when using custom binaries.

@Gerschtli
Copy link
Contributor

Is someone working on this issue? Otherwise, I would have a look :)

Gerschtli added a commit to Gerschtli/prisma that referenced this issue Jul 9, 2023
Previously on nixos, an error message regarding not available
precompiled engine files was always printed. With this change, the error
message is only shown if the engine files were not configured correctly
via environment variables.

Fixes: prisma#17900
@Gerschtli
Copy link
Contributor

Proposed fix to this in this PR #20138 :)

Gerschtli added a commit to Gerschtli/prisma that referenced this issue Jul 18, 2023
Previously on nixos, an error message regarding not available
precompiled engine files was always printed. With this change, the error
message is only shown if the engine files were not configured correctly
via environment variables.

Fixes: prisma#17900
Gerschtli added a commit to Gerschtli/prisma that referenced this issue Jul 18, 2023
Previously on nixos, an error message regarding not available
precompiled engine files was always printed. With this change, the error
message is only shown if the engine files were not configured correctly
via environment variables.

Fixes: prisma#17900
Gerschtli added a commit to Gerschtli/prisma that referenced this issue Jul 25, 2023
Previously on nixos, an error message regarding not available
precompiled engine files was always printed. With this change, the error
message is only shown if the engine files were not configured correctly
via environment variables.

Fixes: prisma#17900
Gerschtli added a commit to Gerschtli/prisma that referenced this issue Jul 27, 2023
Previously on nixos, an error message regarding not available
precompiled engine files was always printed. With this change, the error
message is only shown if the engine files were not configured correctly
via environment variables.

Fixes: prisma#17900
@aqrln aqrln closed this as completed in d9ed477 Jul 28, 2023
@aqrln aqrln reopened this Jul 28, 2023
@aqrln
Copy link
Member Author

aqrln commented Jul 28, 2023

Was going to reopen since providing the env vars doesn't skip the OpenSSL warning yet — but that's something that would be better requested in a separate issue (especially now that we technically do have another way to to skip the OpenSSL warning).

@aqrln aqrln closed this as completed Jul 28, 2023
@janpio janpio added this to the 5.1.0 milestone Jul 28, 2023
@Jolg42 Jolg42 reopened this Jul 31, 2023
@aqrln
Copy link
Member Author

aqrln commented Jul 31, 2023

Reopened since the openssl warning is still present, and the feature that provides a workaround is temporarily reverted.

@Jolg42 Jolg42 modified the milestones: 5.1.0, 5.2.0 Aug 1, 2023
@aqrln aqrln modified the milestones: 5.2.0, 5.3.0 Aug 22, 2023
ivan added a commit to ludios/cookied that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/client Issue in the "Client" domain: Prisma Client, Prisma Studio etc. kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript. topic: env topic: linux topic: openssl
Projects
None yet
Development

No branches or pull requests

5 participants