Skip to content

Conversation

@volodya-lombrozo
Copy link
Member

@volodya-lombrozo volodya-lombrozo commented Dec 8, 2025

This PR enables the Fibonacci integration test.

Explanation

The jcabi-parent pom has a specific mvn-compiler-plugin that removes all the package-info.class files during compilation.

  <parent>
    <groupId>com.jcabi</groupId>
    <artifactId>parent</artifactId>
    <version>0.70.0</version>
  </parent>

This parent pom.xml is used in it/fibonacci/pom.xml. That said, current version of eo-runtime depends on these files -> execution fails

Fixes #4717

Summary by CodeRabbit

  • Tests

    • Re-enabled fibonacci integration test execution.
    • Added debug output to test invocations.
  • Chores

    • Updated build plugin configurations, replacing legacy flags with new ones.
    • Enhanced logging for build and generation processes.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 8, 2025 19:29
@github-actions github-actions bot added the core label Dec 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

This change re-enables the fibonacci integration test by removing its Maven configuration exclusion, updates the build plugin setup to use new EO Maven plugin flags, adds Maven debug mode to integration testing, and includes supporting documentation improvements for package-info handling.

Changes

Cohort / File(s) Summary
Maven Test Exclusion Removal
eo-integration-tests/pom.xml
Removed the commented-out exclusion block and todo note that prevented fibonacci/pom.xml from being invoked; fibonacci integration test is no longer skipped.
Fibonacci Build Configuration Updates
eo-integration-tests/src/it/fibonacci/pom.xml
Removed maven-compiler-plugin configuration; updated eo-maven-plugin to add new compile execution with register/compile/transpile goals; replaced legacy build flags with ignoreRuntime, failOnWarning, skipLinting; added exec-maven-plugin execution for running the EO app in test phase.
Fibonacci Test Invocation Setup
eo-integration-tests/src/it/fibonacci/invoker.properties
Added Maven debug flag -X to invoker goals, changing clean test to clean test -X.
Logging & Documentation Improvements
eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java, eo-runtime/src/main/java/org/eolang/PhPackage.java
Added debug/info logging for package-info.java creation in MjTranspile; added Javadoc todo comments documenting package-info.class existence checks needed and SRP refactoring opportunity.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Attention areas:
    • Fibonacci pom.xml: Verify the new plugin configuration and goal changes (register/compile/transpile, legacy flag replacements, exec-maven-plugin addition) align with intended build behavior.
    • Invoker properties: Confirm debug mode addition (-X flag) is intentional and won't cause test noise or failures.
    • MjTranspile.java: Verify logging additions don't introduce performance concerns or information leakage.

Possibly related PRs

Suggested reviewers

  • yegor256
  • maxonfjvipon

Poem

🐰 A fibonacci test, once locked away with care,
Now hops back into the build with flair,
Debug flags enabled, plugins rearranged,
The bridge from compile to transpile, changed.
Package-info watches from logs above,
Integration testing resumes with love! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Additional changes to fibonacci/pom.xml, invoker.properties, and maven plugin files go beyond simply enabling the test, introducing compilation flags, execution configurations, and TODO comments. Clarify whether the fibonacci test configuration changes (compile goal, ignoreRuntime flag, run-eo-fibonacci-app execution) are required by issue #4717 or if they should be in a separate PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling the fibonacci integration test in pom.xml and updating related configurations.
Linked Issues check ✅ Passed The PR successfully addresses issue #4717 by removing the commented puzzle text and pomExcludes section that disabled the fibonacci test, and updates related configurations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@volodya-lombrozo
Copy link
Member Author

@yegor256 could you take a look, please?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 174.271 169.332 -4.939 -2.83% ms/op Average Time

✅ Performance gain: benchmarks.XmirBench.xmirToEO is faster by 4.939 ms/op (2.83%)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables the previously disabled Fibonacci integration test by fixing the underlying issue where package-info.class files were being removed during compilation, causing runtime errors. The fix includes proper plugin configuration and enhanced logging.

Key changes:

  • Removed the fibonacci test exclusion from the integration tests configuration
  • Updated fibonacci pom.xml to use the compile goal instead of assemble and simplified plugin configuration
  • Added debug logging to track package-info.java file creation

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eo-integration-tests/pom.xml Removed the pomExcludes section that was preventing the fibonacci integration test from running
eo-integration-tests/src/it/fibonacci/pom.xml Removed maven-compiler-plugin override, changed from assemble to compile goal, and simplified eo-maven-plugin configuration
eo-integration-tests/src/it/fibonacci/invoker.properties Added -X flag to enable debug logging during test execution
eo-runtime/src/main/java/org/eolang/PhPackage.java Added @todo comment documenting the need to check for package-info.class existence before object lookup
eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java Added @todo comment about refactoring and enhanced logging to track package-info.java file creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* @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
Copy link

Copilot AI Dec 8, 2025

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.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
eo-integration-tests/src/it/fibonacci/invoker.properties (1)

5-5: Consider removing debug flag once the test is stable.

The -X debug flag provides verbose Maven output, which is helpful for troubleshooting a newly enabled test. However, it can clutter CI/CD logs significantly. Once the Fibonacci integration test runs reliably, consider removing the -X flag to reduce log verbosity.

