Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: have Lake not create core aliases into Lake namespace #5688

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Executable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Mac Malone
import Lake.Build.Common

namespace Lake
open System (FilePath)

/-! # Lean Executable Build
The build function definition for a Lean executable.
Expand Down
3 changes: 2 additions & 1 deletion src/lake/Lake/Build/Facets.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ definitions.
-/

namespace Lake
export System (SearchPath FilePath)
open Lean (Name)
open System (SearchPath FilePath)

/-- A dynamic/shared library for linking. -/
structure Dynlib where
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Index.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This module leverages the index to perform topologically-based recursive builds.

open Lean
namespace Lake
open System (FilePath)

/--
Converts a conveniently-typed target facet build function into its
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Info.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ the build.
-/

namespace Lake
open Lean (Name)

/-- The type of Lake's build info. -/
inductive BuildInfo
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Key.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Mac Malone
import Lake.Util.Name

namespace Lake
open Lean (Name)

/-- The type of keys in the Lake build store. -/
inductive BuildKey
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Library.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Build function definitions for a library's builtin facets.
-/

namespace Lake
open System (FilePath)

/-! ## Build Lean & Static Lib -/

Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Package.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Build function definitions for a package's builtin facets.

open System
namespace Lake
open Lean (Name)

/-- Compute a topological ordering of the package's transitive dependencies. -/
def Package.recComputeDeps (self : Package) : FetchM (Array Package) := do
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Build/Store.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ topological-based build of an initial key's dependencies).
-/

namespace Lake
open Lean (Name NameMap)

/-- A monad equipped with a Lake build store. -/
abbrev MonadBuildStore (m) := MonadDStore BuildKey BuildData m
Expand Down
2 changes: 2 additions & 0 deletions src/lake/Lake/Build/Targets.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Utilities for fetching package, library, module, and executable targets and face
-/

namespace Lake
open Lean (Name)
open System (FilePath)

/-! ## Package Facets & Targets -/

Expand Down
2 changes: 2 additions & 0 deletions src/lake/Lake/CLI/Actions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Lake.Build.Targets
import Lake.CLI.Build

namespace Lake
open Lean (Name)
open System (FilePath)

def env (cmd : String) (args : Array String := #[]) : LakeT IO UInt32 := do
IO.Process.spawn {cmd, args, env := ← getAugmentedEnv} >>= (·.wait)
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/CLI/Build.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Lake.Build.Index
import Lake.CLI.Error

namespace Lake
open Lean (Name)

/-! ## Build Target Specifiers -/

Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/CLI/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Lake.Build.Actions

namespace Lake
open Git System
open Lean (Name)

/-- The default module of an executable in `std` package. -/
def defaultExeRoot : Name := `Main
Expand Down
2 changes: 1 addition & 1 deletion src/lake/Lake/CLI/Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Lake.CLI.Serve
-- # CLI

open System
open Lean (Json toJson fromJson? LeanPaths)
open Lean (Json toJson fromJson? LeanPaths NameMap)

namespace Lake

Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/CLI/Serve.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Lean.Util.FileSetupInfo

namespace Lake
open Lean
open System (FilePath)

/-- Exit code to return if `setup-file` cannot find the config file. -/
def noConfigFileCode : ExitCode := 2
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Config/ExternLib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Mac Malone
import Lake.Config.Package

namespace Lake
open Lean (Name)

/-- An external library -- its package plus its configuration. -/
structure ExternLib where
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Config/FacetConfig.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Mac Malone, Mario Carneiro
import Lake.Build.Fetch

namespace Lake
open Lean (Name)

/-- A facet's declarative configuration. -/
structure FacetConfig (DataFam : Name → Type) (ι : Type) (name : Name) : Type where
Expand Down
2 changes: 1 addition & 1 deletion src/lake/Lake/Config/Monad.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Lake.Config.Context
import Lake.Config.Workspace

open System
open Lean (Name)
open Lean (Name NameMap)

/-! # Lake Configuration Monads
Definitions and helpers for interacting with the Lake configuration monads.
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Config/TargetConfig.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Mac Malone
import Lake.Build.Fetch

namespace Lake
open Lean (Name)

/-- A custom target's declarative configuration. -/
structure TargetConfig (pkgName name : Name) : Type where
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Config/Workspace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Lake.Util.Log
open System

namespace Lake
open Lean (Name)

/-- A Lake workspace -- the top-level package directory. -/
structure Workspace : Type where
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/DSL/Targets.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Macros for declaring Lake targets and facets.

namespace Lake.DSL
open Lean Parser Command
open System (FilePath)

syntax buildDeclSig :=
identOrStr (ppSpace simpleBinder)? Term.typeSpec declValSimple
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Load/Package.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ from Lake configuration file (either Lean or TOML).
open Lean

namespace Lake
open System (FilePath)

/--
Return whether a configuration file with the given name
Expand Down
1 change: 1 addition & 0 deletions src/lake/Lake/Load/Toml.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Lake configuration file written in TOML.
-/

namespace Lake
open System (FilePath)

open Toml

Expand Down
3 changes: 1 addition & 2 deletions src/lake/Lake/Util/Name.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import Lake.Util.RBArray
open Lean

namespace Lake

export Lean (Name NameMap)
open Lean (Name NameMap)

/--
First tries to convert a string into a legal name.
Expand Down
2 changes: 1 addition & 1 deletion src/lake/examples/targets/lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ package_facet print_name pkg : Unit := Job.async do
IO.println pkg.name
return ((), .nil)

module_facet get_src mod : FilePath := do
module_facet get_src mod : System.FilePath := do
inputTextFile mod.leanFile

module_facet print_src mod : Unit := do
Expand Down
Loading