UploadRecordRequest class

Writes the upload record, when the repository has asked for one.

Before the store command runs, not after. A record written afterwards makes the failure mode "shipped but unprovable" — an artifact in front of users whose commit nobody can name — while a record written first fails the upload it could not vouch for. The second is recoverable and the first is not.

Only for upload; a promote moves a build the store already holds and is not the moment anything was published from this repository. Only when the subcommand actually carries the options, so a parser that never declared --commit is skipped rather than interrogated. What one invocation would record, or null when it records nothing.

Split out of _recordUploadIfAsked so the decision can be tested without a store, a network or a git repository. It could not be before, and the consequence was not theoretical: reintroducing the ArgResults.options bug this class exists to fix left all 464 tests green, because the suite asserted that package:args distinguishes declared from provided options rather than that the guard asks the right one. A fix for a silent failure that no test can see regress is the same silent failure with a patch on it.

Constructors

UploadRecordRequest({required String? version, required String? build, required String? commit, required String? checksum, required bool dryRun})
const

Properties

build String?
final
checksum String?
final
commit String?
final
dryRun bool
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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