From 5cd9ec821d0b2786f16737119b4a825e9a2adafd Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 11:47:41 +0100 Subject: [PATCH 01/21] init --- .github/workflows/generate.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 018be4422..cd8706325 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -19,3 +19,6 @@ jobs: run: | cd generate npm run generate + - name: Output generate JSON Schema + run: | + find generate/generated -name '*.json' -print -exec cat {} \; -exec echo \; From 647306fe6b83b11f9aba5b1ca9169bc9baec79d6 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 12:07:06 +0100 Subject: [PATCH 02/21] group output --- .github/workflows/generate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index cd8706325..45f005e1a 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,4 +21,4 @@ jobs: npm run generate - name: Output generate JSON Schema run: | - find generate/generated -name '*.json' -print -exec cat {} \; -exec echo \; + find ./generated -name '*.json' -exec echo '::group::{}' \; -exec cat {} \; From f902881f2f65dbe5d10d326c1b47ffc21d5af016 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 12:10:45 +0100 Subject: [PATCH 03/21] fix path --- .github/workflows/generate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 45f005e1a..6731aa7c6 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,4 +21,4 @@ jobs: npm run generate - name: Output generate JSON Schema run: | - find ./generated -name '*.json' -exec echo '::group::{}' \; -exec cat {} \; + find generate/generated -name '*.json' -exec echo '::group::{}' \; -exec cat {} \; From c06cb5b8367cd75e06be2cad1c76407aa0e93820 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 12:15:25 +0100 Subject: [PATCH 04/21] show file name only --- .github/workflows/generate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 6731aa7c6..9046162c2 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,4 +21,4 @@ jobs: npm run generate - name: Output generate JSON Schema run: | - find generate/generated -name '*.json' -exec echo '::group::{}' \; -exec cat {} \; + find generate/generated -name '*.json' -exec basename '::group::{}' \; -exec cat {} \; From 2b85cf83c8bceb92fb80cc2f191003f50566204a Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 13:44:14 +0100 Subject: [PATCH 05/21] group with BASENAME --- .github/workflows/generate.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 9046162c2..3eeb40421 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -21,4 +21,5 @@ jobs: npm run generate - name: Output generate JSON Schema run: | - find generate/generated -name '*.json' -exec basename '::group::{}' \; -exec cat {} \; + find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; + From 104e895f4eff5335a4ea6ebacbb5687d22c48b63 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 15:23:55 +0100 Subject: [PATCH 06/21] Update .github/workflows/generate.yml Co-authored-by: Lars Hvam --- .github/workflows/generate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 3eeb40421..c0b4cc9d8 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -19,7 +19,7 @@ jobs: run: | cd generate npm run generate - - name: Output generate JSON Schema + - name: Output generated JSON Schema run: | find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; From 5d8872e01d95b37694d33dfd890bf436dc517a4e Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 15:46:07 +0100 Subject: [PATCH 07/21] List files in PR --- .github/workflows/generate.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index c0b4cc9d8..029607097 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -22,4 +22,11 @@ jobs: - name: Output generated JSON Schema run: | find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; - + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v40 + - name: List all added files + run: | + for file in ${{ steps.changed-files.outputs.added_files }}; do + echo "$file was added" + done From 373fdcf99e4c660a381e037dc174bff7c66a2dee Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 15:47:55 +0100 Subject: [PATCH 08/21] add changed abap type --- file-formats/intf/type/zif_aff_intf_v1.intf.abap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file-formats/intf/type/zif_aff_intf_v1.intf.abap b/file-formats/intf/type/zif_aff_intf_v1.intf.abap index a89f31b56..b82a9c8c5 100644 --- a/file-formats/intf/type/zif_aff_intf_v1.intf.abap +++ b/file-formats/intf/type/zif_aff_intf_v1.intf.abap @@ -34,8 +34,8 @@ INTERFACE zif_aff_intf_v1 PUBLIC. END OF co_category. TYPES: - "!

Interface Properties

- "! Interface properties + "!

My Interface Properties

