Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
fix: wait for deps to build on a bare print-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu committed Oct 7, 2021
1 parent c20a29c commit 1872470
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Lake/BuildPackage.lean
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,14 @@ def Package.buildImportsAndDeps
(imports : List String := []) (self : Package) : BuildM (List Package) := do
-- resolve and build deps
let depTargets ← self.buildDepTargets
let depTarget ← self.buildDepTargetWith depTargets
let depPkgs := depTargets.map (·.package) |>.foldl (flip List.cons) []
-- build any additional imports
unless imports.isEmpty do
if imports.isEmpty then
-- wait for deps to finish building
discard depTarget.materialize
else
-- build additional imports
let moreOleanDirs := depPkgs.map (·.oleanDir)
let depTarget ← self.buildDepTargetWith depTargets
let localImports := self.filterLocalImports imports
let oleanTargets ← self.buildModuleOleanTargets localImports moreOleanDirs depTarget
oleanTargets.forM (discard ·.materialize)
Expand Down

0 comments on commit 1872470

Please sign in to comment.