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

Remove allow_broken_features #349

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ When releasing a new version:
- allow `omitempty` on non-nullable input field, if the field has a default
- allow `omitempty: false` on an input field, even when it is non-nullable
- don't do `omitempty` and `pointer` input types validation when `use_struct_reference` is used, as the generated type is often not compatible with validation logic.
- the `allow_broken_features` option, which no longer did anything, has been removed

## v0.7.0

Expand Down
7 changes: 0 additions & 7 deletions generate/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ type Config struct {
StructReferences bool `yaml:"use_struct_references"`
Extensions bool `yaml:"use_extensions"`

// Set to true to use features that aren't fully ready to use.
//
// This is primarily intended for genqlient's own tests. These features
// are likely BROKEN and come with NO EXPECTATION OF COMPATIBILITY. Use
// them at your own risk!
AllowBrokenFeatures bool `yaml:"allow_broken_features"`

// The directory of the config-file (relative to which all the other paths
// are resolved). Set by ValidateAndFillDefaults.
baseDir string
Expand Down
2 changes: 0 additions & 2 deletions generate/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func TestGenerate(t *testing.T) {
},
"PokemonInput": {Type: "github.com/Khan/genqlient/internal/testutil.Pokemon"},
},
AllowBrokenFeatures: true,
})
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -345,7 +344,6 @@ func TestGenerateErrors(t *testing.T) {
ExpectExactFields: "{ species level }",
},
},
AllowBrokenFeatures: true,
})
if err == nil {
t.Fatal("expected an error")
Expand Down
1 change: 0 additions & 1 deletion generate/testdata/snapshots/TestValidConfigs-Empty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
OptionalGenericType: (string) "",
StructReferences: (bool) false,
Extensions: (bool) false,
AllowBrokenFeatures: (bool) false,
baseDir: (string) (len=20) "testdata/validConfig",
pkgPath: (string) (len=55) "github.com/Khan/genqlient/generate/testdata/validConfig"
})
1 change: 0 additions & 1 deletion generate/testdata/snapshots/TestValidConfigs-Lists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OptionalGenericType: (string) "",
StructReferences: (bool) false,
Extensions: (bool) false,
AllowBrokenFeatures: (bool) false,
baseDir: (string) (len=20) "testdata/validConfig",
pkgPath: (string) (len=55) "github.com/Khan/genqlient/generate/testdata/validConfig"
})
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
OptionalGenericType: (string) "",
StructReferences: (bool) false,
Extensions: (bool) false,
AllowBrokenFeatures: (bool) false,
baseDir: (string) (len=20) "testdata/validConfig",
pkgPath: (string) (len=55) "github.com/Khan/genqlient/generate/testdata/validConfig"
})
1 change: 0 additions & 1 deletion internal/integration/genqlient.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
schema: schema.graphql
operations: "*_test.go"
generated: generated.go
allow_broken_features: true
use_extensions: true
bindings:
Date:
Expand Down
Loading