Skip to content

Commit

Permalink
Fix post-build functions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterebden committed Feb 18, 2019
1 parent d6aff6a commit 1d23137
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 13.4.5
--------------

* Fixed some post-build functions that were incorrectly erroring.


Version 13.4.4
--------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.4.4
13.4.5
3 changes: 0 additions & 3 deletions src/parse/asp/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,7 @@ func buildRule(s *scope, args []pyObject) pyObject {
populateTarget(s, target, args)
s.state.AddTarget(s.pkg, target)
if s.Callback {
// We are in a post-build function, so add the target directly to the graph now.
log.Debug("Adding new target %s directly to graph", target.Label)
target.AddedPostBuild = true
s.state.Graph.AddTarget(target)
s.pkg.MarkTargetModified(target)
}
return pyString(":" + target.Label.Name)
Expand Down
1 change: 0 additions & 1 deletion src/parse/asp/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ type postBuildFunction struct {
}

func (f *postBuildFunction) Call(target *core.BuildTarget, output string) error {
log.Debug("Running post-build function for %s. Build output:\n%s", target.Label, output)
s := f.f.scope.NewPackagedScope(f.f.scope.state.Graph.PackageOrDie(target.Label))
s.Callback = true
s.Set(f.f.args[0], pyString(target.Label.Name))
Expand Down

0 comments on commit 1d23137

Please sign in to comment.