lang: Plumb the ctx deeper into the lang API

This commit is contained in:
James Shubin
2024-03-16 00:35:33 -04:00
parent 10319dd641
commit d6a6734b65
3 changed files with 12 additions and 12 deletions

View File

@@ -99,7 +99,7 @@ type Lang struct {
// NOTE: The trick is that we need to get the list of funcs to watch AND start
// watching them, *before* we pull their values, that way we'll know if they
// changed from the values we wanted.
func (obj *Lang) Init() error {
func (obj *Lang) Init(ctx context.Context) error {
if obj.Debug {
obj.Logf("input: %s", obj.Input)
tree, err := util.FsTree(obj.Fs, "/") // should look like gapi
@@ -232,7 +232,7 @@ func (obj *Lang) Init() error {
Debug: obj.Debug,
Logf: logf,
}
unifyErr := unifier.Unify(context.TODO())
unifyErr := unifier.Unify(ctx)
obj.Logf("type unification took: %s", time.Since(timing))
if unifyErr != nil {
return errwrap.Wrapf(unifyErr, "could not unify types")