eo-runtime/src/main/java/org/eolang/PhPackage.java (1)

125-134: Verify alignment of new TODO with PR objectives.

This TODO is well-documented and describes a legitimate concern about checking package-info.class existence before object lookup. However, the PR objectives state: "Remove the puzzle text from the source code once the problem is fixed" for issue #4717.

This change adds a new TODO referencing the same issue (#4717:90min). Please clarify:

  • Is this documenting a different aspect of the issue that will be addressed separately?
  • Should this TODO reference a new issue number instead?

Would you like me to help implement the package-info.class existence check suggested in this TODO, or should it be tracked in a separate issue?

eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java (1)

262-264: Good SRP observation, but verify issue reference.

The TODO correctly identifies that the pinfos method violates Single Responsibility Principle. Extracting it to a separate class with unit tests would improve maintainability.

However, this references issue #4717, which this PR is supposed to fix. If this is additional work beyond the scope of enabling the Fibonacci test, consider creating a separate issue to track this refactoring.

Would you like me to generate the code for extracting pinfos to a separate class, or should this be deferred to a follow-up issue?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 780f1a7 and 236cbcd.

📒 Files selected for processing (5)
  • eo-integration-tests/pom.xml (0 hunks)
  • eo-integration-tests/src/it/fibonacci/invoker.properties (1 hunks)
  • eo-integration-tests/src/it/fibonacci/pom.xml (2 hunks)
  • eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java (3 hunks)
  • eo-runtime/src/main/java/org/eolang/PhPackage.java (1 hunks)
💤 Files with no reviewable changes (1)
  • eo-integration-tests/pom.xml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-12T15:24:05.011Z
Learnt from: h1alexbel
Repo: objectionary/eo PR: 4431
File: eo-parser/src/main/resources/XMIR.xsd:80-81
Timestamp: 2025-08-12T15:24:05.011Z
Learning: In the EO parser architecture, Φ̇ is an alias for Φ.org.eolang that gets expanded during XMIR decoration by expand-qqs.xsl. The XSD schema for FQN patterns should only validate canonical forms (Φ and ξ as roots) since alias expansion happens before XSD validation.

Applied to files:

  • eo-runtime/src/main/java/org/eolang/PhPackage.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (java)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: mvn (ubuntu-24.04, 23)
  • GitHub Check: qulice
  • GitHub Check: mvn (windows-2022, 23)
  • GitHub Check: mvn (macos-15, 23)
  • GitHub Check: integration
  • GitHub Check: mvn (ubuntu-24.04, 17)
  • GitHub Check: ort
  • GitHub Check: benchmark
  • GitHub Check: trufflehog
  • GitHub Check: pr-size
  • GitHub Check: snippets
🔇 Additional comments (5)
eo-maven-plugin/src/main/java/org/eolang/maven/MjTranspile.java (2)

275-290: LGTM! Improved observability for package-info.java generation.

Capturing the result in the saved variable and logging it at debug level provides helpful visibility into package-info.java file creation. This is particularly useful when debugging integration tests like the newly enabled Fibonacci test.


294-297: LGTM! Clear informational logging.

The info-level log when no generated sources exist provides clear feedback about why package-info.java creation is skipped. This helps prevent confusion during builds where the generated directory hasn't been created yet.

eo-integration-tests/src/it/fibonacci/pom.xml (3)

79-84: LGTM! Core change enabling the Fibonacci integration test.

This execution is the primary change that enables the Fibonacci integration test by actually running the EO application during the test phase. The configuration correctly:

  • Targets the test phase
  • Uses exec-maven-plugin to run the Java class
  • Executes org.eolang.Main with appropriate arguments
  • Includes verbose output for debugging

This aligns perfectly with the PR objective to enable the Fibonacci integration test.


68-70: Verify new EO Maven plugin configuration properties.

The configuration has been updated with new properties (ignoreRuntime, failOnWarning, skipLinting) replacing older ones. These settings appear permissive:

  • ignoreRuntime=true - may skip runtime dependency checks
  • failOnWarning=false - allows build to continue with warnings
  • skipLinting=true - disables linting

Please confirm:

  1. Are these properties correctly named and supported in the current EO Maven plugin version?
  2. Are these permissive settings appropriate for an integration test, or should warnings and linting be enabled to catch issues?
EO Maven plugin latest configuration properties documentation

59-64: The "compile" goal is correct for compiling EO source to Java, but verify the complete execution flow is appropriate.

The compile goal (from eo-maven-plugin) parses EO sources, applies optimizations, and produces Java bytecode. This is a legitimate change from assemble, which serves a different purpose in the build pipeline.

However, the execution sequence shown—register, compile, transpile—is unusual. The typical recommended flow is registerparseoptimizecompile. Verify:

  • Is transpile still needed alongside compile?
  • Does this configuration correctly handle the full EO → XMIR → Java → bytecode transformation for the integration test?

@yegor256 yegor256 merged commit 701b707 into objectionary:master Dec 9, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fibonacci Integration Test is Disabled in pom.xml

2 participants