chore: add 'since' dates to deprecated (#4617)
This commit is contained in:
parent
9cc1164305
commit
554e723433
10 changed files with 16 additions and 16 deletions
|
|
@ -26,7 +26,7 @@ def toMonad [Monad m] [Alternative m] : Option α → m α := getM
|
|||
| some _ => true
|
||||
| none => false
|
||||
|
||||
@[deprecated isSome, inline] def toBool : Option α → Bool := isSome
|
||||
@[deprecated isSome (since := "2024-04-17"), inline] def toBool : Option α → Bool := isSome
|
||||
|
||||
/-- Returns `true` on `none` and `false` on `some x`. -/
|
||||
@[inline] def isNone : Option α → Bool
|
||||
|
|
|
|||
|
|
@ -194,12 +194,12 @@ instance : GetElem (List α) Nat α fun as i => i < as.length where
|
|||
@[simp] theorem getElem_cons_zero (a : α) (as : List α) (h : 0 < (a :: as).length) : getElem (a :: as) 0 h = a := by
|
||||
rfl
|
||||
|
||||
@[deprecated (since := "2024-6-12")] abbrev cons_getElem_zero := @getElem_cons_zero
|
||||
@[deprecated (since := "2024-06-12")] abbrev cons_getElem_zero := @getElem_cons_zero
|
||||
|
||||
@[simp] theorem getElem_cons_succ (a : α) (as : List α) (i : Nat) (h : i + 1 < (a :: as).length) : getElem (a :: as) (i+1) h = getElem as i (Nat.lt_of_succ_lt_succ h) := by
|
||||
rfl
|
||||
|
||||
@[deprecated (since := "2024-6-12")] abbrev cons_getElem_succ := @getElem_cons_succ
|
||||
@[deprecated (since := "2024-06-12")] abbrev cons_getElem_succ := @getElem_cons_succ
|
||||
|
||||
theorem get_drop_eq_drop (as : List α) (i : Nat) (h : i < as.length) : as[i] :: as.drop (i+1) = as.drop i :=
|
||||
match as, i with
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ namespace MessageLog
|
|||
def empty : MessageLog := {}
|
||||
|
||||
@[deprecated "renamed to `unreported`; direct access should in general be avoided in favor of \
|
||||
using `MessageLog.toList/toArray`"]
|
||||
using `MessageLog.toList/toArray`" (since := "2024-05-22")]
|
||||
def msgs : MessageLog → PersistentArray Message := unreported
|
||||
|
||||
def hasUnreported (log : MessageLog) : Bool :=
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ def _root_.Lean.MVarId.changeLocalDecl (mvarId : MVarId) (fvarId : FVarId) (type
|
|||
| _ => throwTacticEx `changeLocalDecl mvarId "unexpected auxiliary target"
|
||||
return mvarId
|
||||
|
||||
@[deprecated MVarId.changeLocalDecl]
|
||||
@[deprecated MVarId.changeLocalDecl (since := "2022-07-15")]
|
||||
def changeLocalDecl (mvarId : MVarId) (fvarId : FVarId) (typeNew : Expr) (checkDefEq := true) : MetaM MVarId := do
|
||||
mvarId.changeLocalDecl fvarId typeNew checkDefEq
|
||||
|
||||
|
|
|
|||
|
|
@ -103,5 +103,5 @@ Logs a build step with `message`.
|
|||
As a result, this no longer functions the way it used to. It now just logs the
|
||||
`message` via `logVerbose`.
|
||||
-/
|
||||
@[deprecated, inline] def logStep [Monad m] [MonadLog m] (message : String) : m Unit := do
|
||||
@[deprecated (since := "2024-05-25"), inline] def logStep [Monad m] [MonadLog m] (message : String) : m Unit := do
|
||||
logVerbose message
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ A build job for file that is expected to already exist.
|
|||
**Deprecated:** Use either `inputTextFile` or `inputBinFile`.
|
||||
`inputTextFile` normalizes line endings to produce platform-independent traces.
|
||||
-/
|
||||
@[deprecated] abbrev inputFile := @inputBinFile
|
||||
@[deprecated (since := "2024-06-08")] abbrev inputFile := @inputBinFile
|
||||
|
||||
/--
|
||||
Build an object file from a source file job using `compiler`. The invocation is:
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ example : MonadLiftT JobM FetchM := inferInstance
|
|||
example : MonadLiftT SpawnM FetchM := inferInstance
|
||||
|
||||
/-- The top-level monad for Lake build functions. **Renamed `FetchM`.** -/
|
||||
@[deprecated FetchM] abbrev IndexBuildM := FetchM
|
||||
@[deprecated FetchM (since := "2024-04-30")] abbrev IndexBuildM := FetchM
|
||||
|
||||
/-- The old build monad. **Uses should generally be replaced by `FetchM`.** -/
|
||||
@[deprecated FetchM] abbrev BuildM := BuildT LogIO
|
||||
@[deprecated FetchM (since := "2024-04-30")] abbrev BuildM := BuildT LogIO
|
||||
|
||||
/-- Fetch the result associated with the info using the Lake build index. -/
|
||||
@[inline] def BuildInfo.fetch (self : BuildInfo) [FamilyOut BuildData self.key α] : FetchM α :=
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ instance : MonadLift LogIO JobM := ⟨ELogT.takeAndRun⟩
|
|||
abbrev SpawnM := BuildT BaseIO
|
||||
|
||||
/-- The monad used to spawn asynchronous Lake build jobs. **Replaced by `SpawnM`.** -/
|
||||
@[deprecated SpawnM] abbrev SchedulerM := SpawnM
|
||||
@[deprecated SpawnM (since := "2024-05-21")] abbrev SchedulerM := SpawnM
|
||||
|
||||
/-- A Lake job. -/
|
||||
structure Job (α : Type u) where
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ If not, check if the info is newer than this trace's modification time.
|
|||
**Deprecated:** Should not be done manually,
|
||||
but as part of `buildUnlessUpToDate`.
|
||||
-/
|
||||
@[deprecated, specialize] def checkAgainstFile
|
||||
@[deprecated (since := "2024-06-14"), specialize] def checkAgainstFile
|
||||
[CheckExists i] [GetMTime i]
|
||||
(info : i) (traceFile : FilePath) (self : BuildTrace)
|
||||
: BaseIO Bool := do
|
||||
|
|
@ -292,7 +292,7 @@ Write trace to a file.
|
|||
**Deprecated:** Should not be done manually,
|
||||
but as part of `buildUnlessUpToDate`.
|
||||
-/
|
||||
@[deprecated] def writeToFile (traceFile : FilePath) (self : BuildTrace) : IO PUnit := do
|
||||
@[deprecated (since := "2024-06-14")] def writeToFile (traceFile : FilePath) (self : BuildTrace) : IO PUnit := do
|
||||
createParentDirs traceFile
|
||||
IO.FS.writeFile traceFile self.hash.toString
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export MonadLog (logEntry)
|
|||
message := mkErrorStringWithPos msg.fileName msg.pos str none
|
||||
}
|
||||
|
||||
@[deprecated] def logToIO (e : LogEntry) (minLv : LogLevel) : BaseIO PUnit := do
|
||||
@[deprecated (since := "2024-05-18")] def logToIO (e : LogEntry) (minLv : LogLevel) : BaseIO PUnit := do
|
||||
match e.level with
|
||||
| .trace => if minLv ≥ .trace then
|
||||
IO.println e.message.trim |>.catchExceptions fun _ => pure ()
|
||||
|
|
@ -175,7 +175,7 @@ abbrev lift [MonadLiftT m n] (self : MonadLog m) : MonadLog n where
|
|||
instance [MonadLift m n] [methods : MonadLog m] : MonadLog n := methods.lift
|
||||
|
||||
set_option linter.deprecated false in
|
||||
@[deprecated] abbrev io [MonadLiftT BaseIO m] (minLv := LogLevel.info) : MonadLog m where
|
||||
@[deprecated (since := "2024-05-18")] abbrev io [MonadLiftT BaseIO m] (minLv := LogLevel.info) : MonadLog m where
|
||||
logEntry e := logToIO e minLv
|
||||
|
||||
abbrev stream [MonadLiftT BaseIO m]
|
||||
|
|
@ -486,7 +486,7 @@ abbrev run?' [Functor m] (self : ELogT m α) (log : Log := {}) : m (Option α) :
|
|||
@[inline] def catchLog [Monad m] (f : Log → LogT m α) (self : ELogT m α) : LogT m α := do
|
||||
self.catchExceptions fun errPos => do f (← takeLogFrom errPos)
|
||||
|
||||
@[deprecated run?] abbrev captureLog := @run?
|
||||
@[deprecated run? (since := "2024-05-18")] abbrev captureLog := @run?
|
||||
|
||||
/--
|
||||
Run `self` with the log taken from the state of the monad `n`,
|
||||
|
|
@ -532,7 +532,7 @@ instance : MonadLift IO LogIO := ⟨MonadError.runIO⟩
|
|||
|
||||
namespace LogIO
|
||||
|
||||
@[deprecated ELogT.run?] abbrev captureLog := @ELogT.run?
|
||||
@[deprecated ELogT.run? (since := "2024-05-18")] abbrev captureLog := @ELogT.run?
|
||||
|
||||
/--
|
||||
Runs a `LogIO` action in `BaseIO`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue