deps: Make the build flags shared between sites

Updates #6789
This commit is contained in:
Bjørn Erik Pedersen 2020-01-23 20:11:53 +01:00
parent f441f67512
commit 0df7bd62df
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

4
deps/deps.go vendored
View file

@ -94,7 +94,7 @@ type Deps struct {
BuildStartListeners *Listeners BuildStartListeners *Listeners
// Atomic flags set during a build. // Atomic flags set during a build.
BuildFlags BuildFlags BuildFlags *BuildFlags
*globalErrHandler *globalErrHandler
} }
@ -274,6 +274,7 @@ func New(cfg DepsCfg) (*Deps, error) {
Site: cfg.Site, Site: cfg.Site,
FileCaches: fileCaches, FileCaches: fileCaches,
BuildStartListeners: &Listeners{}, BuildStartListeners: &Listeners{},
BuildFlags: &BuildFlags{},
Timeout: time.Duration(timeoutms) * time.Millisecond, Timeout: time.Duration(timeoutms) * time.Millisecond,
globalErrHandler: &globalErrHandler{}, globalErrHandler: &globalErrHandler{},
} }
@ -330,7 +331,6 @@ func (d Deps) ForLanguage(cfg DepsCfg, onCreated func(d *Deps) error) (*Deps, er
} }
d.BuildStartListeners = &Listeners{} d.BuildStartListeners = &Listeners{}
d.BuildFlags = BuildFlags{}
return &d, nil return &d, nil