Skip to content

Commit

Permalink
Merge pull request #7 from objectionary/add-flake
Browse files Browse the repository at this point in the history
Add flake
  • Loading branch information
fizruk authored Dec 27, 2023
2 parents a8107fe + 4db66f4 commit 4be3680
Show file tree
Hide file tree
Showing 14 changed files with 382 additions and 129 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"haskell.formattingProvider": "fourmolu"
}
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: eo-phi-normalizer
10 changes: 2 additions & 8 deletions eo-phi-normalizer/eo-phi-normalizer.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: 2.2
cabal-version: 1.24

-- This file has been generated from package.yaml by hpack version 0.36.0.
--
Expand All @@ -12,7 +12,7 @@ bug-reports: https://github.com/objectionary/eo-phi-normalizer/issues
author: EO/Polystat Development Team
maintainer: [email protected]
copyright: 2023 EO/Polystat Development Team
license: BSD-3-Clause
license: BSD3
license-file: LICENSE
build-type: Custom
extra-source-files:
Expand Down Expand Up @@ -40,8 +40,6 @@ library
Language.EO.Phi.Syntax.Print
other-modules:
Paths_eo_phi_normalizer
autogen-modules:
Paths_eo_phi_normalizer
hs-source-dirs:
src
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-missing-export-lists
Expand All @@ -63,8 +61,6 @@ executable normalize-phi
main-is: Main.hs
other-modules:
Paths_eo_phi_normalizer
autogen-modules:
Paths_eo_phi_normalizer
hs-source-dirs:
app
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N
Expand All @@ -90,8 +86,6 @@ test-suite eo-phi-normalizer-test
Language.EO.PhiSpec
Test.EO.Phi
Paths_eo_phi_normalizer
autogen-modules:
Paths_eo_phi_normalizer
hs-source-dirs:
test
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -Wno-missing-export-lists -threaded -rtsopts -with-rtsopts=-N
Expand Down
5 changes: 4 additions & 1 deletion eo-phi-normalizer/package.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: eo-phi-normalizer
version: 0.1.0
github: "objectionary/eo-phi-normalizer"
license: BSD-3-Clause
license: BSD3
author: "EO/Polystat Development Team"
maintainer: "[email protected]"
copyright: "2023 EO/Polystat Development Team"
Expand All @@ -11,6 +11,9 @@ extra-source-files:
- CHANGELOG.md
- grammar/EO/Phi/Syntax.cf

verbatim:
cabal-version: 1.24

# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web
Expand Down
73 changes: 38 additions & 35 deletions eo-phi-normalizer/src/Language/EO/Phi.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE LambdaCase #-}

