lean4-htt/src/Lean/Util
Mac Malone dd64678f07
feat: server support for new module setup (#8699)
This PR adds support to the server for the new module setup process by
changing how `lake setup-file` is used.

In the new server setup, `lake setup-file` is invoked with the file name
of the edited module passed as a CLI argument and with the parsed header
passed to standard input in JSON form. Standard input is used to avoid
potentially exceeding the CLI length limits on Windows. Lake will build
the module's imports along with any other dependencies and then return
the module's workspace configuration via JSON (now in the form of
`ModuleSetup`). The server then post-processes this configuration a bit
and returns it back to the Lean language processor.

The server's header is currently only fully respected by Lake for
external modules (files that are not part of any workspace library). For
workspace modules, the saved module header is currently used to build
imports (as has been done since #7909). A follow-up Lake PR will align
both cases to follow the server's header.

Lean search paths (e.g., `LEAN_PATH`, `LEAN_SRC_PATH`) are no longer
negotiated between the server and Lake. These environment variables are
already configured during sever setup by `lake serve` and do not change
on a per-file basis. Lake can also pre-resolve the `.olean` files of
imports via the `importArts` field of `ModuleSetup`, limiting the
potential utility of communicating `LEAN_PATH`.
2025-06-23 18:00:14 +00:00
..
CollectAxioms.lean chore: disable #print axioms under the module system (#8174) 2025-04-30 12:00:09 +00:00
CollectFVars.lean feat: add Expr.fvarsSubset (#6430) 2024-12-20 22:29:47 +00:00
CollectLevelMVars.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
CollectLevelParams.lean
CollectLooseBVars.lean feat: Expr.collectLooseBVars (#8794) 2025-06-15 00:16:43 +00:00
CollectMVars.lean
Diff.lean fix: improve error-message hint rendering and API (#8486) 2025-06-01 01:22:09 +00:00
FindExpr.lean feat: add Expr.fvarsSubset (#6430) 2024-12-20 22:29:47 +00:00
FindLevelMVar.lean
FindMVar.lean
FoldConsts.lean feat: Environment.realizeConst (#7076) 2025-02-26 19:32:21 +00:00
ForEachExpr.lean feat: add Expr.fvarsSubset (#6430) 2024-12-20 22:29:47 +00:00
ForEachExprWhere.lean feat: deprecate Array.mkArray in favour of Array.replicate 2025-03-24 08:25:00 +01:00
FVarSubset.lean feat: add Expr.fvarsSubset (#6430) 2024-12-20 22:29:47 +00:00
HasConstCache.lean chore: use notation in favour of .empty functions (#7446) 2025-03-12 04:22:40 +00:00
Heartbeats.lean chore: remove mention of Lean.withSeconds (#5481) 2024-09-26 18:15:58 +00:00
InstantiateLevelParams.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
LakePath.lean
LeanOptions.lean feat: server support for new module setup (#8699) 2025-06-23 18:00:14 +00:00
MonadBacktrack.lean chore: do not use the coercion α → Option α in Init and Std (#8085) 2025-04-24 13:35:01 +00:00
MonadCache.lean chore: remove the old Lean.Data.HashMap implementation (#7519) 2025-03-20 23:49:55 +00:00
NumApps.lean
NumObjs.lean
OccursCheck.lean
Path.lean feat: ignore lean -R if module name is in setup (#8874) 2025-06-23 17:55:52 +00:00
PPExt.lean feat: do not propagate pretty printer errors through messages (#3696) 2024-12-11 04:10:09 +00:00
Profile.lean
Profiler.lean feat: meta syntax 2025-06-04 18:26:05 +02:00
PtrSet.lean chore: remove the old Lean.Data.HashMap implementation (#7519) 2025-03-20 23:49:55 +00:00
RecDepth.lean
Recognizers.lean feat: Lean.Expr.name? (#5760) 2024-10-18 02:40:26 +00:00
ReplaceExpr.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
ReplaceLevel.lean feat: add the nondep field of Expr.letE to the C++ data model (#8751) 2025-06-14 23:10:27 +00:00
SafeExponentiation.lean chore: preserve reported messages in MessageLog (#6307) 2024-12-11 12:24:00 +00:00
SCC.lean chore: do not use the coercion α → Option α in Init and Std (#8085) 2025-04-24 13:35:01 +00:00
SearchPath.lean chore: deprecated compile_time_search_path% (#7022) 2025-02-10 13:49:17 +00:00
ShareCommon.lean chore: rename HashMap.empty to HashMap.emptyWithCapacity (#7447) 2025-03-12 23:01:18 +00:00
Sorry.lean feat: labeled and unique sorries (#5757) 2024-12-11 23:53:02 +00:00
SortExprs.lean chore: use notation in favour of .empty functions (#7446) 2025-03-12 04:22:40 +00:00
TestExtern.lean chore: update copyrights (#5449) 2024-09-24 05:27:53 +00:00
Trace.lean perf: avoid contended access to IO.Ref in isTracingEnabledFor (#7601) 2025-03-21 12:07:25 +00:00