Skip to content

Conversation

@hvr
Copy link
Member

@hvr hvr commented Aug 26, 2019

This change was triggered by trying make the codebase MonadFail
compatible which exposed a lookupM convenience wrapper which
reported lookup failures via Monad(fail). However, schema errors
such as missing keys or similar are supposed to be reported via
the ReportSchemaError(expected) mechanism.

This however prompts a major version increment to 0.6.0.0.

So this fixes two issues with one commit.

This change was triggered by trying make the codebase MonadFail compatible which exposed a `lookupM` convenience wrapper which reported lookup failures via Monad(fail). However, schema errors such as missing keys or similar are supposed to be reported via the `ReportSchemaError(expected)` mechanism. This however prompts a major version increment to 0.6.0.0. So this fixes two issues with one commit.
@hvr hvr requested a review from 23Skidoo August 26, 2019 13:38
@hvr hvr merged commit 471a7b8 into master Aug 26, 2019
@23Skidoo 23Skidoo deleted the pr/MFP-compat branch August 27, 2019 00:37
snapshotInfoRoot <- FileMap.lookupM snapshotMeta (pathRoot repoLayout)
snapshotInfoMirrors <- FileMap.lookupM snapshotMeta (pathMirrors repoLayout)
snapshotInfoTarGz <- FileMap.lookupM snapshotMeta (pathIndexTarGz repoLayout)
let lookupMeta k = case FileMap.lookup k snapshotMeta of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put lookupMeta in TUF.FileMap?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly wanted to avoid increasing the exported API surface with a trivial definition; after all, having something like lookupM exposed was what had been causing this headache in the first place...

@hvr hvr added this to the v0.6.0.0 milestone Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants