Skip to content

Commit

Permalink
Merge branch 'master' into 2648_refactor-bin-mojo
Browse files Browse the repository at this point in the history
  • Loading branch information
levBagryansky committed Jan 10, 2024
2 parents 3b25da5 + 52c181b commit 5fcf08d
Show file tree
Hide file tree
Showing 115 changed files with 2,371 additions and 1,007 deletions.
4 changes: 3 additions & 1 deletion .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# @todo #1326:30min Enable only necessary tests. Several checks
# are not available for the project. For example a lot of
# package name contains capital letter and such names are conventional.
exclude_paths:
exclude_paths:
- "eo-runtime/src/test/groovy/check-runtime-deps.groovy"
- "eo-runtime/src/main/java/org/eolang/Data.java"
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: teatimeguest/setup-texlive-action@v3.0.0
- uses: teatimeguest/setup-texlive-action@v3.0.1
with:
update-all-packages: true
packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: teatimeguest/setup-texlive-action@v3.0.0
- uses: teatimeguest/setup-texlive-action@v3.0.1
with:
update-all-packages: true
packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox
Expand Down Expand Up @@ -37,11 +37,12 @@ jobs:
${SCRIPT} --max 10 --folder ${GITHUB_WORKSPACE}/eo-maven-plugin
# Test eo-runtime
${SCRIPT} --max 10 --folder ${GITHUB_WORKSPACE}/eo-runtime --compilation true
# @todo #2085:90min Add GitHub action step to create an issue.
# It would be convenient to add github action step that will create an
# issue in case of any of the tests is failed. We can do it through
# <a href="https://github.com/JasonEtco/create-an-issue">create-an-issue</a>
# action. Also, you can read about that problem in that discussion:
# <a href="https://github.com/orgs/community/discussions/25111">
# Create an issue case the workflow fails</a>

report-fail:
name: Create issue on failure
needs: build
if: failure() && github.even.pull_request == null
runs-on: ubuntu-22.04
steps:
- uses: jayqi/failed-build-issue-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 6 additions & 3 deletions .github/workflows/ebnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: |
sudo apt-get update
sudo apt-get -y install ghostscript imagemagick texlive-extra-utils pdf2svg
- uses: teatimeguest/setup-texlive-action@v3.0.0
sudo apt-get -y install ghostscript imagemagick texlive-extra-utils pdf2svg inkscape
- uses: teatimeguest/setup-texlive-action@v3.0.1
with:
update-all-packages: true
packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox
Expand All @@ -41,12 +41,15 @@ jobs:
"-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 -density 300 -quality 100 -transparent white -colorspace RGB "${p}-cropped.pdf" "${p}.png"
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latexmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: yegor256/latexmk-action@0.8.0
- uses: yegor256/latexmk-action@0.9.0
with:
path: paper
opts: -pdf
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/pdd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ on:
pull_request:
branches:
- master
concurrency:
group: pdd-${{ github.ref }}
cancel-in-progress: true
jobs:
pdd:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: g4s8/pdd-action@master
- uses: actions/checkout@v4
- uses: volodya-lombrozo/pdd-action@master
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- uses: teatimeguest/setup-texlive-action@v3.0.0
- uses: teatimeguest/setup-texlive-action@v3.0.1
with:
update-all-packages: true
packages: scheme-basic geometry xcolor naive-ebnf microtype etoolbox
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ All of them have something **we don't tolerate**:
* static/class methods or attributes ([why?](http://www.yegor256.com/2014/05/05/oop-alternative-to-utility-classes.html))
* classes ([why?](http://www.yegor256.com/2016/09/20/oop-without-classes.html))
* implementation inheritance ([why?](http://www.yegor256.com/2016/09/13/inheritance-is-procedural.html))
* mutability ([why?](http://www.yegor256.com/2014/06/09/objects-should-be-immutable.html))
* mutability ([why?](http://www.yegor256.com/2014/06/09/objects-should-be-immutable.html) and [why not?](https://www.yegor256.com/2016/09/07/gradients-of-immutability.html))
* NULL ([why?](http://www.yegor256.com/2014/05/13/why-null-is-bad.html))
* global scope ([why?](https://www.yegor256.com/2018/07/03/global-variables.html))
* type casting ([why?](http://www.yegor256.com/2015/04/02/class-casting-is-anti-pattern.html))
Expand Down Expand Up @@ -201,6 +201,8 @@ Watch [video](https://www.youtube.com/watch?v=QaKIw1Bh3Oc) about EOLANG basics.
Read [our blog](https://news.eolang.org), especially the section with
[recently published papers](https://news.eolang.org/papers.html).

Learn [XMIR](https://news.eolang.org/2022-11-25-xmir-guide.html), a dialect of XML, which we use to represent EO program.

See the full collection of canonical objects: [objectionary](https://github.com/objectionary/home).

Take a look how we use EO as an Intermediary Representation (IR) in
Expand Down
4 changes: 2 additions & 2 deletions eo-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ create a file `pom.xml` with this content (it's just a sample):
<plugin>
<groupId>org.eolang</groupId>
<artifactId>eo-maven-plugin</artifactId>
<version>0.34.0</version>
<version>0.34.2</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -151,7 +151,7 @@ This can be achieved by disabling `maven-invoker-plugin` execution within `eo-ma
...
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>0.34.0</version>
<version>0.34.2</version>
<configuration>
<skipInstallation>true</skipInstallation>
<skipInvocation>true</skipInvocation>
Expand Down
33 changes: 17 additions & 16 deletions eo-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ SOFTWARE.
<name>eo-maven-plugin</name>
<description>EO-to-Java Maven Plugin</description>
<dependencies>
<dependency>
<groupId>org.eolang</groupId>
<artifactId>eo-runtime</artifactId>
<!-- This version is intentionally lower than the current version of the project -->
<version>0.34.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eolang</groupId>
<artifactId>eo-parser</artifactId>
Expand Down Expand Up @@ -214,7 +207,7 @@ SOFTWARE.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>2.0.9</version>
<version>2.0.11</version>
<scope>provided</scope>
<!-- This dependency must precede jcabi-maven-slf4j in order
to enable configurable Log4j logging during testing -->
Expand Down Expand Up @@ -257,6 +250,11 @@ SOFTWARE.
<artifactId>xax</artifactId>
<!-- version from parent POM -->
</dependency>
<dependency>
<groupId>com.yegor256</groupId>
<artifactId>jping</artifactId>
<!-- version from parent POM -->
</dependency>
<dependency>
<groupId>com.moandjiezana.toml</groupId>
<artifactId>toml4j</artifactId>
Expand All @@ -265,17 +263,20 @@ SOFTWARE.
</dependencies>
<build>
<plugins>
<!--
@todo #2555:30min Enable integration tests. Integration tests were disabled because of
new recursive implementation of tuple. Need to upload new version of eo-runtime to
Objectionary and enable integration tests by just removing "maven-invoker-plugin" from
this pom.xml. Don't forget to remove the puzzle.
-->
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<skipInstallation>true</skipInstallation>
<skipInvocation>true</skipInvocation>
<pomExcludes>
<!--
@todo #2660:30min Enable the following integration tests when it's possible.
Now they don't work because many .eo files are absent in the
objectionary/home repository. Once they are released, the tests
should work as is, without any modifications.
-->
<exclude>custom_goals/pom.xml</exclude>
<exclude>fibonacci/pom.xml</exclude>
<exclude>rewritten_sources/pom.xml</exclude>
</pomExcludes>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 3 additions & 1 deletion eo-maven-plugin/src/it/duplicate_classes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.67.0</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>not.all.goals</artifactId>
Expand Down Expand Up @@ -66,6 +66,7 @@ SOFTWARE.
<goals>
<goal>register</goal>
<goal>assemble</goal>
<goal>verify</goal>
<goal>transpile</goal>
<goal>copy</goal>
<goal>unplace</goal>
Expand All @@ -86,6 +87,7 @@ SOFTWARE.
<goals>
<goal>register</goal>
<goal>assemble</goal>
<goal>verify</goal>
<goal>transpile</goal>
<goal>binarize</goal>
</goals>
Expand Down
2 changes: 1 addition & 1 deletion eo-maven-plugin/src/it/fibonacci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.67.0</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion eo-maven-plugin/src/it/hash_package_layer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.67.0</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion eo-maven-plugin/src/it/rewritten_sources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.67.0</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>eo-math</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions eo-maven-plugin/src/it/simple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is the simplest possible example of a program written in EO.
Don't make it more complex than it is right now.
The purpose of this integration test is to keep it running no matter
how much we change the eo-maven-plugin or the eo-runtime modules.
1 change: 1 addition & 0 deletions eo-maven-plugin/src/it/simple/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals = clean compile
75 changes: 75 additions & 0 deletions eo-maven-plugin/src/it/simple/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License (MIT)
Copyright (c) 2016-2023 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.67.0</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>examples</artifactId>
<version>@project.version@</version>
<packaging>jar</packaging>
<name>Simplest possible EO program</name>
<build>
<plugins>
<plugin>
<groupId>org.eolang</groupId>
<artifactId>eo-maven-plugin</artifactId>
<version>@project.version@</version>
<executions>
<execution>
<goals>
<goal>register</goal>
<goal>assemble</goal>
<goal>verify</goal>
<goal>transpile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.eolang.Main</mainClass>
<arguments>
<argument>org.eolang.examples.app</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The MIT License (MIT)
#
# Copyright (c) 2016-2023 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.

+package org.eolang.examples
+alias org.eolang.io.stdout

[args] > app
stdout > @
"Hello, world!\n"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/**
* The MIT License (MIT)
*
* Copyright (c) 2016-2023 Objectionary.com
Expand All @@ -21,9 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* Integration tests.
*
* @since 0.30
*/
package org.eolang.maven.it;

new File(basedir, 'build.log').text.contains('BUILD SUCCESS')

true

0 comments on commit 5fcf08d

Please sign in to comment.