Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for v2.0.0 #145

Merged
merged 1 commit into from
Oct 6, 2024
Merged

Prepare for v2.0.0 #145

merged 1 commit into from
Oct 6, 2024

Conversation

jodastephen
Copy link
Member

@jodastephen jodastephen commented Oct 5, 2024

  • Update Joda-Convert to fully modular v3.0.0
  • Bring build files in line with Joda-Convert
  • Use release instead of source/target in pom.xml

Summary by CodeRabbit

Release Notes

  • New Features

    • Updated security policy to ensure timely patches for the latest versions.
    • Enhanced clarity in the release history regarding compatibility with previous versions.
  • Documentation

    • Updated Java version requirements in the README and release notes to JDK 21.
    • Added version numbers for the 2.x and 1.x branches in the documentation.
    • Included a link to GitHub release bundles for improved access to release information.
  • Bug Fixes

    • Clarified compatibility statements and improved currency symbol consistency in release history.

Copy link

coderabbitai bot commented Oct 5, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request includes updates across multiple files, primarily focusing on enhancing security policies, updating Java version requirements, and improving documentation for the Joda-Money library. The security policy now guarantees patches for the latest versions of v2.x and v1.x. Additionally, the README, release notes, and various configuration files have been updated to reflect changes in Java compatibility, versioning, and documentation clarity.

Changes

File Change Summary
.github/SECURITY.md Updated to guarantee patches for the latest versions of v2.x and v1.x.
README.md Updated Java version requirement from 11 to 21 in the release process instructions.
RELEASE-NOTES.txt Updated minimum JDK requirement from 6 or later to 21 or later.
pom.xml Updated Java SE requirement to 21, changed project version from 2.0.0-RC1-SNAPSHOT to 2.0.0-SNAPSHOT, and modified dependency versions and profile identifiers.
src/changes/changes.xml Updated release version from 2.0.0-RC1 to 2.0.0, changed release date, and updated action descriptions.
src/site/markdown/index.md Added version numbers for 2.x and 1.x branches and updated dependency version from 1.0.5 to 2.0.0.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e598506 and a622aad.

📒 Files selected for processing (6)
  • .github/SECURITY.md (1 hunks)
  • README.md (1 hunks)
  • RELEASE-NOTES.txt (1 hunks)
  • pom.xml (3 hunks)
  • src/changes/changes.xml (1 hunks)
  • src/site/markdown/index.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • .github/SECURITY.md
  • README.md
  • RELEASE-NOTES.txt
  • pom.xml
  • src/changes/changes.xml
  • src/site/markdown/index.md

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 1

🧹 Outside diff range and nitpick comments (6)
.github/website.sh (1)

24-28: Approve changes with a suggestion for improvement

The new "tidy" section is a good addition for maintaining a clean repository. It safely removes potentially obsolete branches after the main update.

However, to increase flexibility, consider making the branch names configurable. This would allow for easier updates if branch naming conventions change in the future.

Here's a suggested improvement:

 echo "## tidy..."
 cd ..
-git push --delete origin website || true
-git push --delete origin website2x || true
+BRANCHES_TO_DELETE="website website2x"
+for branch in $BRANCHES_TO_DELETE; do
+    git push --delete origin $branch || true
+done

This change allows for easy addition or removal of branches to be deleted by modifying the BRANCHES_TO_DELETE variable.

.github/workflows/build.yml (2)

Line range hint 59-59: Approved: Token addition enhances Website step functionality

The addition of the GITHUB_TOKEN environment variable using the PERSONAL_TOKEN_GH secret is consistent with the earlier change and likely necessary for the website.sh script to function correctly.

To improve maintainability:

  1. Consider adding a comment explaining why a personal token is required for this step.
  2. Ensure the website.sh script documentation reflects the need for this token.
🧰 Tools
🪛 yamllint

[warning] 25-25: wrong indentation: expected 6 but found 4

(indentation)


Line range hint 1-62: Summary: Token changes enhance workflow capabilities

The modifications to this workflow file are focused and minimal, introducing personal access token usage in two specific areas:

  1. The Checkout step
  2. The Website step

These changes likely enable necessary operations for the v2.0.0 release preparation, particularly for the website update process. The overall structure and logic of the workflow remain unchanged, which is positive.

However, it's crucial to ensure that the use of a personal access token is absolutely necessary and that its permissions are appropriately scoped. Regular review of token usage and permissions should be incorporated into the project's security practices.

Consider documenting the rationale behind using a personal access token in the project's CI/CD documentation to aid future maintenance and security audits.

src/site/markdown/index.md (1)

