Skip to content

Conversation

thomas-nguy
Copy link
Collaborator

@thomas-nguy thomas-nguy commented Oct 2, 2025

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

Downgrade to v1

Prevent errors when importing the project

go.mod:14:2: require github.com/crypto-org-chain/cronos/v2: version "v1.5.0" invalid: should be v2, not v1

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • Refactor
    • Migrated internal Cronos imports from v2 to non-versioned module paths across the codebase; no runtime behavior or public APIs changed.
  • Chores
    • Updated module declaration, build/test tooling, and proto-generation scripts to use the new canonical import paths.
  • Documentation
    • Added UNRELEASED changelog entry documenting the module path change.

@thomas-nguy thomas-nguy requested a review from a team as a code owner October 2, 2025 05:19
@thomas-nguy thomas-nguy requested review from JayT106 and randy-cro and removed request for a team October 2, 2025 05:19
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Walkthrough

Module path and proto go_package options were moved from github.com/crypto-org-chain/cronos/v2... to github.com/crypto-org-chain/cronos... across the repo; Makefile SIMAPP and go.mod module declaration updated. Changes are import/path and proto metadata updates only.

Changes

Cohort / File(s) Summary
Module & build
go.mod, Makefile
Module declaration and Makefile SIMAPP updated from github.com/crypto-org-chain/cronos/v2/... to github.com/crypto-org-chain/cronos/....
App & CLI entrypoints
app/app.go, app/legacy.go, app/prefix.go, app/*, cmd/cronosd/*
Replace v2 import paths with non-versioned github.com/crypto-org-chain/cronos/... across app and CLI entry files; no logic changes.
Core module & RPC
x/cronos/module.go, x/cronos/genesis.go, x/cronos/rpc/api.go, x/cronos/*
Update imports and references from v2 paths to non-versioned paths for module, client, rpc and related code; behavior unchanged.
Keeper, precompiles & evm handlers
x/cronos/keeper/*, x/cronos/keeper/precompiles/*, x/cronos/keeper/evmhandlers/*
Switch keeper, precompile, migrations, permissions, params, and evm handler imports to non-versioned module paths; code unchanged.
Events & bindings
x/cronos/events/*
Migrate event binding import paths (ica, relayer, bindings) from v2 to non-versioned paths; no runtime logic changes.
x/e2ee module & CLI
x/e2ee/*, x/e2ee/client/cli/*
Replace v2 import paths with github.com/crypto-org-chain/cronos/x/e2ee/...; no behavioral changes.
Protobufs & generation script
proto/*/*.proto, scripts/protocgen.sh
Update proto go_package options from v2 to non-versioned paths; protocgen script now copies from cronos/* instead of cronos/v2/*.
Tests & simulation tooling
x/cronos/*_test.go, x/cronos/simulation/*, app/*_test.go, testutil/simapp/simapp.go, app/bench_test.go
Update test and simulation imports to the new module paths; test logic preserved.
Misc & docs
CHANGELOG.md, other scripts
Added changelog entry noting module path move; minor tooling/script import adjustments.

Sequence Diagram(s)

(omitted — changes limited to imports and proto metadata; no control-flow modifications)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • JayT106
  • randy-cro

Poem

I nibble paths and hop with glee,
v2 hops back, the root is free.
go.mod, protos, Makefile too,
imports tidy — fresh and new.
A rabbit cheers: small change, big view. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change of adopting semver conventions for the Go module, which directly aligns with updating the module path from v2 to v1 and adjusting import references throughout the codebase. It is concise, clear, and specific enough for a teammate to understand the main purpose of the changeset at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80b0c73 and 09ae4b3.

📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • go.mod
  • CHANGELOG.md
⏰ 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). (20)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: Run golangci-lint
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: unittest
  • GitHub Check: gomod2nix
  • GitHub Check: Analyze (go)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan

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.

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: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 914ffb0 and 4da51e5.

📒 Files selected for processing (27)
  • Makefile (1 hunks)
  • app/app.go (1 hunks)
  • go.mod (1 hunks)
  • x/cronos/client/cli/query.go (1 hunks)
  • x/cronos/client/cli/tx.go (1 hunks)
  • x/cronos/client/proposal_handler.go (1 hunks)
  • x/cronos/genesis.go (1 hunks)
  • x/cronos/genesis_test.go (1 hunks)
  • x/cronos/handler_test.go (1 hunks)
  • x/cronos/keeper/evm.go (1 hunks)
  • x/cronos/keeper/evm_hooks.go (1 hunks)
  • x/cronos/keeper/evm_hooks_test.go (1 hunks)
  • x/cronos/keeper/evm_test.go (1 hunks)
  • x/cronos/keeper/evmhandlers_test.go (1 hunks)
  • x/cronos/keeper/grpc_query.go (1 hunks)
  • x/cronos/keeper/ibc.go (1 hunks)
  • x/cronos/keeper/ibc_test.go (1 hunks)
  • x/cronos/keeper/keeper_test.go (1 hunks)
  • x/cronos/keeper/migrations.go (1 hunks)
  • x/cronos/keeper/msg_server.go (1 hunks)
  • x/cronos/keeper/params.go (1 hunks)
  • x/cronos/keeper/params_test.go (1 hunks)
  • x/cronos/keeper/permissions.go (1 hunks)
  • x/cronos/module.go (1 hunks)
  • x/cronos/proposal_handler.go (1 hunks)
  • x/cronos/rpc/api.go (1 hunks)
  • x/cronos/types/messages_test.go (1 hunks)
⏰ 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). (19)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: Run golangci-lint
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: Analyze (go)
  • GitHub Check: unittest
  • GitHub Check: gomod2nix
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (19)
x/cronos/genesis.go (1)

6-7: LGTM! Import paths correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for both keeper and types packages.

x/cronos/proposal_handler.go (1)

4-5: LGTM! Import paths correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for both keeper and types packages.

x/cronos/keeper/msg_server.go (1)

6-6: LGTM! Import path correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for the types package.

x/cronos/keeper/params.go (1)

7-7: LGTM! Import path correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for the types package.

x/cronos/keeper/grpc_query.go (1)

8-8: LGTM! Import path correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for the types package.

x/cronos/keeper/evmhandlers_test.go (1)

8-11: LGTM! Import paths correctly updated.

All four import paths (keeper, evmhandlers, mock, types) are correctly migrated from v2 to v1 module layout.

x/cronos/genesis_test.go (1)

4-5: LGTM! Import paths correctly updated.

The import path migration from v2 to v1 module layout is correctly applied for both cronos and types packages.

x/cronos/keeper/migrations.go (1)

4-4: LGTM! Import path correctly updated.

The migration import path has been updated from cronos/v2/x/cronos/migrations/v2 to cronos/x/cronos/migrations/v2, aligning with the module path change while preserving the v2 alias for backward compatibility.

x/cronos/types/messages_test.go (1)

10-11: LGTM! Test imports correctly updated.

Both import paths have been properly updated to the non-v2 module layout:

  • cmdcfg now imports from cronos/cmd/cronosd/config
  • types now imports from cronos/x/cronos/types

Test logic remains unchanged.

x/cronos/keeper/permissions.go (1)

4-4: LGTM! Import path correctly updated.

The types package import has been updated from cronos/v2/x/cronos/types to cronos/x/cronos/types, maintaining all functionality with the new module path.

go.mod (1)

1-1: LGTM! Module path correctly downgraded to align with semantic versioning.

This is the critical change that resolves the Go module error mentioned in the PR description. The module path has been correctly changed from github.com/crypto-org-chain/cronos/v2 to github.com/crypto-org-chain/cronos to match the actual version (v1.x.x) being used, fixing the semver convention violation.

Makefile (1)

166-166: LGTM! SIMAPP path correctly updated.

The SIMAPP variable has been updated from github.com/crypto-org-chain/cronos/v2/app to github.com/crypto-org-chain/cronos/app, ensuring simulation tests reference the correct module path after the migration.

x/cronos/keeper/evm_hooks.go (1)

4-4: LGTM! Import path correctly updated.

The types package import has been updated from cronos/v2/x/cronos/types to cronos/x/cronos/types. The EVM hooks logic remains unchanged and continues to reference types correctly.

x/cronos/client/cli/tx.go (1)

13-13: LGTM! Import path correctly updated.

The types package import has been updated from cronos/v2/x/cronos/types to cronos/x/cronos/types. All CLI command logic and message type references remain functional with the new import path.

x/cronos/keeper/ibc.go (1)

10-10: LGTM! Import path correctly updated.

The types package import has been updated from cronos/v2/x/cronos/types to cronos/x/cronos/types. All IBC transfer and coin conversion logic remains unchanged and continues to reference types correctly.

x/cronos/client/cli/query.go (1)

7-7: LGTM!

The import path has been correctly updated to align with the module path downgrade from v2 to v1.

x/cronos/rpc/api.go (1)

10-10: LGTM!

The import path has been correctly updated to align with the module path downgrade from v2 to v1.

x/cronos/client/proposal_handler.go (1)

4-4: LGTM!

The import path has been correctly updated to align with the module path downgrade from v2 to v1.

app/app.go (1)

44-58: LGTM!

All cronos and e2ee module import paths have been consistently updated from v2 to the non-versioned path, aligning with the module path downgrade. The addition of the docs package import is also appropriate.

Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 35.81%. Comparing base (a3c2f70) to head (09ae4b3).
⚠️ Report is 113 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1880       +/-   ##
===========================================
+ Coverage   16.87%   35.81%   +18.94%     
===========================================
  Files          72      127       +55     
  Lines        6163    11812     +5649     
===========================================
+ Hits         1040     4231     +3191     
- Misses       5000     7158     +2158     
- Partials      123      423      +300     
Files with missing lines Coverage Δ
app/block_address.go 21.73% <ø> (ø)
app/legacy.go 100.00% <ø> (ø)
testutil/simapp/simapp.go 0.00% <ø> (ø)
x/cronos/client/cli/query.go 81.25% <ø> (ø)
x/cronos/client/cli/tx.go 39.26% <ø> (+0.39%) ⬆️
x/cronos/events/decoders.go 0.00% <ø> (ø)
x/cronos/events/events.go 23.07% <ø> (ø)
x/cronos/genesis.go 64.28% <ø> (+64.28%) ⬆️
x/cronos/keeper/evm.go 53.95% <ø> (+53.95%) ⬆️
x/cronos/keeper/evm_hooks.go 40.00% <ø> (+21.81%) ⬆️
... and 31 more

... and 60 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thomas-nguy thomas-nguy changed the title chore: semver convention for go module chore: use semver convention for go module Oct 2, 2025
@JayT106
Copy link
Contributor

JayT106 commented Oct 2, 2025

The module version 2 has been introduced a while ago, Is the import error seen recently? Can you describe how you import project to get this error?

@thomas-nguy
Copy link
Collaborator Author

thomas-nguy commented Oct 3, 2025

The explorer team is importing directly cronos project, it seems they were using 0.9.x before so they didnt got this issue.

It seems the error happen if you try to import

require github.com/crypto-org-chain/cronos/v2 v1.5.0

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4da51e5 and 356c059.

⛔ Files ignored due to path filters (7)
  • x/cronos/types/cronos.pb.go is excluded by !**/*.pb.go
  • x/cronos/types/genesis.pb.go is excluded by !**/*.pb.go
  • x/cronos/types/query.pb.go is excluded by !**/*.pb.go
  • x/cronos/types/tx.pb.go is excluded by !**/*.pb.go
  • x/e2ee/types/genesis.pb.go is excluded by !**/*.pb.go
  • x/e2ee/types/query.pb.go is excluded by !**/*.pb.go
  • x/e2ee/types/tx.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing (74)
  • Makefile (1 hunks)
  • app/app.go (1 hunks)
  • app/bench_test.go (1 hunks)
  • app/block_address.go (1 hunks)
  • app/legacy.go (1 hunks)
  • app/prefix.go (1 hunks)
  • app/sim_test.go (1 hunks)
  • app/test_helpers.go (1 hunks)
  • cmd/cronosd/cmd/root.go (1 hunks)
  • cmd/cronosd/cmd/versiondb.go (1 hunks)
  • cmd/cronosd/main.go (1 hunks)
  • go.mod (1 hunks)
  • proto/cronos/cronos.proto (1 hunks)
  • proto/cronos/genesis.proto (1 hunks)
  • proto/cronos/query.proto (1 hunks)
  • proto/cronos/tx.proto (1 hunks)
  • proto/e2ee/genesis.proto (1 hunks)
  • proto/e2ee/query.proto (1 hunks)
  • proto/e2ee/tx.proto (1 hunks)
  • scripts/protocgen.sh (1 hunks)
  • testutil/simapp/simapp.go (1 hunks)
  • x/cronos/client/cli/query.go (1 hunks)
  • x/cronos/client/cli/tx.go (1 hunks)
  • x/cronos/client/proposal_handler.go (1 hunks)
  • x/cronos/events/decoders.go (1 hunks)
  • x/cronos/events/events.go (1 hunks)
  • x/cronos/genesis.go (1 hunks)
  • x/cronos/genesis_test.go (1 hunks)
  • x/cronos/handler_test.go (1 hunks)
  • x/cronos/keeper/evm.go (1 hunks)
  • x/cronos/keeper/evm_hooks.go (1 hunks)
  • x/cronos/keeper/evm_hooks_test.go (1 hunks)
  • x/cronos/keeper/evm_test.go (1 hunks)
  • x/cronos/keeper/evmhandlers/send_cro_to_ibc.go (1 hunks)
  • x/cronos/keeper/evmhandlers/send_to_account.go (1 hunks)
  • x/cronos/keeper/evmhandlers/send_to_ibc.go (1 hunks)
  • x/cronos/keeper/evmhandlers/send_to_ibc_v2.go (1 hunks)
  • x/cronos/keeper/evmhandlers_test.go (1 hunks)
  • x/cronos/keeper/grpc_query.go (1 hunks)
  • x/cronos/keeper/ibc.go (1 hunks)
  • x/cronos/keeper/ibc_test.go (1 hunks)
  • x/cronos/keeper/keeper.go (1 hunks)
  • x/cronos/keeper/keeper_test.go (1 hunks)
  • x/cronos/keeper/migrations.go (1 hunks)
  • x/cronos/keeper/msg_server.go (1 hunks)
  • x/cronos/keeper/msg_server_test.go (1 hunks)
  • x/cronos/keeper/params.go (1 hunks)
  • x/cronos/keeper/params_test.go (1 hunks)
  • x/cronos/keeper/permissions.go (1 hunks)
  • x/cronos/keeper/permissions_test.go (1 hunks)
  • x/cronos/keeper/precompiles/bank.go (1 hunks)
  • x/cronos/keeper/precompiles/ica.go (1 hunks)
  • x/cronos/keeper/precompiles/relayer.go (1 hunks)
  • x/cronos/middleware/conversion_middleware.go (1 hunks)
  • x/cronos/migrations/v2/migrate.go (1 hunks)
  • x/cronos/migrations/v2/migrate_test.go (1 hunks)
  • x/cronos/module.go (1 hunks)
  • x/cronos/proposal_handler.go (1 hunks)
  • x/cronos/rpc/api.go (1 hunks)
  • x/cronos/simulation/decoder.go (1 hunks)
  • x/cronos/simulation/decoder_test.go (1 hunks)
  • x/cronos/simulation/genesis.go (1 hunks)
  • x/cronos/simulation/genesis_test.go (1 hunks)
  • x/cronos/simulation/operations.go (1 hunks)
  • x/cronos/types/messages_test.go (1 hunks)
  • x/e2ee/client/cli/decrypt.go (1 hunks)
  • x/e2ee/client/cli/encrypt.go (1 hunks)
  • x/e2ee/client/cli/encrypt_to_validators.go (1 hunks)
  • x/e2ee/client/cli/generate.go (1 hunks)
  • x/e2ee/client/cli/pubkey.go (1 hunks)
  • x/e2ee/client/cli/query.go (1 hunks)
  • x/e2ee/client/cli/tx.go (1 hunks)
  • x/e2ee/keeper/keeper.go (1 hunks)
  • x/e2ee/module.go (1 hunks)
✅ Files skipped from review due to trivial changes (17)
  • x/cronos/keeper/evmhandlers/send_to_ibc_v2.go
  • x/cronos/simulation/decoder_test.go
  • x/cronos/keeper/evm_hooks_test.go
  • x/cronos/simulation/genesis.go
  • app/legacy.go
  • testutil/simapp/simapp.go
  • proto/cronos/cronos.proto
  • x/e2ee/client/cli/query.go
  • x/cronos/client/cli/query.go
  • x/cronos/simulation/decoder.go
  • x/cronos/keeper/evmhandlers/send_cro_to_ibc.go
  • x/cronos/middleware/conversion_middleware.go
  • app/prefix.go
  • x/cronos/keeper/precompiles/ica.go
  • x/cronos/keeper/permissions.go
  • x/cronos/keeper/ibc.go
  • x/cronos/events/decoders.go
🚧 Files skipped from review as they are similar to previous changes (14)
  • x/cronos/keeper/evmhandlers_test.go
  • x/cronos/keeper/evm_test.go
  • x/cronos/keeper/evm_hooks.go
  • x/cronos/genesis.go
  • x/cronos/keeper/msg_server.go
  • x/cronos/rpc/api.go
  • x/cronos/types/messages_test.go
  • x/cronos/keeper/migrations.go
  • x/cronos/client/cli/tx.go
  • x/cronos/genesis_test.go
  • x/cronos/keeper/grpc_query.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/keeper/evm.go
  • x/cronos/keeper/params.go
🧰 Additional context used
🪛 GitHub Actions: Protobuf
proto/e2ee/tx.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/e2ee/types" to "github.com/crypto-org-chain/cronos/x/e2ee/types".

proto/cronos/tx.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/cronos/types" to "github.com/crypto-org-chain/cronos/x/cronos/types".

proto/e2ee/genesis.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/e2ee/types" to "github.com/crypto-org-chain/cronos/x/e2ee/types".

proto/cronos/query.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/cronos/types" to "github.com/crypto-org-chain/cronos/x/cronos/types".

Makefile

[error] 330-330: proto-check-breaking failed. Make target 'proto-check-breaking' exited with code 100.

proto/e2ee/query.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/e2ee/types" to "github.com/crypto-org-chain/cronos/x/e2ee/types".

proto/cronos/genesis.proto

[error] 1-1: File option "go_package" changed from "github.com/crypto-org-chain/cronos/v2/x/cronos/types" to "github.com/crypto-org-chain/cronos/x/cronos/types".

⏰ 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). (21)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: build (macos-14)
  • GitHub Check: unittest
  • GitHub Check: gomod2nix
  • GitHub Check: Analyze (go)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: Run golangci-lint
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (43)
x/cronos/keeper/permissions_test.go (1)

4-4: LGTM! Module path correctly updated for v1 semantic versioning.

The import path change from github.com/crypto-org-chain/cronos/v2/x/cronos/keeper to github.com/crypto-org-chain/cronos/x/cronos/keeper correctly aligns with Go module semantic versioning requirements. Since the project uses v1.x.x version tags (e.g., v1.5.0), the module path must not include the /v2 suffix. This resolves the reported Go module import error.

x/cronos/keeper/msg_server_test.go (1)

4-5: LGTM — all /v2 references removed and imports updated.

Go imports, go.mod, and .proto files no longer reference /v2.

x/cronos/keeper/evmhandlers/send_to_ibc.go (1)

7-8: LGTM — All /v2 import references removed. Verified no remaining /v2 paths in Go source or go.mod.

app/bench_test.go (1)

18-18: LGTM! Import path correctly updated.

The import path has been properly migrated from the v2 module path to the non-v2 path, aligning with the PR's objective to fix Go module versioning.

x/cronos/simulation/genesis_test.go (1)

8-9: LGTM! Import paths correctly updated.

Both simulation and types package imports have been properly migrated from v2 to non-v2 module paths.

x/cronos/keeper/evmhandlers/send_to_account.go (1)

7-8: LGTM! Import paths correctly updated.

The keeper and types package imports have been properly migrated to non-v2 module paths while preserving the cronoskeeper alias.

x/cronos/migrations/v2/migrate_test.go (1)

6-8: LGTM! Import paths correctly updated.

All three imports (exported, migrations/v2, and types) have been properly migrated to non-v2 module paths while preserving the v2 alias for the migrations package.

app/sim_test.go (1)

17-17: LGTM! Import path correctly updated.

The cronos types import has been properly migrated to the non-v2 module path while preserving the cronosmoduletypes alias.

x/cronos/keeper/keeper.go (1)

12-13: LGTM! Import paths correctly updated.

The precompiles and types package imports have been properly migrated to non-v2 module paths while preserving the cronosprecompiles alias.

x/cronos/keeper/ibc_test.go (1)

8-10: LGTM! Import paths correctly updated.

All three imports (keeper, keeper/mock, and types) have been properly migrated to non-v2 module paths while preserving the respective aliases. This resolves the previously flagged compilation issue.

x/cronos/keeper/precompiles/bank.go (1)

7-7: LGTM! Import path correctly updated.

The bank precompile bindings import has been properly migrated from the v2 module path to the non-v2 path.

x/cronos/simulation/operations.go (1)

7-8: LGTM: Import paths correctly migrated.

The imports now reference the non-v2 module paths, aligning with the repository-wide module path refactor.

x/cronos/migrations/v2/migrate.go (1)

4-5: LGTM: Import paths correctly migrated.

The imports now reference the non-v2 module paths, aligning with the repository-wide module path refactor.

app/test_helpers.go (1)

18-18: LGTM: Import path correctly migrated.

The import now references the non-v2 module path, aligning with the repository-wide module path refactor.

proto/e2ee/query.proto (1)

6-6: LGTM: Protobuf go_package path correctly migrated.

The go_package option now references the non-v2 module path, consistent with the repository-wide refactor. The pipeline failure flagging this change is expected for protobuf metadata updates.

app/block_address.go (1)

6-6: LGTM: Import path correctly migrated.

The import now references the non-v2 module path, aligning with the repository-wide module path refactor.

x/cronos/handler_test.go (1)

9-11: LGTM: Import paths correctly migrated.

The imports now reference the non-v2 module paths, aligning with the repository-wide module path refactor.

scripts/protocgen.sh (1)

19-19: LGTM: Proto file copy path correctly migrated.

The source path now references the non-v2 directory structure, aligning with the repository-wide module path refactor.

x/cronos/keeper/params_test.go (1)

6-8: LGTM: Import paths correctly migrated.

All imports now reference the non-v2 module paths, resolving the incomplete migration flagged in the previous review. The changes align with the repository-wide module path refactor.

proto/cronos/query.proto (1)

11-11: Proto go_package path update is consistent with module migration.

The go_package option change aligns with the broader module-path refactor from cronos/v2 to cronos. This is a breaking change for generated Go code consumers, as flagged by the pipeline.

Expected impact:

  • Generated Go code will use package path github.com/crypto-org-chain/cronos/x/cronos/types instead of github.com/crypto-org-chain/cronos/v2/x/cronos/types.
  • All code importing the old generated package must update imports.

The pipeline correctly identified this as a breaking change. Ensure migration documentation covers proto-generated code package path updates.

Based on pipeline failures.

x/cronos/keeper/precompiles/relayer.go (1)

9-11: Import paths correctly updated to align with module migration.

The import paths have been updated from cronos/v2 to cronos (non-v2) for:

  • cronosevents package
  • precompile/relayer bindings package
  • types package

This aligns with the broader module-path refactor. No functional changes.

proto/cronos/tx.proto (1)

11-11: Proto go_package path update is consistent with module migration.

The go_package option change aligns with the module-path refactor from cronos/v2 to cronos. This is a breaking change for generated Go code consumers, as flagged by the pipeline.

The change is correct and consistent with the PR objective. Ensure migration documentation covers proto-generated code package path updates.

Based on pipeline failures.

proto/cronos/genesis.proto (1)

9-9: Proto go_package path update is consistent with module migration.

The go_package option change aligns with the module-path refactor from cronos/v2 to cronos. This is a breaking change for generated Go code consumers, as flagged by the pipeline.

The change is correct and consistent with the PR objective.

Based on pipeline failures.

Makefile (2)

166-166: SIMAPP path correctly updated to align with module migration.

The SIMAPP variable has been updated from github.com/crypto-org-chain/cronos/v2/app to github.com/crypto-org-chain/cronos/app, aligning with the broader module-path refactor. This affects simulation tests that reference the app package.


330-330: Expected proto-check-breaking failure due to intentional breaking changes.

The proto-check-breaking target failure is expected because the PR intentionally introduces breaking changes to proto go_package options (module path migration from v2 to non-v2). The protobuf breaking-change detection correctly flagged these changes.

Recommended actions:

  1. Document the breaking changes in CHANGELOG with migration instructions for proto-generated code consumers.
  2. Consider temporarily bypassing the proto-check-breaking check for this PR (e.g., using --against flag with an older branch or acknowledging the intentional break).
  3. Ensure the next release version aligns with semantic versioning (use v1.x.x, not v2.x.x).

Based on pipeline failures.

proto/e2ee/tx.proto (1)

6-6: Proto go_package path update is consistent with module migration.

The go_package option change aligns with the module-path refactor from cronos/v2 to cronos for the e2ee module. This is a breaking change for generated Go code consumers, as flagged by the pipeline.

The change is correct and consistent with the PR objective.

Based on pipeline failures.

proto/e2ee/genesis.proto (1)

6-6: Proto go_package path update is consistent with module migration.

The go_package option change aligns with the module-path refactor from cronos/v2 to cronos for the e2ee module. This is a breaking change for generated Go code consumers, as flagged by the pipeline.

The change is correct and consistent with the PR objective.

Based on pipeline failures.

x/cronos/events/events.go (1)

6-8: LGTM! Import path updates are consistent.

The import paths have been correctly updated from the v2 module path to the non-v2 path. No functional changes detected.

app/app.go (1)

44-58: LGTM! Comprehensive import path migration completed.

All Cronos and E2EE module imports have been correctly updated from the v2 module path to the non-v2 path. The addition of the docs package import and the force-loaded RPC import are consistent with the module reorganization. No functional changes detected.

x/e2ee/client/cli/decrypt.go (1)

9-10: LGTM! Import paths correctly updated.

The e2ee keyring and types imports have been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

x/e2ee/client/cli/encrypt.go (1)

9-9: LGTM! Import path correctly updated.

The e2ee types import has been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

x/e2ee/client/cli/generate.go (1)

8-9: LGTM! Import paths correctly updated.

The e2ee keyring and types imports have been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

x/e2ee/module.go (1)

9-11: LGTM! Module imports correctly updated.

All e2ee module imports (cli, keeper, types) have been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

x/e2ee/keeper/keeper.go (1)

6-6: LGTM! Import path correctly updated.

The e2ee types import has been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

cmd/cronosd/cmd/versiondb.go (1)

9-10: LGTM! Import paths correctly updated.

The app and opendb imports have been properly migrated from the v2 module path to the non-v2 path. No functional changes detected.

x/cronos/module.go (1)

9-12: LGTM: Import paths correctly updated to non-v2 module path.

The import path changes align with the PR's objective to resolve the Go module version mismatch. All four cronos subpackage imports have been consistently updated from github.com/crypto-org-chain/cronos/v2/x/cronos/... to github.com/crypto-org-chain/cronos/x/cronos/....

x/e2ee/client/cli/encrypt_to_validators.go (1)

10-10: LGTM: Import path correctly updated.

The e2ee types import has been properly migrated to the non-v2 module path.

x/cronos/proposal_handler.go (1)

4-5: LGTM: Import paths correctly updated.

Both keeper and types package imports have been consistently migrated to the non-v2 module path.

x/e2ee/client/cli/tx.go (1)

6-6: LGTM: Import path correctly updated.

The e2ee types import has been properly migrated.

cmd/cronosd/main.go (1)

6-7: LGTM: Import paths correctly updated.

Both app and cmd package imports in the main entrypoint have been properly migrated to the non-v2 module path.

x/e2ee/client/cli/pubkey.go (1)

8-9: LGTM: Import paths correctly updated.

Both e2ee keyring and types imports have been consistently migrated to the non-v2 module path.

cmd/cronosd/cmd/root.go (1)

13-17: LGTM: Import paths correctly updated.

All four cronos-related imports (app, opendb, x/cronos, e2ee CLI) have been consistently migrated to the non-v2 module path.

x/cronos/client/proposal_handler.go (1)

4-4: LGTM: Import path correctly updated.

The cronos CLI import has been properly migrated to the non-v2 module path.

@@ -1,4 +1,4 @@
module github.com/crypto-org-chain/cronos/v2
module github.com/crypto-org-chain/cronos
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical breaking change: Verify version tags and plan migration communication.

Downgrading the module path from v2 to non-v2 is a major breaking change that affects all external consumers importing github.com/crypto-org-chain/cronos/v2.

Key concerns:

  1. Semantic versioning compliance: Go modules with major version ≥2 must have /vN suffix in the module path AND use vN.x.x version tags. If the repo has v1.x.x tags but was using /v2 module path, this caused the import error mentioned in the PR description. Downgrading to non-v2 path means the next release must be v1.x.x (not v2.x.x).

  2. Breaking change for consumers: All external code importing cronos/v2 will break and must update imports to cronos (non-v2). This requires clear migration communication.

  3. Missing migration artifacts: Ensure the PR includes:

    • CHANGELOG entry documenting the breaking change
    • Migration guide for consumers (update imports from cronos/v2 to cronos)
    • Deprecation notice for v2 module path (if applicable)
    • Coordination with a new v1.x.x version tag (not v2.x.x)

Run the following script to verify version tags and check for any remaining v2 import paths:


🏁 Script executed:

#!/bin/bash
# Check the latest version tags to determine if they are v1.x.x or v2.x.x
echo "=== Latest version tags ==="
git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -10

# Search for any remaining cronos/v2 import paths in Go files
echo -e "\n=== Remaining cronos/v2 imports in Go files ==="
rg -n --type=go 'github\.com/crypto-org-chain/cronos/v2' -g '!go.sum'

# Search for any remaining cronos/v2 paths in proto files
echo -e "\n=== Remaining cronos/v2 paths in proto files ==="
rg -n --type=proto 'github\.com/crypto-org-chain/cronos/v2'

Length of output: 305


🏁 Script executed:

#!/bin/bash
echo "=== Latest 10 version tags ==="
git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags | head -10

echo -e "\n=== cronos/v2 imports in Go files ==="
rg -n 'github\.com/crypto-org-chain/cronos/v2' -g '*.go' || echo "No matches in Go files"

echo -e "\n=== cronos/v2 imports in proto files ==="
rg -n 'github\.com/crypto-org-chain/cronos/v2' -g '*.proto' || echo "No matches in proto files"

echo -e "\n=== cronos/v2 in go.mod ==="
grep -n 'cronos/v2' go.mod || echo "No matches in go.mod"

Length of output: 210


Critical: missing version tags and migration docs for breaking module path change

  • No existing version tags found; you must create and push a new v1.x.x tag (module path now non-v2).
  • Add a CHANGELOG entry, migration guide (update imports from /v2 to non-v2), and deprecation notice for the old /v2 path.
🤖 Prompt for AI Agents
In go.mod around line 1, the module path change to a non-v2 import lacks
repository version tags and migration documentation; create and push a new
semver tag (e.g., v1.0.0 or appropriate v1.x.x) to the remote, add a CHANGELOG
entry describing the breaking change, add a migration guide that instructs
downstream users to update imports from the old /v2 path to the new non-/v2 path
(with example search/replace patterns and any code changes needed), and add a
clear deprecation notice in the repo README or a DEPRECATION.md referencing the
old /v2 path and pointing to the migration guide and new tag.

@songgaoye
Copy link
Contributor

Does this import breaking changes?

@thomas-nguy
Copy link
Collaborator Author

It only break projects importing cronos repository but afaik only the explorer is using it

Copy link
Contributor

@randy-cro randy-cro left a comment

Choose a reason for hiding this comment

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

lgtm, except the fact that clients importing this will need to know about the breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants