From d35e0ecea22dbc5af88774d83a645c093081615e Mon Sep 17 00:00:00 2001 From: Googol Lee Date: Sat, 4 Nov 2023 09:32:08 +0100 Subject: [PATCH] Sort module dependencies. --- module/context.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/context.go b/module/context.go index 837572e..0a1f430 100644 --- a/module/context.go +++ b/module/context.go @@ -1,6 +1,9 @@ package module -import "context" +import ( + "context" + "slices" +) type errBuildError struct { name contextKey @@ -54,6 +57,7 @@ func (ctx *buildContext) addInstance(instance Instance) { for key := range ctx.dependOn { deps = append(deps, key) } + slices.Sort(deps) ctx.repo.addInstance(ctx.mod, deps, instance) }