Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

framework/afs: remove unused dep #377

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions framework/afs/afs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"io/fs"

"github.com/livebud/bud/framework"
"github.com/livebud/bud/internal/bail"
"github.com/livebud/bud/internal/gotemplate"
"github.com/livebud/bud/internal/imports"
Expand All @@ -24,12 +23,11 @@ func Generate(state *State) ([]byte, error) {
return generator.Generate(state)
}

func New(flag *framework.Flag, injector *di.Injector, log log.Log, module *gomod.Module) *Generator {
return &Generator{flag, injector, log, module}
func New(injector *di.Injector, log log.Log, module *gomod.Module) *Generator {
return &Generator{injector, log, module}
}

type Generator struct {
flag *framework.Flag
injector *di.Injector
log log.Log
module *gomod.Module
Expand Down
6 changes: 2 additions & 4 deletions framework/transpiler/transpiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"path/filepath"
"strings"

"github.com/livebud/bud/framework"
"github.com/livebud/bud/internal/gotemplate"
"github.com/livebud/bud/internal/imports"
"github.com/livebud/bud/internal/valid"
Expand All @@ -25,12 +24,11 @@ var template string
var generator = gotemplate.MustParse("framework/transpiler/transpiler.gotext", template)

// New transpiler generator
func New(flag *framework.Flag, log log.Log, module *gomod.Module, parser *parser.Parser) *Generator {
return &Generator{flag, log, module, parser}
func New(log log.Log, module *gomod.Module, parser *parser.Parser) *Generator {
return &Generator{log, module, parser}
}

type Generator struct {
flag *framework.Flag
log log.Log
module *gomod.Module
parser *parser.Parser
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ func (c *CLI) genFS(cache genfs.Cache, flag *framework.Flag, log log.Log, module
genfs := genfs.New(cache, fsys, log)
parser := parser.New(genfs, module)
injector := di.New(genfs, log, module, parser)
genfs.FileGenerator("bud/internal/generator/transpiler/transpiler.go", transpiler.New(flag, log, module, parser))
genfs.FileGenerator("bud/internal/generator/transpiler/transpiler.go", transpiler.New(log, module, parser))
genfs.FileGenerator("bud/internal/generator/generator.go", generator.New(log, module, parser))
genfs.FileGenerator("bud/cmd/afs/main.go", afs.New(flag, injector, log, module))
genfs.FileGenerator("bud/cmd/afs/main.go", afs.New(injector, log, module))
return genfs
}

Expand Down