Skip to content
Snippets Groups Projects
Commit 77d43564 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix parsing of absolute job dependencies


It seems that Python code generates (sometimes) absolute job
dependencies which are strings, instead of integers, so we should be
able to parse these as well. We simply change from explicit int-based
parsing (makeJobId) to the generic one (parseJobId).

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 1496f5f3
No related branches found
No related tags found
No related merge requests found
...@@ -437,9 +437,7 @@ instance JSON.JSON JobIdDep where ...@@ -437,9 +437,7 @@ instance JSON.JSON JobIdDep where
case JSON.readJSON v::JSON.Result (Negative Int) of case JSON.readJSON v::JSON.Result (Negative Int) of
-- first try relative dependency, usually most common -- first try relative dependency, usually most common
JSON.Ok r -> return $ JobDepRelative r JSON.Ok r -> return $ JobDepRelative r
JSON.Error _ -> liftM JobDepAbsolute JSON.Error _ -> liftM JobDepAbsolute (parseJobId v)
(fromJResult "parsing absolute job id" (readJSON v) >>=
makeJobId)
-- | Job Dependency type. -- | Job Dependency type.
data JobDependency = JobDependency JobIdDep [FinalizedJobStatus] data JobDependency = JobDependency JobIdDep [FinalizedJobStatus]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment