Skip to content

Stop using partial functions #57

@NorfairKing

Description

@NorfairKing

As of GHC 9.10 I get this exception in cron:

smos-scheduler        >     test/Smos/Scheduler/RecurrenceSpec.hs:18
smos-scheduler        >   ✗ 1 Smos.Scheduler.RecurrenceSpec.computeNextRun.always activates a new item
smos-scheduler        >       Retries: 3 (does not look flaky)
smos-scheduler        >       Failed after 15 tests and 5 shrinks
smos-scheduler        >       Generated: 1858-11-17 00:00:00
smos-scheduler        >       Generated: PropertyValue {propertyValueText = ""}
smos-scheduler        >       Generated: ScheduleItem {scheduleItemDescription = Nothing, scheduleItemTemplateFile = "", scheduleItemDestination = DestinationPathTemplate {destinationPathTemplatePath = "a"}, scheduleItemRecurrence = RentRecurrence CronSchedule * 1-0 * * *}
smos-scheduler        >       NonEmpty.fromList: empty list
smos-scheduler        >       CallStack (from HasCallStack):
smos-scheduler        >         error, called at libraries/base/src/Data/List/NonEmpty.hs:238:15 in base:Data.List.NonEmpty
smos-scheduler        >         fromList, called at src/System/Cron/Internal/Check.hs:168:40 in cron-0.7.2-JSDGoxugtX53Eyo8zZdziC:System.Cron.Internal.Check
smos-scheduler        >       HasCallStack backtrace:
smos-scheduler        >         collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
smos-scheduler        >         toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:204:5 in ghc-internal:GHC.Internal.Exception
smos-scheduler        >         error, called at libraries/base/src/Data/List/NonEmpty.hs:238:15 in base:Data.List.NonEmpty
smos-scheduler        >         fromList, called at src/System/Cron/Internal/Check.hs:168:40 in cron-0.7.2-JSDGoxugtX53Eyo8zZdziC:System.Cron.Internal.Check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions