diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml deleted file mode 100644 index f09e32e972..0000000000 --- a/.github/workflows/actionlint.yml +++ /dev/null @@ -1,42 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: actionlint -'on': - push: - branches: - - master - pull_request: - branches: - - master -jobs: - actionlint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Download actionlint - id: get_actionlint - run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - shell: bash - - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color - shell: bash diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index c5d3856f82..0000000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,61 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: codecov -on: - push: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -concurrency: - group: codecov-${{ github.ref }} - cancel-in-progress: true -jobs: - codecov: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: teatimeguest/setup-texlive-action@v3.3.0 - with: - update-all-packages: true - packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 20 - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - maven- - - run: mvn install -Pjacoco - - uses: codecov/codecov-action@v4.0.0-beta.3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./eo-parser/target/site/jacoco/jacoco.xml,./eo-runtime/target/site/jacoco/jacoco.xml,./eo-maven-plugin/target/site/jacoco/jacoco.xml - fail_ci_if_error: true - if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/copyrights.yml b/.github/workflows/copyrights.yml deleted file mode 100644 index 4a0660a752..0000000000 --- a/.github/workflows/copyrights.yml +++ /dev/null @@ -1,48 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: copyrights -'on': - push: - pull_request: -jobs: - copyrights: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: yegor256/copyrights-action@0.0.4 - with: - globs: >- - **/LICENSE.txt - **/*.sh - **/*.yml - **/*.yaml - **/*.eo - **/*.xmir - **/*.xml - **/*.xsl - **/*.xsd - **/*.ini - **/*.java - **/*.g4 - **/*.properties - **/*.groovy diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml deleted file mode 100644 index 674602e976..0000000000 --- a/.github/workflows/cr.yml +++ /dev/null @@ -1,50 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: AI Code Reviewer -permissions: - contents: read - issues: write - pull-requests: write -on: - pull_request: - types: - - opened - - reopened - - synchronize -jobs: - test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: anc95/ChatGPT-CodeReview@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - LANGUAGE: English - OPENAI_API_ENDPOINT: https://api.openai.com/v1 - MODEL: gpt-4 - PROMPT: Please check if there are any confusions or irregularities in the following code diff - top_p: 1 - temperature: 1 - max_tokens: 2000 - MAX_PATCH_LENGTH: 10000 diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml deleted file mode 100644 index 3c729809dc..0000000000 --- a/.github/workflows/daily.yml +++ /dev/null @@ -1,74 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: daily -on: - schedule: - # Run load testing at 01:30 UTC every day - - cron: '30 1 * * *' -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: teatimeguest/setup-texlive-action@v3.3.0 - with: - update-all-packages: true - packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 20 - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-jdk-20-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-jdk-20-maven- - - run: | - # Clean the test classes to avoid caching issues and prepare testing environment - # without running the tests - mvn clean install -Pqulice -DskipTests -DskipITs -Dinvoker.skip=true - # Find script - SCRIPT=${GITHUB_WORKSPACE}/src/test/scripts/test-repetition.sh - # Check that script is exists - if [ ! -f "${SCRIPT}" ]; then - echo "Script ${SCRIPT} not found" - exit 1 - fi - # Make script runnable - chmod +x "${SCRIPT}" - # Test eo-parser - "${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-parser" - # Test eo-maven-plugin - "${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-maven-plugin" - # Test eo-runtime - "${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-runtime" --compilation true - report-fail: - name: Create issue on failure - needs: build - if: failure() && github.event.pull_request == null - runs-on: ubuntu-22.04 - steps: - - uses: jayqi/failed-build-issue-action@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ebnf.yml b/.github/workflows/ebnf.yml deleted file mode 100644 index 66936c89a0..0000000000 --- a/.github/workflows/ebnf.yml +++ /dev/null @@ -1,84 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: ebnf -on: - push: - paths-ignore: [ 'paper/**', 'sandbox/**' ] - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -jobs: - ebnf: - runs-on: ubuntu-22.04 - env: - CONVERT_PATH: /tmp/antlr4-to-bnf-converter - steps: - - uses: actions/checkout@v4 - - run: | - sudo apt-get update - sudo apt-get -y install ghostscript imagemagick texlive-extra-utils pdf2svg inkscape - - uses: teatimeguest/setup-texlive-action@v3.3.0 - with: - update-all-packages: true - packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 20 - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-jdk-20-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-jdk-20-maven- - - run: | - mkdir -p "$CONVERT_PATH" - wget --quiet http://public.yegor256.com/convert.zip -O /tmp/convert.zip - unzip -o -d "$CONVERT_PATH" /tmp/convert.zip - - run: sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml - - run: | - mvn com.yegor256:antlr2ebnf-maven-plugin:0.0.7:generate \ - -pl :eo-parser --errors --batch-mode --quiet \ - "-Dantlr2ebnf.convertDir=$CONVERT_PATH" \ - "-Dantlr2ebnf.specials=eof,eol,eop,tab,untab" \ - "-Dantlr2ebnf.margin=40" - - run: | - convert --version - convert --help | grep Delegates - pdfcrop --version - set -x - for p in Eo Phi; do - cp "eo-parser/target/ebnf/org/eolang/parser/${p}.pdf" . - pdfcrop --margins '10 10 10 10' "${p}.pdf" "${p}-cropped.pdf" - pdf2svg "${p}-cropped.pdf" "${p}.svg" - convert -verbose -density 300 -quality 100 -colorspace RGB "${p}.svg" "${p}.png" - mkdir -p gh-pages/ebnf - cp "${p}.png" gh-pages/ebnf - cp "${p}.svg" gh-pages/ebnf - done - - uses: JamesIves/github-pages-deploy-action@v4.6.1 - with: - branch: gh-pages - folder: gh-pages - clean: false - if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/gpt-code-review.yml b/.github/workflows/gpt-code-review.yml deleted file mode 100644 index 19e04f50a7..0000000000 --- a/.github/workflows/gpt-code-review.yml +++ /dev/null @@ -1,48 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: GPT-code-review -on: - pull_request: - branches: [ master ] -permissions: - pull-requests: write - contents: read -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - run: npm install code-review-gpt - if: ${{ false }} - - run: npx code-review-gpt review --ci=github - if: ${{ false }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BASE_SHA: ${{ github.event.pull_request.base.sha }} - GITHUB_SHA: ${{ github.sha }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} diff --git a/.github/workflows/loc-badge.yml b/.github/workflows/loc-badge.yml deleted file mode 100644 index fe30d84182..0000000000 --- a/.github/workflows/loc-badge.yml +++ /dev/null @@ -1,46 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: loc-badge -on: - push: - branches: - - master -concurrency: - group: loc-badge-${{ github.ref }} - cancel-in-progress: true -jobs: - loc-badge: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: shadowmoose/GHA-LoC-Badge@1.0.0 - with: - debug: true - directory: . - badge: target/loc-badge.svg - - uses: JamesIves/github-pages-deploy-action@v4.6.1 - with: - branch: gh-pages - folder: target - clean: false - if: github.ref == 'refs/heads/master' diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml deleted file mode 100644 index 1bd508d574..0000000000 --- a/.github/workflows/markdown-lint.yml +++ /dev/null @@ -1,37 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: markdown-lint -'on': - push: - branches: - - master - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -jobs: - markdown-lint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: articulate/actions-markdownlint@v1 diff --git a/.github/workflows/mvn.yml b/.github/workflows/mvn.yml deleted file mode 100644 index 854bc6f863..0000000000 --- a/.github/workflows/mvn.yml +++ /dev/null @@ -1,72 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: mvn -on: - push: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -concurrency: - group: mvn-${{ github.ref }} - cancel-in-progress: true -jobs: - mvn: - name: mvn - strategy: - matrix: - os: [ ubuntu-20.04, windows-2022, macos-12 ] - java: [ 11, 20 ] - runs-on: ${{ matrix.os }} - env: - CONVERT_PATH: /tmp/antlr4-to-bnf-converter - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: ${{ matrix.java }} - - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-jdk-${{ matrix.java }}-maven- - # The next step is required to avoid some exceptions that occur - # when running on Windows OS. For example like this one: - # - https://github.com/objectionary/eo/issues/2336 - # The step disables http multiplexing in Cargo which cause some problems - # on Windows OS. - # You can read more about multiplexing right here - # - https://stackoverflow.com/questions/36517829/what-does-multiplexing-mean-in-http-2 - # Multiplexing in Rust: - # - https://doc.rust-lang.org/cargo/reference/config.html#httpmultiplexing - - name: Set Cargo config (Windows) - if: matrix.os == 'windows-2022' - run: | - echo [http] >> %USERPROFILE%\.cargo\config.toml - echo multiplexing = false >> %USERPROFILE%\.cargo\config.toml - shell: cmd - - run: mvn clean install -Pqulice --errors --batch-mode diff --git a/.github/workflows/pdd.yml b/.github/workflows/pdd.yml deleted file mode 100644 index 0dd62412f6..0000000000 --- a/.github/workflows/pdd.yml +++ /dev/null @@ -1,36 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: pdd -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - pdd: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: volodya-lombrozo/pdd-action@master diff --git a/.github/workflows/reports-check.yml b/.github/workflows/reports-check.yml deleted file mode 100644 index ad1d1d9db2..0000000000 --- a/.github/workflows/reports-check.yml +++ /dev/null @@ -1,38 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: reports-check -on: - issues: - types: [ opened ] -permissions: - issues: write - contents: read -jobs: - check: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: tracehubpm/reports-check-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - openai_token: ${{ secrets.OPENAI_API_KEY }} diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml deleted file mode 100644 index c8a2571602..0000000000 --- a/.github/workflows/shellcheck.yml +++ /dev/null @@ -1,42 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: shellcheck -on: - push: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -concurrency: - group: shellcheck-${{ github.ref }} - cancel-in-progress: true -jobs: - shellcheck: - name: Shellcheck - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ludeeus/action-shellcheck@master diff --git a/.github/workflows/simian.yml b/.github/workflows/simian.yml deleted file mode 100644 index a93787a559..0000000000 --- a/.github/workflows/simian.yml +++ /dev/null @@ -1,46 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: simian -on: - push: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] - pull_request: - branches: - - master - paths-ignore: [ 'paper/**', 'sandbox/**' ] -concurrency: - group: simian-${{ github.ref }} - cancel-in-progress: true -jobs: - simian: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 17 - - run: wget --quiet http://public.yegor256.com/simian.jar -O /tmp/simian.jar - - run: java -jar /tmp/simian.jar -threshold=15 "-excludes=**/gen" "-excludes=**/it" "**/*.java" diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 7a04f28de6..e8a4e6b790 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -25,6 +25,11 @@ on: push: branches: - master + pull_request: + branches: + - master + paths-ignore: [ 'paper/**', 'sandbox/**' ] + types: [ opened, synchronize, reopened ] concurrency: group: sonar-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/trufflehog-oss.yml b/.github/workflows/trufflehog-oss.yml deleted file mode 100644 index c653c56010..0000000000 --- a/.github/workflows/trufflehog-oss.yml +++ /dev/null @@ -1,43 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- - -name: trufflehog-oss -'on': - push: - branches: - - master - pull_request: - branches: - - master -jobs: - trufflehog: - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Secret Scanning - uses: trufflesecurity/trufflehog@main - with: - extra_args: --only-verified diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml deleted file mode 100644 index 58db369c18..0000000000 --- a/.github/workflows/typos.yml +++ /dev/null @@ -1,37 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- - -name: typos -'on': - push: - branches: - - master - pull_request: - branches: - - master -jobs: - typos: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: crate-ci/typos@master diff --git a/.github/workflows/up.yml b/.github/workflows/up.yml deleted file mode 100644 index 2433bfbe74..0000000000 --- a/.github/workflows/up.yml +++ /dev/null @@ -1,49 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: up -on: - push: - branches: - - master - tags: - - '*' -concurrency: - group: up-${{ github.ref }} - cancel-in-progress: true -jobs: - up: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - run: |- - git fetch --tags --force && \ - latest=$(git tag --sort=creatordate | tail -1) && \ - sed -E -i "s/[^<]+/${latest}/g" eo-maven-plugin/README.md - - uses: peter-evans/create-pull-request@v6 - with: - branch: version-up - commit-message: 'new version in README' - delete-branch: true - title: 'New version in README' - assignees: yegor256 - base: master diff --git a/.github/workflows/xcop.yml b/.github/workflows/xcop.yml deleted file mode 100644 index 459ba45922..0000000000 --- a/.github/workflows/xcop.yml +++ /dev/null @@ -1,43 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: xcop -on: - push: - branches: - - master - pull_request: - branches: - - master -concurrency: - group: xcop-${{ github.ref }} - cancel-in-progress: true -jobs: - xcop: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: g4s8/xcop-action@v1.3 - with: - files: | - **/*.xsl - **/*.xml diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml deleted file mode 100644 index de895f97c5..0000000000 --- a/.github/workflows/yamllint.yml +++ /dev/null @@ -1,39 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- - -name: yamllint -'on': - push: - branches: - - master - pull_request: - branches: - - master -jobs: - yamllint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: ibiqlik/action-yamllint@v3 - with: - config-file: .yamllint.yml diff --git a/.github/workflows/year.yml b/.github/workflows/year.yml deleted file mode 100644 index 652d88a47d..0000000000 --- a/.github/workflows/year.yml +++ /dev/null @@ -1,47 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 Objectionary.com -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. ---- -name: year -on: - schedule: - - cron: '0 1 22 * *' # Runs at 01:00 UTC on the 22nd of every month -concurrency: - group: year-${{ github.ref }} - cancel-in-progress: true -jobs: - license: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: FantasticFiasco/action-update-license-year@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - path: | #add new path with glob pattern https://www.npmjs.com/package/glob - **/LICENSE.txt - **/*.xml - **/*.xsl - **/*.java - **/*.eo - **/*.groovy - commitTitle: "update license year" diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/dependencies/DcsFake.java b/eo-maven-plugin/src/main/java/org/eolang/maven/dependencies/DcsFake.java index 191216a040..64d3c53094 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/dependencies/DcsFake.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/dependencies/DcsFake.java @@ -95,7 +95,7 @@ static Dependency randDep(final String scope) { return DcsFake.dep( UUID.randomUUID().toString(), UUID.randomUUID().toString(), - String.valueOf(Math.abs(rand.nextInt())), + String.valueOf(rand.nextInt(Integer.MAX_VALUE)), scope ); } @@ -125,7 +125,7 @@ private static Dependency randDep() { return DcsFake.dep( UUID.randomUUID().toString(), UUID.randomUUID().toString(), - String.valueOf(Math.abs(rand.nextInt())), + String.valueOf(rand.nextInt(Integer.MAX_VALUE)), scope ); } diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/name/OnDefault.java b/eo-maven-plugin/src/main/java/org/eolang/maven/name/OnDefault.java index 6a636b1d16..53661cbf80 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/name/OnDefault.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/name/OnDefault.java @@ -60,7 +60,7 @@ public String value() { @Override public CommitHash hash() { - return new CommitHash.ChConstant(this.name.label().get()); + return new CommitHash.ChConstant(this.name.label().orElse("")); } @Override diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/PullMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/PullMojoTest.java index 22d542d7b4..ebfbb9d5f1 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/PullMojoTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/PullMojoTest.java @@ -299,27 +299,26 @@ void doesNotPullInOfflineMode(@TempDir final Path tmp) throws IOException { @Test @CaptureLogs - void showsWhereNotFoundWasDiscoveredAt(@TempDir final Path tmp, final Logs out) { + void showsWhereNotFoundWasDiscoveredAt(@TempDir final Path tmp, final Logs out) + throws IOException { + final FakeMaven mvn = new FakeMaven(tmp) + .withProgram( + "+package com.example\n", + "# This is the default 64+ symbols comment in front of named abstract object.", + "[] > main", + " org.eolang.org > @" + ) + .with( + "objectionaries", + new Objectionaries.Fake( + new OyRemote( + new ChRemote("master") + ) + ) + ); Assertions.assertThrows( Exception.class, - () -> { - new FakeMaven(tmp) - .withProgram( - "+package com.example\n", - "# This is the default 64+ symbols comment in front of named abstract object.", - "[] > main", - " org.eolang.org > @" - ) - .with( - "objectionaries", - new Objectionaries.Fake( - new OyRemote( - new ChRemote("master") - ) - ) - ) - .execute(new FakeMaven.Pull()); - }, + () -> mvn.execute(new FakeMaven.Pull()), "Pull mojo should fail, but it does not" ); Assertions.assertTrue( diff --git a/eo-runtime/src/main/java/org/eolang/Dataized.java b/eo-runtime/src/main/java/org/eolang/Dataized.java index d63d11dce0..d209309585 100644 --- a/eo-runtime/src/main/java/org/eolang/Dataized.java +++ b/eo-runtime/src/main/java/org/eolang/Dataized.java @@ -55,6 +55,11 @@ public final class Dataized { /** * Max dataization level. + * + * @todo #2251:90min It is necessary to call {@link ThreadLocal#remove()} on + * {@link Dataized#MAX_LEVEL} variables to prevent memory leaks. We should either find a place + * where this variable can be removed, or, if this is not possible + * (see https://github.com/objectionary/eo/pull/1930), come up with another solution. */ private static final ThreadLocal MAX_LEVEL = ThreadLocal.withInitial(() -> Integer.getInteger("max.dataization.log", 3)); diff --git a/eo-runtime/src/main/java/org/eolang/PhDefault.java b/eo-runtime/src/main/java/org/eolang/PhDefault.java index 3c1ed00624..3a12802956 100644 --- a/eo-runtime/src/main/java/org/eolang/PhDefault.java +++ b/eo-runtime/src/main/java/org/eolang/PhDefault.java @@ -61,6 +61,11 @@ public class PhDefault implements Phi, Cloneable { /** * Attributes nesting level. + * + * @todo #2251:90min It is necessary to call {@link ThreadLocal#remove()} on + * {@link PhDefault#NESTING} to prevent memory leaks. We should either find a place where this + * variable can be removed, or, if this is not possible + * (see https://github.com/objectionary/eo/pull/1930), come up with another solution. */ private static final ThreadLocal NESTING = ThreadLocal.withInitial(() -> 0); diff --git a/eo-runtime/src/main/java/org/eolang/PhPackage.java b/eo-runtime/src/main/java/org/eolang/PhPackage.java index 7badbf4942..9e3d106349 100644 --- a/eo-runtime/src/main/java/org/eolang/PhPackage.java +++ b/eo-runtime/src/main/java/org/eolang/PhPackage.java @@ -102,6 +102,7 @@ public Phi take(final String name) { } else { res = new AtSetRho(this.objects.get().get(key), this, key).get(); } + this.objects.remove(); return res; } diff --git a/eo-runtime/src/main/java/org/eolang/PhTraced.java b/eo-runtime/src/main/java/org/eolang/PhTraced.java index 5f906510d3..2504a470e5 100644 --- a/eo-runtime/src/main/java/org/eolang/PhTraced.java +++ b/eo-runtime/src/main/java/org/eolang/PhTraced.java @@ -46,6 +46,11 @@ public final class PhTraced implements Phi { /** * Cages that are currently being dataized. If one cage is being datazed, and * it needs to be dataized inside current dataization, the locator of current object be here. + * + * @todo #2251:90min It is necessary to call {@link ThreadLocal#remove()} on + * {@link PhTraced#DATAIZING_CAGES} to prevent memory leaks. We should either find a + * place where this variable can be removed, or, if this is not possible + * (see https://github.com/objectionary/eo/pull/1930), come up with another solution. */ private static final ThreadLocal> DATAIZING_CAGES = ThreadLocal .withInitial(HashMap::new); diff --git a/pom.xml b/pom.xml index 2ae30aeecc..aa6e717dde 100644 --- a/pom.xml +++ b/pom.xml @@ -92,8 +92,8 @@ SOFTWARE. 256M - com.objectionary:${project.name} - objectionary + c71n93_eo:${project.name} + c71n93 https://sonarcloud.io 4.13.1