deps: Make the build flags shared between sites
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 23 Jan 2020 19:11:53 +0000 (20:11 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 23 Jan 2020 19:11:53 +0000 (20:11 +0100)
Updates #6789

deps/deps.go

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