Jens Geyer created THRIFT-6305:
----------------------------------
Summary: veralign.sh reports a JSON file that jq cannot read as a
missing version
Key: THRIFT-6305
URL: https://issues.apache.org/jira/browse/THRIFT-6305
Project: Thrift
Issue Type: Bug
Components: Build Process
Reporter: Jens Geyer
{{jsonReplace}} and {{npmlockReplace}} in {{build/veralign.sh}} read the
version with jq and take any jq failure for a missing version. With a malformed
or missing {{lib/js/package.json}}, the table says:
{noformat}
jq: parse error: Unfinished JSON term at EOF at line 2, column 0
lib/js/package.json | 0 | ERROR:
version tag not found
{noformat}
A {{package-lock.json}} in the same state gets the {{NOT FOUND}} row that is
meant for a lockfile with another version. The script still stops with exit 1,
but only jq's own line above the row names the cause.
Checking the file with {{jq empty}} first and reporting "jq could not read the
file" when that fails would fix both.
_Drafted with AI assistance (Claude Opus 5)._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)