+ "! My interface properties BEGIN OF ty_main, "! $required format_version TYPE zif_aff_types_v1=>ty_format_version, From c1ef08d54c8600a73c5595282062bcab44088f32 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 15:57:50 +0100 Subject: [PATCH 09/21] wip --- .github/workflows/generate.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 029607097..2417e71d0 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -4,6 +4,21 @@ on: pull_request: jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v40 + - name: List all added files + run: | + for file in ${{ steps.changed-files.outputs.added_files }}; do + echo "$file was added" + done + - name: Output generated JSON Schema + run: | + find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; validate: runs-on: ubuntu-latest timeout-minutes: 10 @@ -19,14 +34,4 @@ jobs: run: | cd generate npm run generate - - name: Output generated JSON Schema - run: | - find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v40 - - name: List all added files - run: | - for file in ${{ steps.changed-files.outputs.added_files }}; do - echo "$file was added" - done + From 82b0620da486641ec64ce91f01ec049a5309b501 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 16:01:07 +0100 Subject: [PATCH 10/21] first generate then validate --- .github/workflows/generate.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 2417e71d0..93256bb94 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -4,21 +4,6 @@ on: pull_request: jobs: - generate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v40 - - name: List all added files - run: | - for file in ${{ steps.changed-files.outputs.added_files }}; do - echo "$file was added" - done - - name: Output generated JSON Schema - run: | - find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; validate: runs-on: ubuntu-latest timeout-minutes: 10 @@ -35,3 +20,18 @@ jobs: cd generate npm run generate + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v40 + - name: List all added files + run: | + for file in ${{ steps.changed-files.outputs.added_files }}; do + echo "$file was added" + done + - name: Output generated JSON Schema + run: | + find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; From 5f67ea2d2a8a9ba49c5c668a5c983856ce57e6af Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Wed, 6 Dec 2023 16:03:40 +0100 Subject: [PATCH 11/21] wip: --- .github/workflows/generate.yml | 16 -- file-formats/intf/intf-v1.json | 2 +- .../intf/type/zif_aff_intf_v1.intf.abap | 4 +- generate/aff.mjs | 22 +- generate/package-lock.json | 227 +++++------------- generate/package.json | 1 + 6 files changed, 81 insertions(+), 191 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 93256bb94..018be4422 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -19,19 +19,3 @@ jobs: run: | cd generate npm run generate - - generate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v40 - - name: List all added files - run: | - for file in ${{ steps.changed-files.outputs.added_files }}; do - echo "$file was added" - done - - name: Output generated JSON Schema - run: | - find generate/generated -name '*.json' -exec bash -c 'echo "::group::$(basename {})"' \; -exec cat {} \; diff --git a/file-formats/intf/intf-v1.json b/file-formats/intf/intf-v1.json index c292a4712..4e3837351 100644 --- a/file-formats/intf/intf-v1.json +++ b/file-formats/intf/intf-v1.json @@ -3,7 +3,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/intf/intf-v1.json", "title": "Interface Properties", - "description": "Interface properties", + "description": "My Interface properties", "type": "object", "properties": { "formatVersion": { diff --git a/file-formats/intf/type/zif_aff_intf_v1.intf.abap b/file-formats/intf/type/zif_aff_intf_v1.intf.abap index b82a9c8c5..a89f31b56 100644 --- a/file-formats/intf/type/zif_aff_intf_v1.intf.abap +++ b/file-formats/intf/type/zif_aff_intf_v1.intf.abap @@ -34,8 +34,8 @@ INTERFACE zif_aff_intf_v1 PUBLIC. END OF co_category. TYPES: - "!

My Interface Properties

- "! My interface properties + "!

Interface Properties

