Skip to content

Commit

Permalink
Merge pull request #213 from objectionary/208-support-metrics-report-…
Browse files Browse the repository at this point in the history
…generation

208 support metrics report generation
  • Loading branch information
fizruk authored Mar 25, 2024
2 parents dc33eac + fa4e5ce commit aec361c
Show file tree
Hide file tree
Showing 20 changed files with 1,248 additions and 164 deletions.
76 changes: 67 additions & 9 deletions .github/workflows/ghc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ jobs:
submodules: true

- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
# TODO #208:10m replace with freckle/stack-action after https://github.com/freckle/stack-action/pull/69 is merged
uses: deemp/stack-action@main
with:
stack-build-arguments: ${{ github.ref_name != 'master' && '--fast' || '' }} --pedantic
test: ${{ matrix.os != 'windows-latest' }}
# TODO #213:10m enable macos test after https://github.com/objectionary/normalizer/issues/180 is resolved
# TODO #98:10m enable windows tests after https://github.com/objectionary/normalizer/issues/185 is resolved
test: ${{ matrix.os != 'windows-latest' && matrix.os != 'macos-latest'}}

- uses: actions/setup-node@v4
with:
Expand All @@ -75,6 +78,49 @@ jobs:
shell: bash
run: ./scripts/pipeline.sh

- name: Upload pipeline artifact
id: pipeline-artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: pipeline-${{ runner.os }}-${{ hashFiles('pipeline/eo/*.eo') }}
overwrite: true
path: |
pipeline
!pipeline/**/.eoc
!pipeline/yaml
report
- name: Write about the artifact in the job summary
if: always()
shell: bash
run: |
cat << EOF >> $GITHUB_STEP_SUMMARY
<h2>Artifact</h2>
<p>
The artifact
<a href="${{ steps.pipeline-artifact.outputs.artifact-url }}">
pipeline-${{ runner.os }}-${{ hashFiles('pipeline/eo/*.eo') }}
</a> contains files used or produced during the pipeline run:
</p>
<ul>
<li>EO and PHI programs</li>
<li>Reports</li>
</ul>
EOF
- name: Write the report in the job summary
if: success()
shell: bash
run: |
cat << EOF >> $GITHUB_STEP_SUMMARY
<h2>Report</h2>
<details>
<summary>Click to expand</summary>
$(cat report/report.md)
</details>
EOF
docs:
needs: pipeline
if: ${{ github.ref_name == 'master' }}
Expand All @@ -86,15 +132,17 @@ jobs:
uses: actions/checkout@v4

- name: 🧰 Setup Stack
uses: freckle/stack-action@v5
# TODO #208:10m replace with freckle/stack-action after https://github.com/freckle/stack-action/pull/69 is merged
uses: deemp/stack-action@main
with:
test: false
stack-build-arguments: --fast --haddock