84-84: Good addition of GitHub release bundles link.

The inclusion of the GitHub release bundles link enhances accessibility to the library releases. This is a valuable addition for users who prefer direct downloads from GitHub.

Consider adding a brief description of what users can find in these release bundles to provide more context. For example:

[GitHub release bundles](https://github.com/JodaOrg/joda-money/releases) (includes source code and compiled JARs).
pom.xml (2)

818-818: Approval: Updated dependencies and plugin versions

The updates to Joda-Convert (3.0.0) and various Maven plugin versions are beneficial for maintaining the project with the latest compatible versions. The downgrade of maven-project-info-reports-plugin to 3.6.2 due to an error in 3.7.0 is a pragmatic solution.

Suggestion: Create a follow-up task to monitor for a fix in the maven-project-info-reports-plugin and upgrade when possible.

Also applies to: 836-836, 839-839, 843-843


718-720: Approval: Updated profile ID and compiler release property

The change of the profile ID to 'release-artifacts' and setting the Maven compiler release property to 21 are consistent with the project updates. These changes enhance clarity and ensure proper Java 21 compatibility.

Suggestion: Consider updating any relevant documentation or README files to reflect these changes, particularly the new Java version requirement and the renamed profile.

Also applies to: 862-862

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1ea4ef3 and e0fde0a.

📒 Files selected for processing (9)
  • .github/SECURITY.md (1 hunks)
  • .github/website.sh (1 hunks)
  • .github/workflows/build.yml (2 hunks)
  • README.md (1 hunks)
  • RELEASE-NOTES.txt (1 hunks)
  • pom.xml (5 hunks)
  • src/changes/changes.xml (1 hunks)
  • src/site/markdown/index.md (2 hunks)
  • src/site/site.xml (1 hunks)
🔇 Additional comments (13)
.github/SECURITY.md (1)

5-5: Approved: Enhanced security support policy

The updated security policy now guarantees patches for the latest versions of both v2.x and v1.x. This change is beneficial as it:

  1. Provides security support for users of both major versions.
  2. Allows users to maintain v1.x installations securely whilst planning upgrades to v2.x.
  3. Aligns with the preparation for the v2.0.0 release.

However, be mindful that this may increase the maintenance workload for the project.

RELEASE-NOTES.txt (1)

7-7: Significant change in JDK requirement noted

The update to JDK 21 as the minimum requirement aligns with the PR objectives for preparing version 2.0.0. This change is likely necessary to support the updated dependencies, such as the fully modular Joda-Convert 3.0.0.

However, this is a substantial jump from the previous JDK 6 requirement and will have a significant impact on users. Consider the following suggestions:

  1. Add more context to the release notes about why this major change was necessary.
  2. Highlight any new features or improvements that this change enables.
  3. Provide guidance for users who need to upgrade their JDK version.

To ensure this change is properly documented, please run the following script:

✅ Verification successful

JDK Requirement Documentation Confirmed

The update to JDK 21 as the minimum requirement is consistently documented in both RELEASE-NOTES.txt and README.md. This aligns well with the PR objectives for preparing version 2.0.0 and updating dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the JDK 21 requirement is mentioned in other key documentation files.

# Test: Search for mentions of JDK 21 in README and other documentation files
rg --type txt --type md "JDK 21|Java 21" README.md docs/

Length of output: 134


Script:

#!/bin/bash
# Description: Search the entire repository for mentions of JDK 21 or Java 21.

rg "JDK 21|Java 21" --type-add 'doc:*.{md,txt}' --type doc .

Length of output: 152

src/site/site.xml (1)

85-85: Approved: Update to test results link

The change from "surefire-report.html" to "surefire.html" for the test results link appears to be in line with the PR objectives of aligning build files. This update likely reflects changes in the build process or output structure.

To ensure the new link is correct and functional, please run the following verification:

README.md (1)

93-93: Approved: Java version update aligns with v2.0.0 preparation

The change from Java 11 to Java 21 for the release process is consistent with the project's move to version 2.0.0 and aligns with the earlier statement in the README about Java SE 21 compatibility.

To ensure this change is reflected consistently across the project, please run the following script:

Consider the following follow-up actions:

  1. Update any CI/CD pipelines to use Java 21.
  2. Review and update build configuration files (e.g., pom.xml, build.gradle) to ensure they specify Java 21.
  3. Update developer documentation to mention the new Java version requirement.
  4. Consider adding a note in the changelog about this significant change in Java version requirement.
✅ Verification successful

Verification Successful: Java version updated to 21 with no remaining Java 11 references

The update from Java 11 to Java 21 has been successfully applied across the project. No references to Java 11 were found, and all relevant files now consistently reference Java 21.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Java version references across the project

# Test 1: Check for any remaining references to Java 11
echo "Checking for remaining Java 11 references:"
rg "Java 11" --type md --type xml --type java

# Test 2: Verify consistent mentions of Java 21
echo "Verifying Java 21 references:"
rg "Java 21|Java SE 21" --type md --type xml --type java

# Test 3: Check build configuration files for Java version
echo "Checking build configuration files:"
rg "java.version|sourceCompatibility|targetCompatibility|maven.compiler.source|maven.compiler.target" --type xml --type gradle

Length of output: 1633

src/site/markdown/index.md (3)

73-75: Excellent addition of version compatibility information.

The new details about Java SE compatibility for different branches are clear and helpful. This information is crucial for users to understand which version of Joda-Money they should use based on their Java environment.


Line range hint 1-124: Overall, excellent updates to the documentation.

The changes in this file effectively prepare the documentation for the v2.0.0 release. The added version compatibility information, GitHub release bundles link, and updated Maven dependency version all contribute to a more informative and up-to-date document.

These updates align well with the PR objectives and provide clear, valuable information to users of the Joda-Money library. Good job on maintaining comprehensive documentation alongside the code changes.


90-90: Version number correctly updated in Maven dependency example.

The Maven dependency version has been appropriately updated to 2.0.0, which aligns with the new release version mentioned earlier in the document.

To ensure consistency across the project, please run the following command to check if this version number is used consistently in other documentation or configuration files:

This will help identify any places where the version number might have been overlooked.

✅ Verification successful

Version update verified successfully.

All necessary instances of the dependency version have been correctly updated to 2.0.0. Remaining references to 1.0.5 are appropriately maintained for historical context in the documentation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to the old version number
rg --type xml --type md "1\.0\.5"
# Search for any inconsistent uses of the new version number
rg --type xml --type md "2\.0\.0"

Length of output: 544

src/changes/changes.xml (4)

Line range hint 11-33: Comprehensive and well-documented updates

The changes across versions 2.0.0, 1.0.5, and 1.0.4 demonstrate a commitment to maintaining and improving the Joda-Money library. The updates include:

  1. A major version release with full backwards compatibility
  2. Currency updates to stay current with international standards
  3. New comparison methods for enhanced functionality
  4. Platform-specific fixes for broader compatibility

These changes collectively improve the library's accuracy, functionality, and cross-platform support. The detailed documentation in the changelog is commendable and will be valuable for users upgrading between versions.


11-14: Excellent update to version 2.0.0

The changes look good. The move from RC1 to a full release with a specific date shows proper version management. The stronger commitment to backwards compatibility is commendable.

To ensure the claim of full compatibility, please run the following verification script:


Line range hint 26-33: Valuable additions in version 1.0.4

The new comparison methods and the Android-specific fix are excellent additions. They improve the library's functionality and cross-platform compatibility.

To ensure the new methods and Android fix are correctly implemented, please run the following verification script:

✅ Verification successful

Valuable additions in version 1.0.4

The new comparison methods isGreaterThanOrEqual and isLessThanOrEqual have been successfully added, enhancing the functionality of the money classes. Additionally, the workaround for the stripTrailingZeros() issue on early Android versions, as referenced in issue #129, has been appropriately addressed in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify new methods and Android fix

# Test: Check for new comparison methods
ast-grep --lang java --pattern 'public boolean isGreaterThanOrEqual($_) { $$$ }'
ast-grep --lang java --pattern 'public boolean isLessThanOrEqual($_) { $$$ }'

# Test: Verify Android-specific fix
rg --type java -A 5 'stripTrailingZeros.*Android'

Length of output: 1230


Script:

#!/bin/bash
# Description: Further verify Android-specific fix for stripTrailingZeros()

# Broad search for stripTrailingZeros usage that might relate to Android
rg --type java 'stripTrailingZeros' | rg 'Android'

# Search for any conditional statements handling Android versions in relation to stripTrailingZeros
rg --type java 'stripTrailingZeros' -A 5 | rg 'Android'

# Look for comments or annotations referencing Android in files containing stripTrailingZeros
rg --type java 'stripTrailingZeros' -B 3 | rg 'Android'

Length of output: 608


Line range hint 18-24: Good updates for version 1.0.5

The currency change for Zimbabwe and the clarification about the 'XXX' currency symbol are both valuable updates. They demonstrate attention to detail and commitment to staying current with international standards.

To ensure the currency update is correctly implemented, please run the following verification script:

pom.xml (2)

5-5: Approval: Updated Java requirement and project version

The changes to require Java SE 21 and update the project version to 2.0.0-SNAPSHOT are in line with the PR objectives. This significant update prepares the project for a major release and ensures compatibility with the latest Java version.

Also applies to: 12-12


Line range hint 1-877: Summary: Comprehensive update for Joda-Money v2.0.0 preparation

This update successfully prepares the Joda-Money project for version 2.0.0 by:

  1. Upgrading to Java 21
  2. Updating the Joda-Convert dependency to version 3.0.0
  3. Refreshing various Maven plugin versions
  4. Adjusting the release profile and compiler settings

These changes collectively modernise the project and align it with current best practices. The only minor concern is the downgrade of the maven-project-info-reports-plugin, which should be monitored for a future update.

Overall, these changes are well-considered and appropriate for the project's goals.

.github/workflows/build.yml Outdated Show resolved Hide resolved
Copy link

@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

🧹 Outside diff range and nitpick comments (3)
pom.xml (3)

12-12: Approval: Version update to 2.0.0-SNAPSHOT

The project version has been updated from a release candidate (RC1) to a snapshot of the final 2.0.0 version. This change appropriately reflects the project's progress towards a stable 2.0.0 release.

Ensure that the changelog or release notes have been updated to reflect the changes leading up to this version, if not already done.


718-720: Approval: Updated profile ID and description

The profile ID has been changed from 'release-basics' to 'release-artifacts', and its description has been updated to "Main deployment profile". These changes appear to better reflect the purpose of this profile in the deployment process.

Consider updating any related documentation or build scripts that may reference this profile ID to ensure consistency across the project.


836-836: Approval: Updated Maven plugin versions

The following Maven plugin versions have been updated:

  • maven-gpg-plugin: 3.2.6 → 3.2.7
  • maven-javadoc-plugin: 3.10.0 → 3.10.1
  • maven-project-info-reports-plugin: 3.7.0 → 3.6.2 (downgrade)

The downgrade of maven-project-info-reports-plugin is noted as necessary due to an error in version 3.7.0. Please monitor the plugin's releases for a fixed version that resolves this issue, allowing an upgrade in the future.

Also applies to: 839-839, 843-843

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e0fde0a and e598506.

📒 Files selected for processing (9)
  • .github/SECURITY.md (1 hunks)
  • .github/website.sh (1 hunks)
  • .github/workflows/build.yml (2 hunks)
  • README.md (1 hunks)
  • RELEASE-NOTES.txt (1 hunks)
  • pom.xml (5 hunks)
  • src/changes/changes.xml (1 hunks)
  • src/site/markdown/index.md (2 hunks)
  • src/site/site.xml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • .github/SECURITY.md
  • .github/website.sh
  • .github/workflows/build.yml
  • README.md
  • RELEASE-NOTES.txt
  • src/changes/changes.xml
  • src/site/markdown/index.md
  • src/site/site.xml
🔇 Additional comments (4)
pom.xml (4)

5-5: Approval: Updated Java version requirement

The comment has been appropriately updated to reflect the new minimum Java version requirement of Java SE 21. This change is crucial for developers and users to understand the project's compatibility.


823-823: Approval: Updated OSGi require capability

The joda.osgi.require.capability property has been updated to use ${maven.compiler.release} instead of ${maven.compiler.source}. This change aligns with modern Java practices of using the 'release' option for compilation.

This update ensures that the OSGi metadata correctly reflects the Java version required by the compiled bytecode, which is crucial for proper module resolution in OSGi environments.


862-862: Approval: Updated Maven compiler release setting

The maven.compiler.release property has been set to 21, replacing the previous source and target properties. This change aligns with the project's move to Java 21 and adopts modern compilation practices.

Using the release option instead of separate source and target options ensures better compatibility and prevents accidental use of APIs from versions newer than the target platform. This change enhances the project's build consistency and helps prevent potential runtime issues.


818-818: Approval with caution: Joda-Convert dependency update

The Joda-Convert dependency has been updated from version 2.2.3 to 3.0.0. This major version update is likely to bring important improvements or new features.

As this is a major version update, please ensure that:

  1. The project remains compatible with this new version.
  2. Any code relying on Joda-Convert is updated if necessary.
  3. The project's tests pass with this new version.

Run the following script to check for any usage of deprecated or removed Joda-Convert APIs:

* Update Joda-Convert to fully modular v3.0.1
* Rework various doc files
@jodastephen jodastephen merged commit 1675b31 into main Oct 6, 2024
5 checks passed
@jodastephen jodastephen deleted the joda-convert-module branch October 6, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant