Skip to content

Commit

Permalink
Remove allow_broken_features
Browse files Browse the repository at this point in the history
This was a config option from the early days, when there were various
things I wanted to be able to try but didn't really want users to use
yet. With subscriptions merged, the last plausible need is long gone!

Technically this is a breaking change, but it was documented as unstable
so I didn't mark it as one.
  • Loading branch information
benjaminjkraft committed Aug 17, 2024
1 parent 87e2448 commit 9d2c3f8
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 13 deletions.
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"
})
1 change: 0 additions & 1 deletion generate/testdata/snapshots/TestValidConfigs-Strings.yaml
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

0 comments on commit 9d2c3f8

Please sign in to comment.