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 "denoDeploy" preview feature flag for client #3094

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion libs/datamodel/core/src/common/preview_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::fmt;
macro_rules! features {
($( $variant:ident $(,)? ),*) => {
#[enumflags2::bitflags]
#[repr(u32)]
#[repr(u64)]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to change this because DenoDeploy is the 33rd flag and I saw the error Not enough bits for 33 flags with repr(u32)

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum PreviewFeature {
$( $variant,)*
Expand Down Expand Up @@ -66,6 +66,7 @@ features!(
OrderByNulls,
MultiSchema,
FilteredRelationCount,
DenoDeploy,
);

/// Generator preview features
Expand All @@ -79,6 +80,7 @@ pub const GENERATOR: FeatureMap = FeatureMap {
| Metrics
| OrderByNulls
| FilteredRelationCount
| DenoDeploy
}),
deprecated: enumflags2::make_bitflags!(PreviewFeature::{
AtomicNumberOperations
Expand Down
2 changes: 1 addition & 1 deletion libs/datamodel/core/tests/config/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fn nice_error_for_unknown_generator_preview_feature() {
.unwrap_err();

let expectation = expect![[r#"
error: The preview feature "foo" is not known. Expected one of: referentialIntegrity, interactiveTransactions, fullTextSearch, fullTextIndex, tracing, metrics, orderByNulls, filteredRelationCount
error: The preview feature "foo" is not known. Expected one of: referentialIntegrity, interactiveTransactions, fullTextSearch, fullTextIndex, tracing, metrics, orderByNulls, filteredRelationCount, denoDeploy
--> schema.prisma:3
 | 
 2 |  provider = "prisma-client-js"
Expand Down