+ "! Interface properties BEGIN OF ty_main, "! $required format_version TYPE zif_aff_types_v1=>ty_format_version, diff --git a/generate/aff.mjs b/generate/aff.mjs index 0ee034fb9..d27de5932 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -3,6 +3,7 @@ import * as path from 'node:path'; import * as child_process from 'node:child_process'; import {initializeABAP} from "./output/init.mjs"; await initializeABAP(); +import * as core from '@actions/core'; async function run() { if (fs.existsSync("generated") === false) { @@ -15,10 +16,12 @@ async function run() { types.push(f.toUpperCase()); } } + types.sort(); + let error = false; for (const type of types) { - console.log(type); + core.startGroup(type); if (type === "ENHO") { console.log("\tskip, https://github.com/SAP/abap-file-formats/issues/409"); continue; @@ -28,20 +31,23 @@ async function run() { const filename = "generated" + path.sep + type.toLowerCase() + "-v1.json"; fs.writeFileSync(filename, result.get()); + const command = `diff --strip-trailing-cr generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - console.log(command); - console.log(output.toString()); - error = true; + core.error("Provided and generated JSON Schema differ") + core.info(command); + core.info(output.toString()); } else { - console.log("\tOK\n"); + core.notice("Provided and generated JSON Schema match") } - } - if (error === true) { - exit(1); + core.info(result.get()); + + core.endGroup() + } + } run(); diff --git a/generate/package-lock.json b/generate/package-lock.json index 79a241ea7..a02ee0881 100644 --- a/generate/package-lock.json +++ b/generate/package-lock.json @@ -1,7 +1,7 @@ { "name": "abap-file-formats", "version": "0.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -12,21 +12,22 @@ "@abaplint/database-sqlite": "^2.7.96", "@abaplint/runtime": "^2.7.100", "@abaplint/transpiler-cli": "^2.7.100", + "@actions/core": "^1.10.1", "oras-pull": "^0.1.5" } }, "node_modules/@abaplint/database-sqlite": { - "version": "2.7.96", - "resolved": "https://registry.npmjs.org/@abaplint/database-sqlite/-/database-sqlite-2.7.96.tgz", - "integrity": "sha512-xU1tIdTMvpOvzd9CGTm11d17n3nHiapSNxyxNDiWZBrDuF8oOxuQWbbKkekobsHeNw0ZITdb+fGTMC8k5pYigQ==", + "version": "2.7.119", + "resolved": "https://registry.npmjs.org/@abaplint/database-sqlite/-/database-sqlite-2.7.119.tgz", + "integrity": "sha512-WAXKQaVk+ehJnuQw7kpPEAHnfmtosyW5cU8l46ylitb04DyVmMPlZ8SBJTOygPByvFyKnDUupu7fiLENocNy+A==", "dependencies": { "sql.js": "^1.8.0" } }, "node_modules/@abaplint/runtime": { - "version": "2.7.100", - "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.100.tgz", - "integrity": "sha512-IN/tM2e0cPNxBToKYTaCqT/Xh8/eZaSWtZPEh7GE8DYmcPqzI8/8CNKpaZjIwpmVzKhwbkXjoEuq/DB7bUKmHA==", + "version": "2.7.136", + "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.136.tgz", + "integrity": "sha512-w8//A4ee3/zrqGft3Mckr7KyqtwMOdIPobfoCEzqTpL2wziGlgtp9GHoMZX1e/x3EtbiLWwxfJCGHvERag59ig==", "dependencies": { "temporal-polyfill": "^0.1.1" }, @@ -35,9 +36,9 @@ } }, "node_modules/@abaplint/transpiler-cli": { - "version": "2.7.100", - "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.100.tgz", - "integrity": "sha512-hZzQZ/HkXS/z8Y06nbMdrNVfFM6KSdnqHetGwhcdNHZCrK3AThdBNLSkupkcZpCoEhrizBbtqYu6Jvc8vWlRsA==", + "version": "2.7.136", + "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.136.tgz", + "integrity": "sha512-baVz9h7zij90+T5fxCN3aHVxQh0Up2+ICybTakleZLDSMgRzkpq8LQ+lmNRK44suAadrc74WDvWJ7OODlcJnyA==", "bin": { "abap_transpile": "abap_transpile" }, @@ -45,6 +46,32 @@ "url": "https://github.com/sponsors/larshp" } }, + "node_modules/@actions/core": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/http-client": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^5.25.4" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -157,9 +184,9 @@ } }, "node_modules/sql.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.8.0.tgz", - "integrity": "sha512-3HD8pSkZL+5YvYUI8nlvNILs61ALqq34xgmF+BHpqxe68yZIJ1H+sIVIODvni25+CcxHUxDyrTJUL0lE/m7afw==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.9.0.tgz", + "integrity": "sha512-+QMN8NU5KJxofT+lEaSLYdhh+Pdq7ZYS6X5bSbpmD+4SKFf+qBmr+coKT07LZ+keUNh1sf3Nz9dQwD8WNI2i/Q==" }, "node_modules/tar": { "version": "6.2.0", @@ -195,176 +222,48 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - }, - "dependencies": { - "@abaplint/database-sqlite": { - "version": "2.7.96", - "resolved": "https://registry.npmjs.org/@abaplint/database-sqlite/-/database-sqlite-2.7.96.tgz", - "integrity": "sha512-xU1tIdTMvpOvzd9CGTm11d17n3nHiapSNxyxNDiWZBrDuF8oOxuQWbbKkekobsHeNw0ZITdb+fGTMC8k5pYigQ==", - "requires": { - "sql.js": "^1.8.0" - } - }, - "@abaplint/runtime": { - "version": "2.7.100", - "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.7.100.tgz", - "integrity": "sha512-IN/tM2e0cPNxBToKYTaCqT/Xh8/eZaSWtZPEh7GE8DYmcPqzI8/8CNKpaZjIwpmVzKhwbkXjoEuq/DB7bUKmHA==", - "requires": { - "temporal-polyfill": "^0.1.1" - } - }, - "@abaplint/transpiler-cli": { - "version": "2.7.100", - "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.7.100.tgz", - "integrity": "sha512-hZzQZ/HkXS/z8Y06nbMdrNVfFM6KSdnqHetGwhcdNHZCrK3AThdBNLSkupkcZpCoEhrizBbtqYu6Jvc8vWlRsA==" - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", - "requires": { - "node-fetch": "^2.6.12" + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - }, + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "@fastify/busboy": "^2.0.0" }, - "dependencies": { - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "requires": { - "yallist": "^4.0.0" - } - } - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "oras-pull": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/oras-pull/-/oras-pull-0.1.5.tgz", - "integrity": "sha512-0PyOnupaG7OSQvC591GRSrA0cUEcWUZ7eahDBEMSpOPpHuikwD5gG51RhCb+uwOyvfDo+8DteyvseCzRijV5+A==", - "requires": { - "cross-fetch": "^3.1.5", - "tar": "^6.1.13" - } - }, - "sql.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.8.0.tgz", - "integrity": "sha512-3HD8pSkZL+5YvYUI8nlvNILs61ALqq34xgmF+BHpqxe68yZIJ1H+sIVIODvni25+CcxHUxDyrTJUL0lE/m7afw==" - }, - "tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" + "engines": { + "node": ">=14.0" } }, - "temporal-polyfill": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.1.1.tgz", - "integrity": "sha512-/5e4EVRA0wBI/bEhWLirSjwUg1lELhQyTXxw9zNbVhqjKvI9BLczs+3wtsoD9sn3HN2ImAMW5XJQwAiXgWT+GA==", - "requires": { - "temporal-spec": "~0.1.0" + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" } }, - "temporal-spec": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.1.0.tgz", - "integrity": "sha512-sMNggMeS6trCgMQuudgFHhX1gtBK3e+AT1zGrMsFYG1wlqtRT5E9rcvm3I1iNlvHpJX/3DO6L4qtWAuEl/T04Q==" - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, - "whatwg-url": { + "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { + "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "yallist": { + "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" diff --git a/generate/package.json b/generate/package.json index 963c26190..9dbd611c5 100644 --- a/generate/package.json +++ b/generate/package.json @@ -25,6 +25,7 @@ "@abaplint/database-sqlite": "^2.7.96", "@abaplint/runtime": "^2.7.100", "@abaplint/transpiler-cli": "^2.7.100", + "@actions/core": "^1.10.1", "oras-pull": "^0.1.5" } } From f95a03d9b4d80ce8bf9c529ff6f492eac5dce52a Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Thu, 7 Dec 2023 13:02:56 +0100 Subject: [PATCH 12/21] wip --- generate/aff.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index d27de5932..64f7bd857 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -35,7 +35,7 @@ async function run() { const command = `diff --strip-trailing-cr generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - core.error("Provided and generated JSON Schema differ") + core.setFailed("Provided and generated JSON Schema differ "+type) core.info(command); core.info(output.toString()); } else { From c5168139b156e9d8fb3825e4f771ae0dbb69fb8e Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Thu, 7 Dec 2023 14:22:10 +0100 Subject: [PATCH 13/21] upload generated schemas --- .github/workflows/generate.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 018be4422..2e9057d96 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -19,3 +19,10 @@ jobs: run: | cd generate npm run generate + - name: Upload generated schemas + uses: actions/upload-artifact@v3 + with: + name: schemas + path: | + generate/generated/*.json + From 73d5284907d4091351cecb8b4bbdee211d8a237b Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Thu, 7 Dec 2023 14:23:37 +0100 Subject: [PATCH 14/21] just continue --- generate/aff.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index 64f7bd857..a5dec2ef3 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -35,7 +35,7 @@ async function run() { const command = `diff --strip-trailing-cr generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - core.setFailed("Provided and generated JSON Schema differ "+type) + core.error("Provided and generated JSON Schema differ "+type) core.info(command); core.info(output.toString()); } else { From 7f75f80e80b824771947b8aacb73aa31420d3398 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 09:03:05 +0100 Subject: [PATCH 15/21] failes on first error, enrich diff --- generate/aff.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index a5dec2ef3..09f107a0e 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -32,10 +32,10 @@ async function run() { fs.writeFileSync(filename, result.get()); - const command = `diff --strip-trailing-cr generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; + const command = `diff --strip-trailing-cr -u generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - core.error("Provided and generated JSON Schema differ "+type) + core.setFailed("Provided and generated JSON Schema differ "+type) core.info(command); core.info(output.toString()); } else { From cd4fbc973cc533cebff5991e2c699deacc548ed9 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 09:20:06 +0100 Subject: [PATCH 16/21] mr echoed line --- generate/aff.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index 09f107a0e..239acf5f4 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -36,7 +36,6 @@ async function run() { const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { core.setFailed("Provided and generated JSON Schema differ "+type) - core.info(command); core.info(output.toString()); } else { core.notice("Provided and generated JSON Schema match") From 2cffe32a6de3a5c3eb2410fc2ce2cc3053ad1ab8 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 10:07:39 +0100 Subject: [PATCH 17/21] failure on first diff, display only failing JSON --- generate/aff.mjs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index 239acf5f4..286d6a266 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -21,9 +21,8 @@ async function run() { let error = false; for (const type of types) { - core.startGroup(type); if (type === "ENHO") { - console.log("\tskip, https://github.com/SAP/abap-file-formats/issues/409"); + core.notice(type+" skipped, https://github.com/SAP/abap-file-formats/issues/409"); continue; } @@ -35,16 +34,11 @@ async function run() { const command = `diff --strip-trailing-cr -u generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - core.setFailed("Provided and generated JSON Schema differ "+type) + core.setFailed(type+": Provided and generated JSON Schema differ") core.info(output.toString()); - } else { - core.notice("Provided and generated JSON Schema match") + core.info("generated JSON Schema for "+type+"\n"+result.get()); } - core.info(result.get()); - - core.endGroup() - } } From f51a7748c6ed68c5c148c2b565efd991810c701e Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 11:57:26 +0100 Subject: [PATCH 18/21] wip: link to file --- generate/aff.mjs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index 286d6a266..afc58fc7c 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -31,12 +31,30 @@ async function run() { fs.writeFileSync(filename, result.get()); - const command = `diff --strip-trailing-cr -u generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; + const command = `diff -u generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { core.setFailed(type+": Provided and generated JSON Schema differ") core.info(output.toString()); - core.info("generated JSON Schema for "+type+"\n"+result.get()); + core.info("generated JSON Schema for " + type + "\n" + result.get()); + + let lines = output.toString().split('\n'); + + let currentFile; + let lineNumber; + + lines.forEach(line => { + if (line.startsWith('+++')) { // Considering updated file only + currentFile = line.slice(4).split('\t')[0]; // Grab only filename, discard timestamp + } + else if (line.startsWith('@@')) { + lineNumber = parseInt(line.split('-')[1].split(',')[0]); + } + else if (line.startsWith('+')) { + // Create GitHub annotation + console.log(`::warning file=${currentFile},line=${lineNumber}::${line.slice(2)}`); + } + }); } } From fc15a14b46bbd08e3c84f5b432c0142aee7f413a Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 12:28:47 +0100 Subject: [PATCH 19/21] fix path --- generate/aff.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index afc58fc7c..e8a361557 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -45,7 +45,8 @@ async function run() { lines.forEach(line => { if (line.startsWith('+++')) { // Considering updated file only - currentFile = line.slice(4).split('\t')[0]; // Grab only filename, discard timestamp + let relativeFile = line.slice(4).split('\t')[0]; // Grab only filename, discard timestamp + currentFile = path.resolve(relativeFile); } else if (line.startsWith('@@')) { lineNumber = parseInt(line.split('-')[1].split(',')[0]); From 9a544ab9d75f19e8491b74c01ede8dccacf4e57f Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 14:15:54 +0100 Subject: [PATCH 20/21] provide global line numbers --- generate/aff.mjs | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/generate/aff.mjs b/generate/aff.mjs index e8a361557..e97aee539 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -10,6 +10,29 @@ async function run() { fs.mkdirSync("generated"); } + function createAnnotations(diff, file) { + let lines = diff.split('\n'); + + let lineNumber; + for (let i = 0; i < lines.length; i++) { + const regExp = /^[0-9]/; + + let line = lines[i]; + if (line.startsWith('>')) { + let text = line.split(' ').slice(1).join(' '); + console.log(`::warning file=${file},line=${lineNumber}::${text}`); + ++lineNumber; + } else if (regExp.test(line)) { + lineNumber = parseInt(line.split("c")[0].split(",")[0]); // 16 + //core.info(lineNumber); + } else if (line.startsWith("<")) { + + } + } + + } + + const types = []; for (const f of fs.readdirSync("../file-formats/")) { if (f.length === 4) { @@ -28,34 +51,17 @@ async function run() { const result = await abap.Classes["CL_RUN"].run({object_type: new abap.types.String().set(type)}); const filename = "generated" + path.sep + type.toLowerCase() + "-v1.json"; + const filename_aff = `../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; fs.writeFileSync(filename, result.get()); - const command = `diff -u generated/${type.toLowerCase()}-v1.json ../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; + const command = `diff ${filename} ${filename_aff}`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { core.setFailed(type+": Provided and generated JSON Schema differ") + core.info(command); core.info(output.toString()); - core.info("generated JSON Schema for " + type + "\n" + result.get()); - - let lines = output.toString().split('\n'); - - let currentFile; - let lineNumber; - - lines.forEach(line => { - if (line.startsWith('+++')) { // Considering updated file only - let relativeFile = line.slice(4).split('\t')[0]; // Grab only filename, discard timestamp - currentFile = path.resolve(relativeFile); - } - else if (line.startsWith('@@')) { - lineNumber = parseInt(line.split('-')[1].split(',')[0]); - } - else if (line.startsWith('+')) { - // Create GitHub annotation - console.log(`::warning file=${currentFile},line=${lineNumber}::${line.slice(2)}`); - } - }); + createAnnotations(output.toString(), path.resolve(filename_aff)); } } From 90e739b2cdd7fed7abc536d6aa76805da6ca60e9 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Fri, 8 Dec 2023 14:17:47 +0100 Subject: [PATCH 21/21] break json schema --- .github/workflows/generate.yml | 4 ++- .github/workflows/markdown-link-check.yml | 5 ++-- .github/workflows/py-validation.yml | 4 +-- file-formats/intf/intf-v1.json | 2 +- generate/aff.mjs | 33 +++++++++++------------ 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 2e9057d96..442c840f1 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -1,10 +1,11 @@ -name: Validate JSON schema +name: Generate JSON Schema on: pull_request: jobs: validate: + name: Compare generated against provided runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -20,6 +21,7 @@ jobs: cd generate npm run generate - name: Upload generated schemas + if: always() uses: actions/upload-artifact@v3 with: name: schemas diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 35697713c..520861266 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -1,4 +1,4 @@ -name: Check Markdown links +name: Check Markdown Links on: pull_request: @@ -7,7 +7,8 @@ permissions: contents: read jobs: - markdown-link-check: + check-links: + name: Check links runs-on: ubuntu-latest timeout-minutes: 10 steps: diff --git a/.github/workflows/py-validation.yml b/.github/workflows/py-validation.yml index 8558635c8..26b2f2547 100644 --- a/.github/workflows/py-validation.yml +++ b/.github/workflows/py-validation.yml @@ -1,4 +1,4 @@ -name: Validate JSON examples +name: Validate JSON Examples on: pull_request: @@ -9,7 +9,7 @@ permissions: jobs: build: # Name the Job - name: Validate JSON examples against their schema + name: Validate examples against schema runs-on: ubuntu-latest diff --git a/file-formats/intf/intf-v1.json b/file-formats/intf/intf-v1.json index 4e3837351..c292a4712 100644 --- a/file-formats/intf/intf-v1.json +++ b/file-formats/intf/intf-v1.json @@ -3,7 +3,7 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/intf/intf-v1.json", "title": "Interface Properties", - "description": "My Interface properties", + "description": "Interface properties", "type": "object", "properties": { "formatVersion": { diff --git a/generate/aff.mjs b/generate/aff.mjs index e97aee539..acb5d0df6 100644 --- a/generate/aff.mjs +++ b/generate/aff.mjs @@ -1,7 +1,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; import * as child_process from 'node:child_process'; -import {initializeABAP} from "./output/init.mjs"; +import { initializeABAP } from "./output/init.mjs"; await initializeABAP(); import * as core from '@actions/core'; @@ -14,21 +14,18 @@ async function run() { let lines = diff.split('\n'); let lineNumber; - for (let i = 0; i < lines.length; i++) { - const regExp = /^[0-9]/; + const regExp = /^[0-9]/; + + lines.forEach(line => { - let line = lines[i]; if (line.startsWith('>')) { - let text = line.split(' ').slice(1).join(' '); - console.log(`::warning file=${file},line=${lineNumber}::${text}`); - ++lineNumber; + let text = line.split(' ').slice(1).join(' '); + console.log(`::error file=${file},line=${lineNumber}::${text}`); + ++lineNumber; } else if (regExp.test(line)) { lineNumber = parseInt(line.split("c")[0].split(",")[0]); // 16 - //core.info(lineNumber); - } else if (line.startsWith("<")) { - } - } + }); } @@ -45,23 +42,25 @@ async function run() { let error = false; for (const type of types) { if (type === "ENHO") { - core.notice(type+" skipped, https://github.com/SAP/abap-file-formats/issues/409"); + core.notice(type + " skipped, https://github.com/SAP/abap-file-formats/issues/409"); continue; } - const result = await abap.Classes["CL_RUN"].run({object_type: new abap.types.String().set(type)}); + const result = await abap.Classes["CL_RUN"].run({ object_type: new abap.types.String().set(type) }); const filename = "generated" + path.sep + type.toLowerCase() + "-v1.json"; const filename_aff = `../file-formats/${type.toLowerCase()}/${type.toLowerCase()}-v1.json`; fs.writeFileSync(filename, result.get()); - const command = `diff ${filename} ${filename_aff}`; + const command = `diff ${filename_aff} ${filename}`; const output = child_process.execSync(`${command} || true`); if (output.toString().length > 0) { - core.setFailed(type+": Provided and generated JSON Schema differ") - core.info(command); - core.info(output.toString()); + core.setFailed(type + ": Provided and generated JSON Schema differ") createAnnotations(output.toString(), path.resolve(filename_aff)); + //core.info(command); + //core.info(output.toString()); + } else { + core.notice(type + " success"); } }