Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into lean-pr-testing-3159
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Jan 31, 2024
2 parents d0c1e82 + 1da03e9 commit 92fdc15
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,22 @@ def widgetJsAllTarget (pkg : NPackage _package.name) (isDev : Bool) :
-- Conservatively, every .js build depends on all the .tsx source files.
let depFiles := tsxs ++ #[ widgetDir / "rollup.config.js", widgetDir / "tsconfig.json" ]
let deps ← liftM <| depFiles.mapM inputFile
let deps := deps.push $ ← fetch (pkg.target ``widgetPackageLock)
let deps := deps.push $ ← widgetPackageLock.fetch
let nodeModulesMutex ← IO.Mutex.new false
let jobs ← tsxs.mapM fun tsx => widgetTsxTarget pkg nodeModulesMutex tsx.fileStem.get! deps isDev
BuildJob.collectArray jobs

target widgetJsAll (pkg : NPackage _package.name) : Array FilePath := do
target widgetJsAll pkg : Array FilePath := do
widgetJsAllTarget pkg (isDev := false)

target widgetJsAllDev (pkg : NPackage _package.name) : Array FilePath := do
target widgetJsAllDev pkg : Array FilePath := do
widgetJsAllTarget pkg (isDev := true)

@[default_target]
target all (pkg : NPackage _package.name) : Unit := do
let some lib := pkg.findLeanLib? ``ProofWidgets |
error "cannot find lean_lib target"
let job₁ ← fetch (pkg.target ``widgetJsAll)
target all : Unit := do
let lib ← ProofWidgets.get
let job₁ ← widgetJsAll.fetch
let _ ← job₁.await
let job₂ ← lib.recBuildLean
let job₂ ← lib.leanArts.fetch
let _ ← job₂.await
return .nil

0 comments on commit 92fdc15

Please sign in to comment.