Files
nixpkgs/pkgs/by-name/en/ent-go/ent_version.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
696 B
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
--- a/entc/gen/graph.go 2025-08-26 12:42:17.548313631 +0100
+++ b/entc/gen/graph.go 2025-08-26 12:43:32.398186157 +0100
@@ -1008,22 +1008,10 @@
// ModuleInfo returns the entgo.io/ent version.
func (Config) ModuleInfo() (m debug.Module) {
- const pkg = "entgo.io/ent"
- info, ok := debug.ReadBuildInfo()
- if !ok {
- return
- }
- // Was running as a CLI (ent/cmd/ent).
- if info.Main.Path == pkg {
- return info.Main
- }
- // Or, as a main package (ent/entc).
- for _, dep := range info.Deps {
- if dep.Path == pkg {
- return *dep
- }
+ return debug.Module{
+ Version: "@version@",
+ Sum: "@sum@",
}
- return
}
// FeatureEnabled reports if the given feature name is enabled.