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

These are no longer needed after migration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-23 13:55:17 +09:00
parent 410c4f8bb0
commit e5a4094298
8 changed files with 12 additions and 65 deletions

View File

@@ -26,7 +26,7 @@ func (a busyboxBin) Params(*pkg.IContext) {}
// IsExclusive returns false: Cure performs a trivial filesystem write.
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 {
return []pkg.Artifact{a.bin}
}

View File

@@ -11,7 +11,7 @@ var (
_ninja = H("ninja")
)
// CMakeHelper is the [CMake] build system helper.
// CMakeHelper builds and tests a CMake project with specified CACHE entries.
type CMakeHelper struct {
// Path elements joined with source.
Append []string
@@ -34,7 +34,7 @@ type CMakeHelper struct {
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 {
if attr != nil && attr.Make {
return P{_cmake, _make}

View File

@@ -36,8 +36,3 @@ git \
rm -rf /work/.git
`, 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))
}

View File

@@ -7,7 +7,7 @@ import (
var _make = H("make")
// MakeHelper is the [Make] build system helper.
// MakeHelper wraps the make program and its surrounding build system.
type MakeHelper struct {
// Do not include default extras.
OmitDefaults bool

View File

@@ -7,7 +7,7 @@ import (
var _meson = H("meson")
// MesonHelper is the [Meson] build system helper.
// MesonHelper builds and tests a meson project.
type MesonHelper struct {
// Runs after setup.
ScriptCompileEarly string

View File

@@ -1,14 +1,8 @@
package rosa
import (
"slices"
"hakurei.app/internal/pkg"
)
var _perl = H("perl")
// MakeMakerHelper is the [Perl] MakeMaker helper.
// MakeMakerHelper builds projects using the included MakeMaker script.
type MakeMakerHelper struct {
// Whether to skip the check target.
SkipCheck bool
@@ -49,17 +43,3 @@ make \
script += "make DESTDIR=/work install\n"
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,
})...)
}

View File

@@ -1,17 +1,11 @@
package rosa
import (
"slices"
"hakurei.app/internal/pkg"
)
var (
_python = H("python")
_pythonPyTest = H("python-pytest")
)
// PipHelper is the [Python] pip packaging helper.
// PipHelper installs python packages from source using pip.
type PipHelper struct {
// Path elements joined with source.
Append []string
@@ -94,27 +88,3 @@ pip3 install \
'` + sourcePath.String() + `'
` + 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,
)...)
})
}

View File

@@ -411,7 +411,7 @@ func (s *S) Collect() (handles P) {
type deferredGit struct {
url string
tag string
checksum string
checksum pkg.Checksum
}
// getFrame must be called before accessing s.
@@ -661,13 +661,15 @@ func (s *S) getFrame() azalea.Frame {
args azalea.FArgs,
) (v any, set bool, err error) {
var a deferredGit
var checksum string
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
k("url"): &a.url,
k("tag"): &a.tag,
k("checksum"): &a.checksum,
k("checksum"): &checksum,
}); err != nil {
return
}
a.checksum = mustDecode(checksum)
v = a
set = true
return
@@ -1047,7 +1049,7 @@ func (ctx *evalContext) pf(
source = p
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:
var _meta *Metadata