Skip to content

Commit

Permalink
Sort module dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
googollee committed Nov 4, 2023
1 parent 261ac15 commit d35e0ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/context.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package module

import "context"
import (
"context"
"slices"
)

type errBuildError struct {
name contextKey
Expand Down Expand Up @@ -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)
}

0 comments on commit d35e0ec

Please sign in to comment.