From 3e45cf806258bb7c351f168ad359e8490cefab84 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 11 Jan 2024 16:20:12 +0300 Subject: [PATCH 1/8] fix: remove a trailing newline in normalize-phi output --- pipeline.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline.sh b/pipeline.sh index 04ba4239d..65ede6151 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -33,6 +33,7 @@ stack run normalize-phi < "$I" > "$IO" \ cat "$IO" exit 1 } +perl -i -pe 'chomp if eof' "$IO" printf "\n\nNormalizer succeeded!\n\n" printf "\n\n* Phi expression:\n\n" From 6e3440497a5cde48e650d23fa82cf6efec3d21cc Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 11 Jan 2024 16:21:37 +0300 Subject: [PATCH 2/8] fix: ignore diff exit code --- pipeline.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline.sh b/pipeline.sh index 65ede6151..f83ad9e43 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -1,3 +1,5 @@ +set -euo pipefail + mkdir -p pipeline cd pipeline @@ -41,7 +43,7 @@ cat "$I" printf "\n\n* Normalized Phi expression:\n\n" cat "$IO" printf "\n\n* Diff:\n\n" -diff "$I" "$IO" +diff "$I" "$IO" || true eo unphi From ecb7a8e3b198910a9a958f100841910115d50dd6 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 11 Jan 2024 16:21:51 +0300 Subject: [PATCH 3/8] feat: show EO code --- pipeline.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline.sh b/pipeline.sh index f83ad9e43..d317ee81d 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -37,7 +37,9 @@ stack run normalize-phi < "$I" > "$IO" \ } perl -i -pe 'chomp if eof' "$IO" -printf "\n\nNormalizer succeeded!\n\n" +printf "\n\nNormalizer succeeded!" +printf "\n\n* EO expression:\n\n" +cat app.eo printf "\n\n* Phi expression:\n\n" cat "$I" printf "\n\n* Normalized Phi expression:\n\n" From c0f3054b89e52a156d39113812aa8dda401e4efd Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 11 Jan 2024 16:21:59 +0300 Subject: [PATCH 4/8] fix: typo --- pipeline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.sh b/pipeline.sh index d317ee81d..dbb2ae594 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -26,7 +26,7 @@ I=".eoc/phi/app.bk.phi" mv "$IO" "$I" stack run normalize-phi < "$I" > "$IO" \ || { - printf "\n\nNormalizer failed" + printf "\n\nNormalizer failed!" printf "\n\n* EO expression:\n\n" cat app.eo printf "\n\n* Phi expression:\n\n" From c7be7e86344f14a7c06e277172d5469782ca2827 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 11 Jan 2024 16:22:41 +0300 Subject: [PATCH 5/8] fix: provide perl executable for the pipeline nix script --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c63ea5751..18e6ffcad 100644 --- a/flake.nix +++ b/flake.nix @@ -145,7 +145,13 @@ "${packageName}" = haskellPackages."${packageName}"; pipeline = { - runtimeInputs = [ stack pkgs.jdk21 packages.eoc pkgs.maven ]; + runtimeInputs = [ + stack + pkgs.jdk21 + packages.eoc + pkgs.maven + pkgs.perl + ]; text = '' JAVA_HOME="${pkgs.jdk21.home}" export JAVA_HOME From 1f82c139c2b41af47d659cdbbd5a60c66134bcc5 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Sat, 13 Jan 2024 20:15:41 +0300 Subject: [PATCH 6/8] refactor: nix script --- flake.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 18e6ffcad..5220dda72 100644 --- a/flake.nix +++ b/flake.nix @@ -153,8 +153,7 @@ pkgs.perl ]; text = '' - JAVA_HOME="${pkgs.jdk21.home}" - export JAVA_HOME + export JAVA_HOME="${pkgs.jdk21.home}" ${builtins.readFile ./pipeline.sh} ''; description = "Run pipeline"; From 8f5db8d201d652423c64685998628e2a7369c9fd Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Sat, 13 Jan 2024 20:16:10 +0300 Subject: [PATCH 7/8] fix: upgrade EO version --- pipeline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.sh b/pipeline.sh index dbb2ae594..c10e7546d 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -5,7 +5,7 @@ cd pipeline shopt -s expand_aliases -EO=0.34.2 +EO="0.34.3" alias eo="eoc --parser=${EO}" cat > app.eo < Date: Sat, 13 Jan 2024 21:24:35 +0300 Subject: [PATCH 8/8] refactor: add step names --- .github/workflows/ghc.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ghc.yml b/.github/workflows/ghc.yml index 2fa57511a..d08cf8b98 100644 --- a/.github/workflows/ghc.yml +++ b/.github/workflows/ghc.yml @@ -41,9 +41,11 @@ jobs: distribution: "zulu" java-version: 21 - - run: npm install -g eolang@0.15.1 + - name: Install EO + run: npm install -g eolang@0.15.1 - - run: ./pipeline.sh + - name: Run pipeline EO -> Phi -> Normalizer -> Phi -> EO + run: ./pipeline.sh haddock: needs: [build]