internal/rosa: remove unused helpers
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m45s
Test / ShareFS (push) Successful in 3m36s
Test / Sandbox (race detector) (push) Successful in 5m15s
Test / Hakurei (race detector) (push) Successful in 6m24s
Test / Hakurei (push) Successful in 3m8s
Test / Flake checks (push) Successful in 1m24s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m45s
Test / ShareFS (push) Successful in 3m36s
Test / Sandbox (race detector) (push) Successful in 5m15s
Test / Hakurei (race detector) (push) Successful in 6m24s
Test / Hakurei (push) Successful in 3m8s
Test / Flake checks (push) Successful in 1m24s
These are no longer needed after migration. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -26,7 +26,7 @@ func (a busyboxBin) Params(*pkg.IContext) {}
|
|||||||
// IsExclusive returns false: Cure performs a trivial filesystem write.
|
// IsExclusive returns false: Cure performs a trivial filesystem write.
|
||||||
func (busyboxBin) IsExclusive() bool { return false }
|
func (busyboxBin) IsExclusive() bool { return false }
|
||||||
|
|
||||||
// Dependencies returns the underlying busybox [pkg.File].
|
// Dependencies returns the underlying busybox [pkg.FileArtifact].
|
||||||
func (a busyboxBin) Dependencies() []pkg.Artifact {
|
func (a busyboxBin) Dependencies() []pkg.Artifact {
|
||||||
return []pkg.Artifact{a.bin}
|
return []pkg.Artifact{a.bin}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var (
|
|||||||
_ninja = H("ninja")
|
_ninja = H("ninja")
|
||||||
)
|
)
|
||||||
|
|
||||||
// CMakeHelper is the [CMake] build system helper.
|
// CMakeHelper builds and tests a CMake project with specified CACHE entries.
|
||||||
type CMakeHelper struct {
|
type CMakeHelper struct {
|
||||||
// Path elements joined with source.
|
// Path elements joined with source.
|
||||||
Append []string
|
Append []string
|
||||||
@@ -34,7 +34,7 @@ type CMakeHelper struct {
|
|||||||
|
|
||||||
var _ Helper = new(CMakeHelper)
|
var _ Helper = new(CMakeHelper)
|
||||||
|
|
||||||
// extra returns a hardcoded slice of [CMake] and [Ninja].
|
// extra returns the cmake handle alongside either ninja or make.
|
||||||
func (attr *CMakeHelper) extra(int) P {
|
func (attr *CMakeHelper) extra(int) P {
|
||||||
if attr != nil && attr.Make {
|
if attr != nil && attr.Make {
|
||||||
return P{_cmake, _make}
|
return P{_cmake, _make}
|
||||||
|
|||||||
@@ -36,8 +36,3 @@ git \
|
|||||||
rm -rf /work/.git
|
rm -rf /work/.git
|
||||||
`, resolvconf())
|
`, resolvconf())
|
||||||
}
|
}
|
||||||
|
|
||||||
// newTagRemote is a helper around NewViaGit for a tag on a git remote.
|
|
||||||
func (t Toolchain) newTagRemote(url, tag, checksum string) pkg.Artifact {
|
|
||||||
return t.NewViaGit(url, "refs/tags/"+tag, mustDecode(checksum))
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
var _make = H("make")
|
var _make = H("make")
|
||||||
|
|
||||||
// MakeHelper is the [Make] build system helper.
|
// MakeHelper wraps the make program and its surrounding build system.
|
||||||
type MakeHelper struct {
|
type MakeHelper struct {
|
||||||
// Do not include default extras.
|
// Do not include default extras.
|
||||||
OmitDefaults bool
|
OmitDefaults bool
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
var _meson = H("meson")
|
var _meson = H("meson")
|
||||||
|
|
||||||
// MesonHelper is the [Meson] build system helper.
|
// MesonHelper builds and tests a meson project.
|
||||||
type MesonHelper struct {
|
type MesonHelper struct {
|
||||||
// Runs after setup.
|
// Runs after setup.
|
||||||
ScriptCompileEarly string
|
ScriptCompileEarly string
|
||||||
|
|||||||
@@ -1,14 +1,8 @@
|
|||||||
package rosa
|
package rosa
|
||||||
|
|
||||||
import (
|
|
||||||
"slices"
|
|
||||||
|
|
||||||
"hakurei.app/internal/pkg"
|
|
||||||
)
|
|
||||||
|
|
||||||
var _perl = H("perl")
|
var _perl = H("perl")
|
||||||
|
|
||||||
// MakeMakerHelper is the [Perl] MakeMaker helper.
|
// MakeMakerHelper builds projects using the included MakeMaker script.
|
||||||
type MakeMakerHelper struct {
|
type MakeMakerHelper struct {
|
||||||
// Whether to skip the check target.
|
// Whether to skip the check target.
|
||||||
SkipCheck bool
|
SkipCheck bool
|
||||||
@@ -49,17 +43,3 @@ make \
|
|||||||
script += "make DESTDIR=/work install\n"
|
script += "make DESTDIR=/work install\n"
|
||||||
return script
|
return script
|
||||||
}
|
}
|
||||||
|
|
||||||
// newViaPerlMakeMaker installs a perl module via Makefile.PL.
|
|
||||||
func (t Toolchain) newViaPerlMakeMaker(
|
|
||||||
name, version string,
|
|
||||||
source pkg.Artifact,
|
|
||||||
patches []KV,
|
|
||||||
extra ...ArtifactH,
|
|
||||||
) pkg.Artifact {
|
|
||||||
return t.NewPackage("perl-"+name, version, source, &PackageAttr{
|
|
||||||
Patches: patches,
|
|
||||||
}, (*MakeMakerHelper)(nil), slices.Concat(extra, P{
|
|
||||||
_perl,
|
|
||||||
})...)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
package rosa
|
package rosa
|
||||||
|
|
||||||
import (
|
|
||||||
"slices"
|
|
||||||
|
|
||||||
"hakurei.app/internal/pkg"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_python = H("python")
|
_python = H("python")
|
||||||
_pythonPyTest = H("python-pytest")
|
_pythonPyTest = H("python-pytest")
|
||||||
)
|
)
|
||||||
|
|
||||||
// PipHelper is the [Python] pip packaging helper.
|
// PipHelper installs python packages from source using pip.
|
||||||
type PipHelper struct {
|
type PipHelper struct {
|
||||||
// Path elements joined with source.
|
// Path elements joined with source.
|
||||||
Append []string
|
Append []string
|
||||||
@@ -94,27 +88,3 @@ pip3 install \
|
|||||||
'` + sourcePath.String() + `'
|
'` + sourcePath.String() + `'
|
||||||
` + script
|
` + script
|
||||||
}
|
}
|
||||||
|
|
||||||
// newPythonPackage registers a new [Python] package.
|
|
||||||
func (s *S) newPythonPackage(
|
|
||||||
name string, id int, description, website, version string,
|
|
||||||
source pkg.Artifact, attrP *PackageAttr, attr *PipHelper,
|
|
||||||
build P, extra ...ArtifactH,
|
|
||||||
) {
|
|
||||||
name = "python-" + name
|
|
||||||
s.MustRegister(name, func(t Toolchain) (*Metadata, pkg.Artifact) {
|
|
||||||
return &Metadata{
|
|
||||||
Name: name,
|
|
||||||
Description: description,
|
|
||||||
Website: website,
|
|
||||||
Version: version,
|
|
||||||
|
|
||||||
Dependencies: slices.Concat(P{_python}, extra),
|
|
||||||
|
|
||||||
ID: id,
|
|
||||||
}, t.NewPackage(name, version, source, attrP, attr, slices.Concat(
|
|
||||||
extra,
|
|
||||||
build,
|
|
||||||
)...)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ func (s *S) Collect() (handles P) {
|
|||||||
type deferredGit struct {
|
type deferredGit struct {
|
||||||
url string
|
url string
|
||||||
tag string
|
tag string
|
||||||
checksum string
|
checksum pkg.Checksum
|
||||||
}
|
}
|
||||||
|
|
||||||
// getFrame must be called before accessing s.
|
// getFrame must be called before accessing s.
|
||||||
@@ -661,13 +661,15 @@ func (s *S) getFrame() azalea.Frame {
|
|||||||
args azalea.FArgs,
|
args azalea.FArgs,
|
||||||
) (v any, set bool, err error) {
|
) (v any, set bool, err error) {
|
||||||
var a deferredGit
|
var a deferredGit
|
||||||
|
var checksum string
|
||||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||||
k("url"): &a.url,
|
k("url"): &a.url,
|
||||||
k("tag"): &a.tag,
|
k("tag"): &a.tag,
|
||||||
k("checksum"): &a.checksum,
|
k("checksum"): &checksum,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
a.checksum = mustDecode(checksum)
|
||||||
v = a
|
v = a
|
||||||
set = true
|
set = true
|
||||||
return
|
return
|
||||||
@@ -1047,7 +1049,7 @@ func (ctx *evalContext) pf(
|
|||||||
source = p
|
source = p
|
||||||
|
|
||||||
case deferredGit:
|
case deferredGit:
|
||||||
source = ctx.t.newTagRemote(p.url, p.tag, p.checksum)
|
source = ctx.t.NewViaGit(p.url, "refs/tags/"+p.tag, p.checksum)
|
||||||
|
|
||||||
case azalea.Ident:
|
case azalea.Ident:
|
||||||
var _meta *Metadata
|
var _meta *Metadata
|
||||||
|
|||||||
Reference in New Issue
Block a user