Skip to content

Release 4.1.0

Latest

Choose a tag to compare

@abitofhelp abitofhelp released this 19 Dec 02:08
· 31 commits to main since this release
c3bc381

Deprecated

Result-based Try functions (procedural Map_Exception pattern)

  • Try_To_Result - Use Functional.Try.Map_To_Result
  • Try_To_Any_Result_With_Param - Use Functional.Try.Map_To_Result_With_Param
  • Try_To_Functional_Result - Use Functional.Try.Map_To_Result
  • Try_To_Result_With_Param - Use Functional.Try.Map_To_Result_With_Param

Rationale: Declarative exception mappings (data) are clearer and more
maintainable than procedural Map_Exception functions (code). The Map
versions use a mapping array that is self-documenting and allows multiple
exception-to-error-kind discriminations without if/elsif chains.

Note: Option-based Try functions (Try_To_Functional_Option,
Try_To_Option_With_Param) are NOT deprecated. They serve valid use cases
for "probe" operations with sensible defaults where error details don't matter.

Changed

  • Functional.Try.To_Result - Reimplemented with inline exception handling
    instead of delegating to deprecated Try_To_Functional_Result. This eliminates
    deprecation warnings when building the functional library itself.
  • Functional.Try.To_Option - Reimplemented with inline exception handling
    instead of delegating to Try_To_Functional_Option (consistency).
  • Added "When to Use Option" documentation section to functional-try.ads

Fixed

  • Suppress expected warnings in test suite:
    • test_try.adb: obsolescent warnings (testing deprecated functions still work)
    • test_scoped.adb: "condition is always True" (intentional test pattern)
  • Added *__GNATPP-TEMP to .gitignore (GNAT Pretty Print temp files)

Technical Details

  • Test Coverage: 269 unit tests (all passing)
  • SPARK Status: 410 checks: 8 flow, 401 proved, 1 unproved (~98% proved)

SPARK Formal Verification

Metric Result
Status Verified
Mode gnatprove --mode=prove --level=2
Results 410 checks: 8 flow, 401 proved, 1 unproved

Verified using SPARK Ada formal verification tools.