Renamed Manifest.lean to Pakcage.lean

This commit is contained in:
Mac Malone 2021-06-02 16:02:22 -04:00
parent d5d8ff588a
commit f2041789b7
9 changed files with 16 additions and 26 deletions

View file

@ -6,7 +6,7 @@ Authors: Gabriel Ebner, Sebastian Ullrich, Mac Malone
import Lean.Data.Name
import Lean.Elab.Import
import Leanpkg2.Resolve
import Leanpkg2.Manifest
import Leanpkg2.Package
import Leanpkg2.BuildConfig
import Leanpkg2.Make
import Leanpkg2.Proc

View file

@ -5,7 +5,7 @@ Authors: Sebastian Ullrich
-/
import Lean.Data.Name
import Lean.Elab.Import
import Leanpkg2.Manifest
import Leanpkg2.Package
import Leanpkg2.Proc
open Lean
@ -13,19 +13,6 @@ open System
namespace Leanpkg2
def buildPath : FilePath := "build"
def tempBuildPath := buildPath / "temp"
namespace Package
def buildDir (self : Package) : FilePath :=
self.dir / Leanpkg2.buildPath
def buildRoot (self : Package) : FilePath :=
self.buildDir / self.manifest.module
end Package
structure BuildConfig where
module : Name
leanArgs : List String
@ -40,5 +27,3 @@ def fromPackages (module : Name) (leanArgs : List String) (pkgs : List Package)
leanPath := SearchPath.toString <| pkgs.map (·.buildDir)
moreDeps := pkgs.filter (·.dir.toString != ".") |>.map (·.buildRoot.withExtension "olean")
}
end BuildConfig

View file

@ -3,14 +3,14 @@ Copyright (c) 2017 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Gabriel Ebner, Sebastian Ullrich, Mac Malone
-/
import Leanpkg2.Manifest
import Leanpkg2.Package
import Leanpkg2.BuildConfig
open System
namespace Leanpkg2
def lockFileName : System.FilePath := ".leanpkg-lock"
def lockFileName : FilePath := ".leanpkg-lock"
partial def withLockFile (x : IO α) : IO α := do
acquire
@ -22,7 +22,7 @@ partial def withLockFile (x : IO α) : IO α := do
acquire (firstTime := true) :=
try
-- TODO: lock file should ideally contain PID
if !System.Platform.isWindows then
if !Platform.isWindows then
discard <| IO.Prim.Handle.mk lockFileName "wx"
else
-- `x` mode doesn't seem to work on Windows even though it's listed at

View file

@ -10,6 +10,10 @@ open Lean System
namespace Leanpkg2
def buildPath : FilePath := "build"
def tempBuildPath := buildPath / "temp"
def depsPath := buildPath / "deps"
inductive Source where
| path (dir : FilePath) : Source
| git (url rev : String) (branch : Option String) : Source
@ -54,4 +58,10 @@ def sourceDir (self : Package) : FilePath :=
def sourceRoot (self : Package) : FilePath :=
self.sourceDir / self.manifest.module
def buildDir (self : Package) : FilePath :=
self.dir / Leanpkg2.buildPath
def buildRoot (self : Package) : FilePath :=
self.buildDir / self.manifest.module
end Package

View file

@ -12,8 +12,6 @@ open System
namespace Leanpkg2
def depsPath := buildPath / "deps"
def Assignment := List (String × Package)
namespace Assignment

View file

@ -5,7 +5,7 @@ Authors: Gabriel Ebner, Sebastian Ullrich, Mac Malone
-/
import Leanpkg2.Toml
import Leanpkg2.LeanVersion
import Leanpkg2.Manifest
import Leanpkg2.Package
open System

View file

@ -1,5 +1,4 @@
import Leanpkg2.Build
import Leanpkg2.Manifest
open Leanpkg2

View file

@ -1,5 +1,4 @@
import Leanpkg2.Build
import Leanpkg2.Manifest
open Leanpkg2

View file

@ -1,5 +1,4 @@
import Leanpkg2.Build
import Leanpkg2.Manifest
open Leanpkg2 System