diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index 9ebb06e..285e98a 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -34,6 +34,8 @@ import Data.Attoparsec.Text import Data.Text (pack, unpack) +import Data.Conduit.SmartSource + getShowChallengeR :: Text -> Handler Html getShowChallengeR name = do (Entity challengeId challenge) <- runDB $ getBy404 $ UniqueName name @@ -325,7 +327,7 @@ checkOrInsertEvaluation repoDir chan out = do case resultOrException of Right (Left _) -> do err chan "Cannot parse options, check the challenge repo" - Right (Right (_, Just [result])) -> do + Right (Right (_, Just [(_, [result])])) -> do msg chan $ concat [ "Evaluated! Score ", (T.pack $ show result) ] time <- liftIO getCurrentTime _ <- runDB $ insert $ Evaluation { @@ -342,7 +344,7 @@ checkOrInsertEvaluation repoDir chan out = do Left exception -> do err chan $ "Evaluation failed: " ++ (T.pack $ show exception) -rawEval :: FilePath -> Metric -> FilePath -> Text -> IO (Either GEvalException (Either (ParserResult GEvalOptions) (GEvalOptions, Maybe [MetricValue]))) +rawEval :: FilePath -> Metric -> FilePath -> Text -> IO (Either GEvalException (Either (ParserResult GEvalOptions) (GEvalOptions, Maybe [(SourceSpec, [MetricValue])]))) rawEval challengeDir metric repoDir name = Import.try (runGEvalGetOptions [ "--alt-metric", (show metric), "--expected-directory", challengeDir, diff --git a/gonito.cabal b/gonito.cabal index cf81981..bd42688 100644 --- a/gonito.cabal +++ b/gonito.cabal @@ -122,7 +122,7 @@ library , filemanip , cryptohash , markdown - , geval >= 1.0.0.0 + , geval >= 1.1.0.0 && < 1.2 , filepath , yesod-table , regex-tdfa diff --git a/stack.yaml b/stack.yaml index 2027359..bc55577 100644 --- a/stack.yaml +++ b/stack.yaml @@ -8,7 +8,7 @@ packages: git: https://github.com/bitemyapp/esqueleto commit: b81e0d951e510ebffca03c5a58658ad884cc6fbd extra-dep: true -extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0] +extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0,naturalcomp-0.0.3] resolver: lts-11.9 image: container: