internal/rosa: use type P in helper interface
All checks were successful
Test / Create distribution (push) Successful in 42s
Test / Sandbox (push) Successful in 1m50s
Test / ShareFS (push) Successful in 3m12s
Test / Sandbox (race detector) (push) Successful in 5m32s
Test / Hakurei (race detector) (push) Successful in 6m36s
Test / Hakurei (push) Successful in 2m40s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Create distribution (push) Successful in 42s
Test / Sandbox (push) Successful in 1m50s
Test / ShareFS (push) Successful in 3m12s
Test / Sandbox (race detector) (push) Successful in 5m32s
Test / Hakurei (race detector) (push) Successful in 6m36s
Test / Hakurei (push) Successful in 2m40s
Test / Flake checks (push) Successful in 1m26s
This is easier to type and serialises correctly. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -144,11 +144,11 @@ func (attr *CMakeHelper) name(name, version string) string {
|
||||
}
|
||||
|
||||
// extra returns a hardcoded slice of [CMake] and [Ninja].
|
||||
func (attr *CMakeHelper) extra(int) []PArtifact {
|
||||
func (attr *CMakeHelper) extra(int) P {
|
||||
if attr != nil && attr.Make {
|
||||
return []PArtifact{CMake, Make}
|
||||
return P{CMake, Make}
|
||||
}
|
||||
return []PArtifact{CMake, Ninja}
|
||||
return P{CMake, Ninja}
|
||||
}
|
||||
|
||||
// wantsChmod returns false.
|
||||
|
||||
@@ -36,7 +36,7 @@ func init() {
|
||||
Description: "a message bus system",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/dbus/",
|
||||
|
||||
Dependencies: []PArtifact{
|
||||
Dependencies: P{
|
||||
GLib,
|
||||
Libexpat,
|
||||
},
|
||||
|
||||
@@ -84,8 +84,8 @@ func (*MakeHelper) name(name, version string) string {
|
||||
}
|
||||
|
||||
// extra returns make and other optional dependencies.
|
||||
func (attr *MakeHelper) extra(flag int) []PArtifact {
|
||||
extra := []PArtifact{Make}
|
||||
func (attr *MakeHelper) extra(flag int) P {
|
||||
extra := P{Make}
|
||||
if (attr == nil || !attr.OmitDefaults) && flag&TEarly == 0 {
|
||||
extra = append(extra,
|
||||
Gawk,
|
||||
|
||||
@@ -72,9 +72,7 @@ func (*MesonHelper) name(name, version string) string {
|
||||
}
|
||||
|
||||
// extra returns hardcoded meson runtime dependencies.
|
||||
func (*MesonHelper) extra(int) []PArtifact {
|
||||
return []PArtifact{Meson}
|
||||
}
|
||||
func (*MesonHelper) extra(int) P { return P{Meson} }
|
||||
|
||||
// wantsChmod returns false.
|
||||
func (*MesonHelper) wantsChmod() bool { return false }
|
||||
|
||||
@@ -135,7 +135,7 @@ func (t Toolchain) newViaPerlMakeMaker(
|
||||
{"PREFIX", "/system"},
|
||||
},
|
||||
Check: []string{"test"},
|
||||
}, slices.Concat(extra, []PArtifact{
|
||||
}, slices.Concat(extra, P{
|
||||
Perl,
|
||||
})...)
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ type Helper interface {
|
||||
// name returns the value passed to the name argument of [Toolchain.New].
|
||||
name(name, version string) string
|
||||
// extra returns helper-specific dependencies.
|
||||
extra(flag int) []PArtifact
|
||||
extra(flag int) P
|
||||
|
||||
// wantsChmod returns whether the source directory should be made writable.
|
||||
wantsChmod() bool
|
||||
|
||||
Reference in New Issue
Block a user