Skip to content

Commit

Permalink
Use github.com/dmarkham/enumer instead of the usual stringer for …
Browse files Browse the repository at this point in the history
…dtypes.
  • Loading branch information
janpfeifer committed Jul 20, 2024
1 parent f392cb1 commit ab04fe4
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 49 deletions.
2 changes: 1 addition & 1 deletion cmd/dtypes_codegen/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ func generateEnums(contents string) {
must.M(enumsFromCTemplate.Execute(f, allValues))
must.M(exec.Command("gofmt", "-w", DTypeEnumGoFileName).Run())
fmt.Printf("Generated %q based on pjrt_c_api.h\n", DTypeEnumGoFileName)
must.M(exec.Command("stringer", "-type=DType", DTypeEnumGoFileName).Run())
must.M(exec.Command("enumer", "-type=DType", "-yaml", "-json", "-text", "-values", DTypeEnumGoFileName).Run())
}
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Execute.NonDonatable -> Execute.DonateNone
* Added Execute.SetDonate
* Use `github.com/dmarkham/enumer` instead of the usual `stringer` for dtypes.

# v0.2.0 GoMLX integration fixes -- GoMLX more extensive tests caught several small issues in Gopjrt.

Expand Down
225 changes: 225 additions & 0 deletions dtypes/dtype_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 0 additions & 48 deletions dtypes/dtype_string.go

This file was deleted.

0 comments on commit ab04fe4

Please sign in to comment.