Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions eo-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,6 @@
<configuration combine.self="override">
<skipInstallation>${skipITs}</skipInstallation>
<skipInvocation>${skipITs}</skipInvocation>
<!--
@todo #4702:90min Enable the fibonacci integration test.
Currently, the fibonacci integration test is disabled because it
fails with the following error:
Couldn't find object 'Φ.org.eolang.examples' because there's
no class or package 'EOorg.EOeolang.EOexamples'.
That said, all the classes and packages are successfully generated by
the eo-maven-plugin during the build process.
-->
<pomExcludes>
<exclude>fibonacci/pom.xml</exclude>
</pomExcludes>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion eo-integration-tests/src/it/fibonacci/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# SPDX-License-Identifier: MIT

invoker.mavenOpts = -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
invoker.goals = clean test
invoker.goals = clean test -X
18 changes: 6 additions & 12 deletions eo-integration-tests/src/it/fibonacci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration combine.self="override"/>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand All @@ -61,20 +56,18 @@
<version>@project.version@</version>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>register</goal>
<goal>assemble</goal>
<goal>compile</goal>
<goal>transpile</goal>
</goals>
</execution>
</executions>
<configuration>
<unrollExitError>true</unrollExitError>
<foreign>${project.build.directory}/eo/foreign.csv</foreign>
<foreignFormat>csv</foreignFormat>
<placed>${project.build.directory}/eo/placed.json</placed>
<placedFormat>json</placedFormat>
<trackTransformationSteps>true</trackTransformationSteps>
<ignoreRuntime>true</ignoreRuntime>
<failOnWarning>false</failOnWarning>
<skipLinting>true</skipLinting>
</configuration>
</plugin>
<plugin>
Expand All @@ -83,6 +76,7 @@
<version>3.6.2</version>
<executions>
<execution>
<id>run-eo-fibonacci-app</id>
<phase>test</phase>
<goals>
<goal>java</goal>
Expand Down
10 changes: 9 additions & 1 deletion eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ clazz, new FileGenerationReport(saved, tgt, target)
* @param generated Path to generated sources
* @return Amount of created files
* @throws IOException If fails to create a file
* @todo #4717:90min Move {@link #pinfos(Path)} method to a separate class.
* Currently, this method violates Single Responsibility Principle of

Copilot AI Dec 8, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar issue: Missing article "the" before "Single Responsibility Principle". Should be "violates the Single Responsibility Principle of".

Suggested change
* Currently, this method violates Single Responsibility Principle of
* Currently, this method violates the Single Responsibility Principle of

Copilot uses AI. Check for mistakes.
* MjTranspile class. After moving, make sure to cover it with unit tests.
*/
private static int pinfos(final Path generated) throws IOException {
final int size;
Expand All @@ -269,7 +272,7 @@ private static int pinfos(final Path generated) throws IOException {
for (final Path dir : dirs) {
final String pkg = generated.relativize(dir).toString()
.replace(File.separator, ".");
new Saved(
final Path saved = new Saved(
String.join(
"\n",
"/**",
Expand All @@ -284,9 +287,14 @@ private static int pinfos(final Path generated) throws IOException {
),
dir.resolve("package-info.java")
).value();
Logger.debug(MjTranspile.class, "Created %s", saved);
}
size = dirs.size();
} else {
Logger.info(
MjTranspile.class,
"No generated sources found, skipping package-info.java creation"
);
size = 0;
}
return size;
Expand Down
10 changes: 10 additions & 0 deletions eo-runtime/src/main/java/org/eolang/PhPackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ public byte[] delta() {
* Load phi object by package name from ClassLoader.
* @param fqn FQN of the EO object
* @return Phi
* @todo #4717:90min Check 'package-info.class' existence before looking for an object.
* Recently, we got an error when 'maven-compiler-plugin' removed 'package-info.class'
* during compilation and we got quite confusing error message:
* ```
* Couldn't find object 'Φ.org.eolang.examples' because there's no class or package
* 'EOorg.EOeolang.EOexamples' EOorg.EOeolang.EOexamples
* ```
* Having said that, the 'EOorg.EOeolang.EOexamples' package does exist.
* The error tells nothing about missing 'package-info.class'. We need to check for the
* existence of 'package-info.class' before trying to find an object.
*/
@SuppressWarnings("PMD.PreserveStackTrace")
private Phi loadPhi(final String fqn) {
Expand Down
Loading