- name: 🔨 Build Haddock Documentation (with Stack)
run: |
stack haddock
mkdir -p dist/haddock
mv $(stack path --local-doc-root)/* dist/haddock
- name: Download pipeline artifact
uses: actions/download-artifact@v4
with:
pattern: pipeline-${{ runner.os }}-*
merge-multiple: true

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
Expand All @@ -103,12 +151,22 @@ jobs:

- name: Build site
run: |
ROOT=$PWD
mkdir -p dist/haddock
mv $(stack path --local-doc-root)/* dist/haddock
cd site/docs
mdbook build
mv docs ../../dist
cd ../..
cd ..
cd site
mv index.html ../dist
cd ..
mkdir -p dist/report
cp report/report.html dist/report/index.html
- name: 🚀 Publish Site
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
79 changes: 73 additions & 6 deletions eo-phi-normalizer/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
Expand All @@ -24,26 +26,31 @@

module Main (main) where

import Control.Monad (unless, when)
import Control.Monad (forM, unless, when)
import Data.Foldable (forM_)

import Control.Exception (Exception (..), SomeException, catch, throw)
import Control.Lens ((^.))
import Data.Aeson (ToJSON)
import Data.Aeson.Encode.Pretty (Config (..), Indent (..), defConfig, encodePrettyToTextBuilder')
import Data.List (intercalate)
import Data.String.Interpolate (i, iii)
import Data.Text.Internal.Builder (toLazyText)
import Data.Text.Lazy.Lens
import Data.Text.Lazy as TL (unpack)
import Data.Yaml (decodeFileThrow)
import GHC.Generics (Generic)
import Language.EO.Phi (Bytes (Bytes), Object (Formation), Program (Program), parseProgram, printTree)
import Language.EO.Phi.Dataize (dataizeRecursively, dataizeRecursivelyChain, dataizeStep, dataizeStepChain)
import Language.EO.Phi.Metrics (ProgramMetrics, getProgramMetrics, splitPath)
import Language.EO.Phi.Metrics.Collect as Metrics (getProgramMetrics)
import Language.EO.Phi.Metrics.Data as Metrics (ProgramMetrics (..), splitPath)
import Language.EO.Phi.Report.Data (Report'InputConfig (..), Report'OutputConfig (..), ReportConfig (..), ReportItem (..), makeProgramReport, makeReport)
import Language.EO.Phi.Report.Html (ReportFormat (..), reportCSS, reportJS, toStringReport)
import Language.EO.Phi.Report.Html qualified as ReportHtml (ReportConfig (..))
import Language.EO.Phi.Rules.Common (ApplicationLimits (ApplicationLimits), applyRulesChainWith, applyRulesWith, defaultContext, objectSize, propagateName1)
import Language.EO.Phi.Rules.Yaml (RuleSet (rules, title), convertRuleNamed, parseRuleSetFromFile)
import Options.Applicative hiding (metavar)
import Options.Applicative qualified as Optparse (metavar)
import System.Directory (doesFileExist)
import System.Directory (createDirectoryIfMissing, doesFileExist)
import System.FilePath (takeDirectory)
import System.IO (IOMode (WriteMode), getContents', hFlush, hPutStr, hPutStrLn, openFile, stdout)

data CLI'TransformPhi = CLI'TransformPhi
Expand Down Expand Up @@ -74,10 +81,16 @@ data CLI'MetricsPhi = CLI'MetricsPhi
}
deriving (Show)

newtype CLI'ReportPhi = CLI'ReportPhi
{ configFile :: FilePath
}
deriving (Show)

data CLI
= CLI'TransformPhi' CLI'TransformPhi
| CLI'DataizePhi' CLI'DataizePhi
| CLI'MetricsPhi' CLI'MetricsPhi
| CLI'ReportPhi' CLI'ReportPhi
deriving (Show)

fileMetavarName :: String
Expand Down Expand Up @@ -150,6 +163,7 @@ data CommandParser = CommandParser
{ metrics :: Parser CLI'MetricsPhi
, transform :: Parser CLI'TransformPhi
, dataize :: Parser CLI'DataizePhi
, report :: Parser CLI'ReportPhi
}

commandParser :: CommandParser
Expand Down Expand Up @@ -185,11 +199,17 @@ commandParser =
recursive <- switch (long "recursive" <> help "Apply dataization + normalization recursively.")
chain <- switch (long "chain" <> help "Display all the intermediate steps.")
pure CLI'DataizePhi{..}
report = do
configFile <-
let file' = metavarName.file
in strOption (long "config" <> short 'c' <> metavar.file <> help [i|The #{file'} with a report configuration.|])
pure CLI'ReportPhi{..}

data CommandParserInfo = CommandParserInfo
{ metrics :: ParserInfo CLI
, transform :: ParserInfo CLI
, dataize :: ParserInfo CLI
, report :: ParserInfo CLI
}

commandParserInfo :: CommandParserInfo
Expand All @@ -198,12 +218,14 @@ commandParserInfo =
{ metrics = info (CLI'MetricsPhi' <$> commandParser.metrics) (progDesc "Collect metrics for a PHI program.")
, transform = info (CLI'TransformPhi' <$> commandParser.transform) (progDesc "Transform a PHI program.")
, dataize = info (CLI'DataizePhi' <$> commandParser.dataize) (progDesc "Dataize a PHI program.")
, report = info (CLI'ReportPhi' <$> commandParser.report) (progDesc "Generate reports about initial and normalized PHI programs.")
}

data CommandNames = CommandNames
{ transform :: String
, metrics :: String
, dataize :: String
, report :: String
}

commandNames :: CommandNames
Expand All @@ -212,6 +234,7 @@ commandNames =
{ transform = "transform"
, metrics = "metrics"
, dataize = "dataize"
, report = "report"
}

cli :: Parser CLI
Expand All @@ -220,6 +243,7 @@ cli =
( command commandNames.transform commandParserInfo.transform
<> command commandNames.metrics commandParserInfo.metrics
<> command commandNames.dataize commandParserInfo.dataize
<> command commandNames.report commandParserInfo.report
)

cliOpts :: ParserInfo CLI
Expand All @@ -235,7 +259,7 @@ data StructuredJSON = StructuredJSON
deriving (Generic, ToJSON)

encodeToJSONString :: (ToJSON a) => a -> String
encodeToJSONString = (^. unpacked) . toLazyText . encodePrettyToTextBuilder' defConfig{confIndent = Spaces 2}
encodeToJSONString = TL.unpack . toLazyText . encodePrettyToTextBuilder' defConfig{confIndent = Spaces 2}

pprefs :: ParserPrefs
pprefs = prefs (showHelpOnEmpty <> showHelpOnError)
Expand Down Expand Up @@ -389,3 +413,46 @@ main = do
Left obj -> logStrLn (printAsProgramOrAsObject obj)
Right (Bytes bytes) -> logStrLn bytes
)
CLI'ReportPhi' CLI'ReportPhi{..} -> do
reportConfig <- decodeFileThrow configFile

programReports <- forM reportConfig.items $ \item -> do
metricsPhi <- getMetrics item.bindingsPathPhi (Just item.phi)
metricsPhiNormalized <- getMetrics item.bindingsPathPhiNormalized (Just item.phiNormalized)
pure $ makeProgramReport reportConfig item metricsPhi metricsPhiNormalized

css <- maybe (pure reportCSS) readFile (reportConfig.input >>= (.css))
js <- maybe (pure reportJS) readFile (reportConfig.input >>= (.js))

let report = makeReport reportConfig programReports

reportConfigHtml =
ReportHtml.ReportConfig
{ expectedMetricsChange = reportConfig.expectedMetricsChange
, format =
ReportFormat'Html
{ ..
}
}
reportHtml = toStringReport reportConfigHtml report

reportJson = encodeToJSONString report

reportConfigMarkdown =
ReportHtml.ReportConfig
{ expectedMetricsChange = reportConfig.expectedMetricsChange
, format = ReportFormat'Markdown
}
reportMarkdown = toStringReport reportConfigMarkdown report

forM_ @[]
[ (x, y)
| (Just x, y) <-
[ (reportConfig.output.html, reportHtml)
, (reportConfig.output.json, reportJson)
, (reportConfig.output.markdown, reportMarkdown)
]
]
$ \(path, reportString) -> do
createDirectoryIfMissing True (takeDirectory path)
writeFile path reportString
19 changes: 18 additions & 1 deletion eo-phi-normalizer/eo-phi-normalizer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ extra-source-files:
README.md
CHANGELOG.md
grammar/EO/Phi/Syntax.cf
report/main.js
report/styles.css

source-repository head
type: git
Expand All @@ -35,8 +37,11 @@ library
exposed-modules:
Language.EO.Phi
Language.EO.Phi.Dataize
Language.EO.Phi.Metrics
Language.EO.Phi.Metrics.Collect
Language.EO.Phi.Metrics.Data
Language.EO.Phi.Normalize
Language.EO.Phi.Report.Data
Language.EO.Phi.Report.Html
Language.EO.Phi.Rules.Common
Language.EO.Phi.Rules.PhiPaper
Language.EO.Phi.Rules.Yaml
Expand All @@ -62,11 +67,15 @@ library
aeson
, array >=0.5.5.0
, base >=4.7 && <5
, blaze-html
, blaze-markup
, directory
, file-embed
, filepath
, generic-lens
, lens
, mtl
, scientific
, string-interpolate
, template-haskell
, text
Expand All @@ -92,13 +101,17 @@ executable normalizer
, aeson-pretty
, array >=0.5.5.0
, base >=4.7 && <5
, blaze-html
, blaze-markup
, directory
, eo-phi-normalizer
, file-embed
, filepath
, generic-lens
, lens
, mtl
, optparse-applicative
, scientific
, string-interpolate
, template-haskell
, text
Expand Down Expand Up @@ -132,14 +145,18 @@ test-suite spec
, aeson
, array >=0.5.5.0
, base >=4.7 && <5
, blaze-html
, blaze-markup
, directory
, eo-phi-normalizer
, file-embed
, filepath
, generic-lens
, hspec
, hspec-discover
, lens
, mtl
, scientific
, string-interpolate
, template-haskell
, text
Expand Down
5 changes: 5 additions & 0 deletions eo-phi-normalizer/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ extra-source-files:
- README.md
- CHANGELOG.md
- grammar/EO/Phi/Syntax.cf
- report/*

verbatim:
cabal-version: 1.24
Expand Down Expand Up @@ -48,6 +49,10 @@ dependencies:
- generic-lens
- text
- template-haskell
- blaze-html
- blaze-markup
- scientific
- file-embed

default-extensions:
- ImportQualifiedPost
Expand Down
Loading

1 comment on commit aec361c

@0pdd
Copy link

@0pdd 0pdd commented on aec361c Mar 25, 2024

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/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20240325-10864-39j9lj [1]: + set -e + set -o pipefail + cd /tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 + pdd -v...

Please, copy and paste this stack trace to GitHub:

UserError
set -x && set -e && set -o pipefail && cd /tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0 && pdd -v -f /tmp/20240325-10864-39j9lj [1]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
+ pdd -v -f /tmp/20240325-10864-39j9lj

My version is 0.24.0
Ruby version is 3.1.4 at x86_64-linux
Reading from root dir /tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/.markdownlint.jsonc is a binary file (23 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/.vscode/settings.json is a binary file (564 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/flake.lock is a binary file (3369 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/package-lock.json is a binary file (27699 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/package.json is a binary file (63 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/renovate.json is a binary file (114 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/site/docs/src/image.png is a binary file (245811 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/site/docs/src/media/phi-grammar.png is a binary file (105642 bytes)
/tmp/0pdd20240325-2-4zk8ij/Z2l0QGdpdGh1Yi5jb206b2JqZWN0aW9uYXJ5L25vcm1hbGl6ZXIuZ2l0/site/docs/src/media/rules.jpg is a binary file (76143 bytes)
Reading .envrc ...
Reading .gitattributes ...
Reading .github/workflows/ghc.yml ...
Puzzle 208-7c05fdc7 10/DEV at .github/workflows/ghc.yml
Puzzle 213-0fc2ca1f 10/DEV at .github/workflows/ghc.yml
Puzzle 98-3c3fb254 10/DEV at .github/workflows/ghc.yml
Puzzle 208-7c05fdc7 10/DEV at .github/workflows/ghc.yml
Reading .github/workflows/release.yml ...
Reading .gitignore ...
Reading .gitmodules ...
Reading .hlint.yaml ...
Reading .pre-commit-config.yaml ...
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 ...
Reading eo-phi-normalizer/app/Main.hs ...
Reading eo-phi-normalizer/eo-phi-normalizer.cabal ...
Reading eo-phi-normalizer/grammar/EO/Phi/Syntax.cf ...
Reading eo-phi-normalizer/package.yaml ...
Reading eo-phi-normalizer/report/main.js ...
Reading eo-phi-normalizer/report/styles.css ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Dataize.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Metrics/Collect.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Metrics/Data.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Report/Data.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Report/Html.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs ...
Puzzle 166-b045973b 15/DEV at eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs
Puzzle 120-5abe27a3 30/DEV at eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/PhiPaper.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs ...
Puzzle 152-f0946015 30/DEV at eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi/TH.hs ...
Reading eo-phi-normalizer/src/Language/EO/Phi.hs ...
Reading eo-phi-normalizer/test/Language/EO/Phi/DataizeSpec.hs ...
Reading eo-phi-normalizer/test/Language/EO/PhiSpec.hs ...
Reading eo-phi-normalizer/test/Language/EO/Rules/PhiPaperSpec.hs ...
Reading eo-phi-normalizer/test/Language/EO/YamlSpec.hs ...
Reading eo-phi-normalizer/test/Spec.hs ...
Reading eo-phi-normalizer/test/Test/EO/Phi.hs ...
Reading eo-phi-normalizer/test/Test/EO/Yaml.hs ...
Reading eo-phi-normalizer/test/Test/Metrics/Phi.hs ...
Reading eo-phi-normalizer/test/eo/phi/confluence.yaml ...
Reading eo-phi-normalizer/test/eo/phi/dataization.yaml ...
Reading eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml ...
Reading eo-phi-normalizer/test/eo/phi/metrics.yaml ...
Reading eo-phi-normalizer/test/eo/phi/rule-1.yaml ...
Reading eo-phi-normalizer/test/eo/phi/rule-6.yaml ...
Reading eo-phi-normalizer/test/eo/phi/rules/yegor.yaml ...
Reading flake.nix ...
Reading fourmolu.yaml ...
Reading hie.yaml ...
Reading pipeline/config.yaml ...
Reading report/.gitignore ...
Reading report/config.yaml ...
Reading requirements.txt ...
Reading scripts/pipeline.sh ...
Reading scripts/run-fourmolu.sh ...
Reading scripts/run-hlint.sh ...
Reading scripts/transform-eo-tests/app/Main.hs ...
Reading scripts/transform-eo-tests/package.yaml ...
Reading scripts/transform-eo-tests/transform-eo-tests.cabal ...
Reading scripts/try-unphi.sh ...
Reading site/README.md ...
Reading site/docs/.gitignore ...
Reading site/docs/book.toml ...
Reading site/docs/src/SUMMARY.md ...
Reading site/docs/src/commands/normalizer-dataize.md ...
Reading site/docs/src/commands/normalizer-metrics.md ...
Reading site/docs/src/commands/normalizer-report.md ...
Reading site/docs/src/commands/normalizer-transform.md ...
Reading site/docs/src/commands/normalizer.md ...
Reading site/docs/src/commands.md ...
Reading site/docs/src/common/sample-program.md ...
Reading site/docs/src/contributing.md ...
Reading site/docs/src/installation.md ...
Reading site/docs/src/introduction.md ...
Reading site/docs/theme/index.hbs ...
Reading site/docs/theme/pagetoc.css ...
Reading site/docs/theme/pagetoc.js ...
Reading site/index.html ...
Reading stack.yaml ...
Reading stack.yaml.lock ...
ERROR: there are 2 duplicate(s) of the same puzzle: .github/workflows/ghc.yml:60-60, .github/workflows/ghc.yml:135-135, while maximum 1 duplicate is allowed
ERROR: ERROR: 1 errors, see log above
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:74:in `rescue in block in xml'
/app/objects/git_repo.rb:71: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:70:in `xml'
/app/objects/puzzles.rb:46: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:549:in `process_request'
/app/0pdd.rb:380:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1089:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1120:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1069:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1190:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1185:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:990:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/rewindable_input.rb:25:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/deflater.rb:47:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/logger.rb:19:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/common_logger.rb:43:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:266:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:259:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/head.rb:15:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/method_override.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:224:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:2115:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1890:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:111: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.