diff --git a/CHANGELOG.md b/CHANGELOG.md index 38927d7f..7f89a138 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.0.22] - 2024-04-30 +### Added +* Add cobj-api command (#370) +* Implement a -Wstrict-typing (#369) +### Miscellaneous +* Simplify generated Java code based on SonarQube analysis (#366) +* Improve the error message for record keys with duplicates (#368) ## [1.0.21] - 2024-03-29 ### Added * Implement a new option `-info-json-dir` (#362) diff --git a/ChangeLog b/ChangeLog index 593f8bae..db840fb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-04-30 OSS Consortium + + * opensource COBOL 4J v1.0.22 released. + 2024-03-29 OSS Consortium * opensource COBOL 4J v1.0.21 released. diff --git a/NEWS b/NEWS index be32d638..180da316 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,17 @@ NEWS - user visible changes -*- outline -*- ----------------------------------------------------------------------- +* opensource COBOL 4J 1.0.22 + +** New Features + (1) Add cobj-api command + (2) Implement `-Wstrict-typing` +** Miscellaneous + (1) Simplify generated Java code based on SonarQube analysis + (2) Improve the error message for record keys with duplicates + +----------------------------------------------------------------------- + * opensource COBOL 4J 1.0.21 ** New Features diff --git a/README.md b/README.md index 5aaa5ebf..494580f7 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco ### Install opensource COBOL 4J ``` -curl -L -o opensourcecobol4j-v1.0.21.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.21.tar.gz -tar zxvf opensourcecobol4j-v1.0.21.tar.gz -cd opensourcecobol4j-1.0.21 +curl -L -o opensourcecobol4j-v1.0.22.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.22.tar.gz +tar zxvf opensourcecobol4j-v1.0.22.tar.gz +cd opensourcecobol4j-1.0.22 ./configure --prefix=/usr/ make sudo make install @@ -72,7 +72,7 @@ In order to check installations of older versions, The docker container for opensource COBOL 4J is available. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.0.21 +docker pull opensourcecobol/opensourcecobol4j:1.0.22 ``` Execute the following commands in order to run the "Hello World" COBOL program. @@ -201,6 +201,23 @@ Options: -v, --version Print the version of cobj-idx. ``` + +## cobj-api +With `cobj-api`, you can easily generate an Spring boot Java file that calls the program generated by `cobj`. + +``` +Usage: cobj-api [options] + +Arguments: + : a json file generated by cobj with `-info-json-dir` option + +Options: + -h, --help Display this message + -java-package= Specify the package name of the generated source code + -o=, --output-dir= Set the output destination of the java file to an arbitrary destination + -v, --version Prints the version of the cobj-api +``` + ## Contributing Guidelines for contributing to opensource COBOL 4J can be found in [CONTRIBUTING.md](./CONTRIBUTING.md). diff --git a/README_JP.md b/README_JP.md index e35c116f..53390c56 100644 --- a/README_JP.md +++ b/README_JP.md @@ -23,7 +23,7 @@ opensource COBOL 4J は下記の環境でテストされています. ## インストール -opensource COBOL 4J v1.0.21はUbuntuとAlmaLinuxで動作を確認しています. +opensource COBOL 4J v1.0.22はUbuntuとAlmaLinuxで動作を確認しています. ## 手動インストール @@ -57,9 +57,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco 下記のコマンドを実行する ``` -curl -L -o opensourcecobol4j-v1.0.21.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.21.tar.gz -tar zxvf opensourcecobol4j-v1.0.21.tar.gz -cd opensourcecobol4j-1.0.21 +curl -L -o opensourcecobol4j-v1.0.22.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.22.tar.gz +tar zxvf opensourcecobol4j-v1.0.22.tar.gz +cd opensourcecobol4j-1.0.22 ./configure --prefix=/usr/ make sudo make install @@ -73,10 +73,10 @@ sudo make install ## Dockerによるインストール -opensource COBOL 4J v1.0.21をインストールしたDockerイメージを利用できます. +opensource COBOL 4J v1.0.22をインストールしたDockerイメージを利用できます. ```bash -docker pull opensourcecobol/opensourcecobol4j:1.0.21 +docker pull opensourcecobol/opensourcecobol4j:1.0.22 ``` コンテナ内で下記のコマンドを実行すると、Hello Worldプログラムをコンパイル&実行できる。 @@ -208,6 +208,22 @@ Options: Print the version of cobj-idx. ``` +## cobj-api +cobj-apiコマンドを使用することで、`cobj`で生成されたプログラムを呼び出すSpring boot向けのJavaファイルを簡単に生成できます。 + +``` +Usage: cobj-api [options] + +Arguments: + : a json file generated by cobj with `-info-json-dir` option + +Options: + -h, --help Display this message + -java-package= Specify the package name of the generated source code + -o=, --output-dir= Set the output destination of the java file to an arbitrary destination + -v, --version Prints the version of the cobj-api +``` + ## コントリビューㇳ コントリビュータの一覧は https://github.com/opensourcecobol/opensourcecobol4j/graphs/contributors に掲載されています。 diff --git a/configure b/configure index fdfc3b37..5c712712 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for opensource COBOL 4J 1.0.21. +# Generated by GNU Autoconf 2.71 for opensource COBOL 4J 1.0.22. # # Report bugs to . # @@ -620,9 +620,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opensource COBOL 4J' -PACKAGE_TARNAME='opensource-cobol-4j-1.0.21' -PACKAGE_VERSION='1.0.21' -PACKAGE_STRING='opensource COBOL 4J 1.0.21' +PACKAGE_TARNAME='opensource-cobol-4j-1.0.22' +PACKAGE_VERSION='1.0.22' +PACKAGE_STRING='opensource COBOL 4J 1.0.22' PACKAGE_BUGREPORT='ws-opensource-cobol-contact@osscons.jp' PACKAGE_URL='' @@ -1411,7 +1411,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opensource COBOL 4J 1.0.21 to adapt to many kinds of systems. +\`configure' configures opensource COBOL 4J 1.0.22 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1461,7 +1461,7 @@ Fine tuning of the installation directories: --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root - [DATAROOTDIR/doc/opensource-cobol-4j-1.0.21] + [DATAROOTDIR/doc/opensource-cobol-4j-1.0.22] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1483,7 +1483,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opensource COBOL 4J 1.0.21:";; + short | recursive ) echo "Configuration of opensource COBOL 4J 1.0.22:";; esac cat <<\_ACEOF @@ -1611,7 +1611,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opensource COBOL 4J configure 1.0.21 +opensource COBOL 4J configure 1.0.22 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opensource COBOL 4J $as_me 1.0.21, which was +It was created by opensource COBOL 4J $as_me 1.0.22, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3397,8 +3397,8 @@ fi # Define the identity of the package. - PACKAGE='opensource-cobol-4j-1.0.21' - VERSION='1.0.21' + PACKAGE='opensource-cobol-4j-1.0.22' + VERSION='1.0.22' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -24216,7 +24216,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opensource COBOL 4J $as_me 1.0.21, which was +This file was extended by opensource COBOL 4J $as_me 1.0.22, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24284,7 +24284,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -opensource COBOL 4J config.status 1.0.21 +opensource COBOL 4J config.status 1.0.22 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7c273453..098e0f2c 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AC_PREREQ(2.59) -AC_INIT([opensource COBOL 4J],[1.0.21],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.0.21]) +AC_INIT([opensource COBOL 4J],[1.0.22],[ws-opensource-cobol-contact@osscons.jp],[opensource-cobol-4j-1.0.22]) AC_CONFIG_SRCDIR([libcobj.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) diff --git a/doc/requirements-all.md b/doc/requirements-all.md index 24e39757..23dbb87f 100644 --- a/doc/requirements-all.md +++ b/doc/requirements-all.md @@ -1,5 +1,8 @@ | version (opensource COBOL 4J) | OS | version (JDK) | | -- | -- | -- | +| 1.0.22 | Ubuntu 22.04 | 21 | +| 1.0.22 | AlmaLinux 9 | 11 | +| 1.0.22 | Amazon Linux 2023 | 21 | | 1.0.21 | Ubuntu 22.04 | 21 | | 1.0.21 | AlmaLinux 9 | 11 | | 1.0.21 | Amazon Linux 2023 | 21 | diff --git a/libcobj/app/build.gradle.kts b/libcobj/app/build.gradle.kts index 7c34ed08..58c788bb 100644 --- a/libcobj/app/build.gradle.kts +++ b/libcobj/app/build.gradle.kts @@ -67,7 +67,7 @@ publishing { register("gpr") { groupId = "jp.osscons.opensourcecobol" artifactId = "libcobj" - version = "1.0.21" + version = "1.0.22" from(components["java"]) } } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java index b6e0ad42..b4aae738 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java @@ -41,5 +41,5 @@ public class Const { // TODO 標準パスの設定 public static final String COB_LIBRARY_PATH = ""; - public static final String version = "1.0.21"; + public static final String version = "1.0.22"; } diff --git a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java index 6da0f55a..5583910d 100644 --- a/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java +++ b/libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java @@ -37,7 +37,7 @@ public static void getOptions(String[] args) { System.exit(0); return; } else if (cmd.hasOption("v")) { - System.out.println("1.0.21"); + System.out.println("1.0.22"); System.exit(0); return; } else if (cmd.getOptionValue("java-package") != null) { @@ -53,6 +53,10 @@ public static void getOptions(String[] args) { private static void printHelpMessage() { System.out.println("Usage: cobj-api [options] "); + System.out.println(); + System.out.println("Arguments:"); + System.out.println(" : a json file generated by cobj with `-info-json-dir` option"); + System.out.println(); System.out.println("Options:"); System.out.println(" -h, --help\t\t\t\tDisplay this message"); System.out.println( diff --git a/tests/command-line-options.src/info-java-dir.at b/tests/command-line-options.src/info-java-dir.at index 1d49b5d6..c96cec98 100644 --- a/tests/command-line-options.src/info-java-dir.at +++ b/tests/command-line-options.src/info-java-dir.at @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [ AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl]) AT_CHECK([cat info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.0.21", + "opensourcecobol4j_version": "1.0.22", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0], AT_CHECK([cat info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.0.21", + "opensourcecobol4j_version": "1.0.22", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl]) AT_CHECK([cat bbb/info_callee.json], [0], [{ - "opensourcecobol4j_version": "1.0.21", + "opensourcecobol4j_version": "1.0.22", "program_id": "callee", "procedure_division_using_parameters": @<:@ { @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0], AT_CHECK([cat bbb/info_prog.json], [0], [{ - "opensourcecobol4j_version": "1.0.21", + "opensourcecobol4j_version": "1.0.22", "program_id": "prog", "procedure_division_using_parameters": @<:@ @:>@ diff --git a/tests/package.m4 b/tests/package.m4 index 7fb088fc..c7ae5fca 100644 --- a/tests/package.m4 +++ b/tests/package.m4 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J]) -m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.0.20]) -m4_define([AT_PACKAGE_VERSION], [1.0.20]) -m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.0.20]) +m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.0.22]) +m4_define([AT_PACKAGE_VERSION], [1.0.22]) +m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.0.22]) m4_define([AT_PACKAGE_BUGREPORT], [ws-opensource-cobol-contact@osscons.jp]) diff --git a/update-version.sh b/update-version.sh index 3b1959a2..d97ec0b8 100755 --- a/update-version.sh +++ b/update-version.sh @@ -22,6 +22,7 @@ update_versions_in_file README_JP.md update_versions_in_file libcobj/app/build.gradle.kts update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java update_versions_in_file tests/command-line-options.src/info-java-dir.at +update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java # Rebuild autoreconf