DVPromptLock class

The committed prompt lockfile, dartvel.prompts.lock: every version each prompt has had, and the fingerprint it had.

It is what makes "edited without incrementing the version" checkable. The source only holds the current version; without a record of what version 4 said, version 4 with new wording is indistinguishable from version 4.

Constructors

DVPromptLock(Map<String, List<DVPromptLockEntry>> prompts)
const
DVPromptLock.empty()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
prompts → Map<String, List<DVPromptLockEntry>>
By prompt id, oldest version first.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

check(Iterable<DVPromptVersion> compiled) → List<DVPromptLockProblem>
Compares the compiled prompts with what is recorded.
contains(DVPromptVersion version) → bool
Whether version is recorded with exactly its fingerprint.
encode() → String
entry(String id, int version) → DVPromptLockEntry?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
record(Iterable<DVPromptVersion> compiled) → DVPromptLock
Records every compiled version not yet recorded, refusing when check finds a problem.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

decode(String source) → DVPromptLock
Reads a lockfile, refusing one whose versions do not ascend: that file was edited by hand, and a check against it would pass edits it should refuse.

Constants

fileName → const String
Where the lockfile lives, next to pubspec.yaml.
format → const int
The on-disk format. A lockfile in another format is refused, not guessed.