module Language.EO.Phi (
defaultMain,
normalize,
Expand All @@ -8,22 +9,21 @@ module Language.EO.Phi (
module Language.EO.Phi.Syntax.Abs,
) where


import Data.Char (isSpace)
import System.Exit (exitFailure)

import qualified Language.EO.Phi.Syntax.Par as Phi
import qualified Language.EO.Phi.Syntax.Print as Phi
import Language.EO.Phi.Syntax.Abs
import qualified Language.EO.Phi.Syntax.Abs as Phi
import qualified Language.EO.Phi.Syntax.Par as Phi
import qualified Language.EO.Phi.Syntax.Print as Phi

import Language.EO.Phi.Normalize

-- | Parse a 'Program' or return a parsing error.
parseProgram :: String -> Either String Phi.Program
parseProgram input = Phi.pProgram tokens
where
tokens = Phi.myLexer input
where
tokens = Phi.myLexer input

-- | Parse a 'Program' from a 'String'.
-- May throw an 'error` if input has a syntactical or lexical errors.
Expand All @@ -38,7 +38,7 @@ unsafeParseProgram input =
-- then pretty-prints the result to standard output.
defaultMain :: IO ()
defaultMain = do
input <- getContents -- read entire standard input
input <- getContents -- read entire standard input
let tokens = Phi.myLexer input
case Phi.pProgram tokens of
Left parseError -> do
Expand All @@ -50,7 +50,7 @@ defaultMain = do
-- * Overriding generated pretty-printer

-- | Like 'Phi.printTree', but without spaces around dots and no indentation for curly braces.
printTree :: Phi.Print a => a -> String
printTree :: (Phi.Print a) => a -> String
printTree = shrinkDots . render . Phi.prt 0

-- | Remove spaces around dots.
Expand All @@ -59,31 +59,34 @@ printTree = shrinkDots . render . Phi.prt 0
-- a ↦ ξ.a
shrinkDots :: String -> String
shrinkDots [] = []
shrinkDots (' ':'.':' ':cs) = '.':shrinkDots cs
shrinkDots (c:cs) = c : shrinkDots cs
shrinkDots (' ' : '.' : ' ' : cs) = '.' : shrinkDots cs
shrinkDots (c : cs) = c : shrinkDots cs

-- | Copy of 'Phi.render', except no indentation is made for curly braces.
render :: Phi.Doc -> String
render d = rend 0 False (map ($ "") $ d []) ""
where
rend
:: Int -- ^ Indentation level.
-> Bool -- ^ Pending indentation to be output before next character?
-> [String]
-> ShowS
where
rend ::
Int ->
-- \^ Indentation level.
Bool ->
-- \^ Pending indentation to be output before next character?
[String] ->
ShowS
rend i p = \case
"[" :ts -> char '[' . rend i False ts
"(" :ts -> char '(' . rend i False ts
-- "{" :ts -> onNewLine i p . showChar '{' . new (i+1) ts
-- "}" : ";":ts -> onNewLine (i-1) p . showString "};" . new (i-1) ts
-- "}" :ts -> onNewLine (i-1) p . showChar '}' . new (i-1) ts
[";"] -> char ';'
";" :ts -> char ';' . new i ts
t : ts@(s:_) | closingOrPunctuation s
-> pending . showString t . rend i False ts
t :ts -> pending . space t . rend i False ts
[] -> id
where
"[" : ts -> char '[' . rend i False ts
"(" : ts -> char '(' . rend i False ts
-- "{" :ts -> onNewLine i p . showChar '{' . new (i+1) ts
-- "}" : ";":ts -> onNewLine (i-1) p . showString "};" . new (i-1) ts
-- "}" :ts -> onNewLine (i-1) p . showChar '}' . new (i-1) ts
[";"] -> char ';'
";" : ts -> char ';' . new i ts
t : ts@(s : _)
| closingOrPunctuation s ->
pending . showString t . rend i False ts
t : ts -> pending . space t . rend i False ts
[] -> id
where
-- Output character after pending indentation.
char :: Char -> ShowS
char c = pending . showChar c
Expand All @@ -94,7 +97,7 @@ render d = rend 0 False (map ($ "") $ d []) ""

-- Indentation (spaces) for given indentation level.
indent :: Int -> ShowS
indent i = Phi.replicateS (2*i) (showChar ' ')
indent i = Phi.replicateS (2 * i) (showChar ' ')

-- Continue rendering in new line with new indentation.
new :: Int -> [String] -> ShowS
Expand All @@ -104,16 +107,16 @@ render d = rend 0 False (map ($ "") $ d []) ""
space :: String -> ShowS
space t s =
case (all isSpace t, null spc, null rest) of
(True , _ , True ) -> [] -- remove trailing space
(False, _ , True ) -> t -- remove trailing space
(False, True, False) -> t ++ ' ' : s -- add space if none
_ -> t ++ s
where
(spc, rest) = span isSpace s
(True, _, True) -> [] -- remove trailing space
(False, _, True) -> t -- remove trailing space
(False, True, False) -> t ++ ' ' : s -- add space if none
_ -> t ++ s
where
(spc, rest) = span isSpace s

closingOrPunctuation :: String -> Bool
closingOrPunctuation [c] = c `elem` closerOrPunct
closingOrPunctuation _ = False
closingOrPunctuation _ = False

closerOrPunct :: String
closerOrPunct = ")],;"
24 changes: 13 additions & 11 deletions eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}

module Language.EO.Phi.Normalize where

import Language.EO.Phi.Syntax.Abs
import Data.Maybe (fromMaybe)
import Language.EO.Phi.Syntax.Abs

data Context = Context
{ globalObject :: [Binding]
, thisObject :: [Binding]
, thisObject :: [Binding]
}

lookupBinding :: Attribute -> [Binding] -> Maybe Object
Expand All @@ -20,8 +21,9 @@ lookupBinding _ _ = Nothing
-- | Normalize an input 𝜑-program.
normalize :: Program -> Program
normalize (Program bindings) = Program (map (normalizeBindingWith context) bindings)
where
context = Context
where
context =
Context
{ globalObject = bindings
, thisObject = bindings
}
Expand All @@ -47,8 +49,8 @@ peelObject = \case
GlobalDispatch attr -> PeeledObject HeadGlobal [ActionDispatch attr]
ThisDispatch attr -> PeeledObject HeadThis [ActionDispatch attr]
Termination -> PeeledObject HeadTermination []
where
followedBy (PeeledObject object actions) action = PeeledObject object (actions ++ [action])
where
followedBy (PeeledObject object actions) action = PeeledObject object (actions ++ [action])

