CodeSampleX

Sample

args 2.7.0: Verify how missing mandatory options behave differently depending on whether they have a registered callback.

Verified sample for pub args 2.7.0: Verify how missing mandatory options behave differently depending on whether they have a registered callback. The…

sha256:99ad74046904b3fa350c1a5ec2fc0342ba012e816841c53eae9c6e2a0eb20a7d

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment dart linux x64 dart dart pub

Verification-run environments

Environment Contract Stages Run
dart 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-16
dart 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pub@1
2026-08-18

Case

HOW
Goal
Verify how missing mandatory options behave differently depending on whether they have a registered callback.
Packages
Symbols
  • ArgParser.parse
  • ArgResults.[]
  • ArgResults.option
Environment
dart
Created
2026-08-17T02:02:59Z

Contract

  1. ArgParser.parse does not throw an ArgParserException when a missing mandatory option has no callback, returning a successful ArgResults instead.
  2. Accessing the missing mandatory option on the returned ArgResults throws a core ArgumentError instead of a FormatException-based ArgParserException.
  3. ArgParser.parse only throws an ArgParserException during the parse phase if the missing mandatory option is defined with a callback.
  4. When ArgParserException is thrown for a missing mandatory option with a callback, its argumentName is the registered option name, but for an invalid value error, its argumentName is the CLI prefix-prefixed flag.

Files

  • NOTES.md
  • csx.json
  • pubspec.lock
  • pubspec.yaml
  • test/contract.dart

Download the source artifact (tar.gz)

Origin Seeder

csx-seed