unpeelObject :: PeeledObject -> Object
unpeelObject (PeeledObject head_ actions) =
Expand All @@ -63,8 +65,8 @@ unpeelObject (PeeledObject head_ actions) =
ActionDispatch a : as -> go (ThisDispatch a) as
_ -> error "impossible: this object without dispatch!"
HeadTermination -> go Termination actions
where
go = foldl applyAction
applyAction object = \case
ActionDispatch attr -> ObjectDispatch object attr
ActionApplication bindings -> Application object bindings
where
go = foldl applyAction
applyAction object = \case
ActionDispatch attr -> ObjectDispatch object attr
ActionApplication bindings -> Application object bindings
44 changes: 25 additions & 19 deletions eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

2 comments on commit 4be3680

@0pdd
Copy link

@0pdd 0pdd commented on 4be3680 Dec 27, 2023

Choose a reason for hiding this comment

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

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20231227-1417433-o9laq2 [1]: + set -e + set -o pipefail + cd /tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 + pdd...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20231227-1417433-o9laq2 [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
+ pdd -v -f /tmp/20231227-1417433-o9laq2

My version is 0.23.2
Ruby version is 3.1.4 at x86_64-linux
Reading from root dir /tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
/tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/.vscode/settings.json is a binary file (48 bytes)
/tmp/0pdd20231227-14-2sx9rh/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/flake.lock is a binary file (529 bytes)
Reading .envrc ...
Reading .gitattributes ...
Reading .github/workflows/ghc.yml ...
Reading .gitignore ...
Reading README.md ...
Reading cabal.project ...
Reading eo-phi-normalizer/.gitignore ...
Reading eo-phi-normalizer/CHANGELOG.md ...
Reading eo-phi-normalizer/LICENSE ...
Reading eo-phi-normalizer/README.md ...
Reading eo-phi-normalizer/Setup.hs ...
ERROR: ERROR: eo-phi-normalizer/Setup.hs; PDD::Error at eo-phi-normalizer/Setup.hs:28: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:73:in `rescue in block in xml'
/app/objects/git_repo.rb:70:in `block in xml'
/app/vendor/ruby-3.1.4/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/app/objects/git_repo.rb:69:in `xml'
/app/objects/puzzles.rb:41:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:531:in `process_request'
/app/0pdd.rb:367:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1037:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1068:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1017:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1138:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1133:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/deflater.rb:44:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:261:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:254:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:219:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:2018:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1792:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

@0pdd
Copy link

@0pdd 0pdd commented on 4be3680 Dec 28, 2023

Choose a reason for hiding this comment

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

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20231228-1440169-sm6oju [1]: + set -e + set -o pipefail + cd /tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 + pdd...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20231228-1440169-sm6oju [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
+ pdd -v -f /tmp/20231228-1440169-sm6oju

My version is 0.23.2
Ruby version is 3.1.4 at x86_64-linux
Reading from root dir /tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
/tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/.vscode/settings.json is a binary file (48 bytes)
/tmp/0pdd20231228-14-iugxwi/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/flake.lock is a binary file (529 bytes)
Reading .envrc ...
Reading .gitattributes ...
Reading .github/workflows/ghc.yml ...
Reading .gitignore ...
Reading README.md ...
Reading cabal.project ...
Reading eo-phi-normalizer/.gitignore ...
Reading eo-phi-normalizer/CHANGELOG.md ...
Reading eo-phi-normalizer/LICENSE ...
Reading eo-phi-normalizer/README.md ...
Reading eo-phi-normalizer/Setup.hs ...
ERROR: ERROR: eo-phi-normalizer/Setup.hs; PDD::Error at eo-phi-normalizer/Setup.hs:28: TODO found, but puzzle can't be parsed, most probably because TODO is not followed by a puzzle marker, as this page explains: https://github.com/cqfn/pdd#how-to-format
If you can't understand the cause of this issue or you don't know how to fix it, please submit a GitHub issue, we will try to help you: https://github.com/cqfn/pdd/issues. This tool is still in its beta version and we will appreciate your feedback. Here is where you can find more documentation: https://github.com/cqfn/pdd/blob/master/README.md.
Exit code is 1

/app/objects/git_repo.rb:73:in `rescue in block in xml'
/app/objects/git_repo.rb:70:in `block in xml'
/app/vendor/ruby-3.1.4/lib/ruby/3.1.0/tempfile.rb:317:in `open'
/app/objects/git_repo.rb:69:in `xml'
/app/objects/puzzles.rb:41:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:531:in `process_request'
/app/0pdd.rb:367:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1037:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1068:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1017:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1138:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1133:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/deflater.rb:44:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:261:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:254:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:219:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:2018:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1792:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

Please sign in to comment.