Skip to content

migrate kanta to nebulex v3 - #140

Open
cwllwch wants to merge 1 commit into
curiosum-dev:mainfrom
supanova-io:bump-nebulex-to-v3
Open

migrate kanta to nebulex v3#140
cwllwch wants to merge 1 commit into
curiosum-dev:mainfrom
supanova-io:bump-nebulex-to-v3

Conversation

@cwllwch

@cwllwch cwllwch commented Jul 8, 2026

Copy link
Copy Markdown

Bump Nebulex to v3

Description

We wanted to use a new adapter that Nebulex 3.0 introduces due to the needs of our app, so this was necessary. Making this PR here in case you also find it relevant to bump the version.

This follows instructions from Nebulex's guide: https://nebulex.hexdocs.pm/v3-0.html

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test improvements
  • CI/CD improvements

Related Issues

None. Would you like me to open one first?

Changes Made

  • add nebulex 3.0 and its requirements
  • update call sites to conform with new way of calling nebulex
  • add telemetry as an explicit dep, as required as well - this was already transiently brought in and is a very common dep anyway.

Testing

automated and basic manual tests

Test Environment

  • Elixir version: 1.19.5
  • OTP version: 28
  • Phoenix version: 1.8.1 (Phoenix LiveView 1.1.14)
  • Database: PostgreSQL 18.4
  • Gettext version: 1.0.0 (standard hex package, no custom fork; expo 1.1.0)

Test Cases

  • All existing tests pass
  • New tests added for new functionality at appropriate levels
  • Manual testing performed

Test Commands Run

mix test
mix compile --warnings-as-errors
MIX_ENV=test mix credo
mix dialyzer

Documentation

  • Updated README.md (if applicable)
  • Updated documentation comments (with examples for new features)
  • Updated CHANGELOG.md (if applicable)

Code Quality

  • Code follows the existing style conventions
  • Self-review of the code has been performed
  • Code has been commented, particularly in hard-to-understand areas
  • No new linting warnings introduced
  • No new Dialyzer warnings introduced

Backward Compatibility

  • This change is backward compatible
  • This change includes breaking changes (please describe below)
  • Migration guide provided for breaking changes

Breaking Changes

Host applications that also depend on nebulex ~> 2.x will get a dependency conflict and must upgrade to Nebulex 3.x. Nebulex v3 split its adapters into separate packages, so nebulex_local and nebulex_distributed are new direct dependencies. Kanta's own behavior is unchanged — call sites use the ! variants, which keep v2 semantics. Migration for most users is just updating deps.

Performance Impact

  • No performance impact
  • Performance improvement
  • Potential performance regression (please describe)

Performance Notes

Performance shouldn't be affected as the app's behavior is mantained.

Translation Management Impact

  • No impact on existing translations
  • Affects translation extraction process
  • Affects translation storage/retrieval
  • Affects Kanta UI/dashboard
  • Affects plugin system
  • Database schema changes

Translation Impact Notes

While this touches on the cache layer, it should not affect how the program behaves.

Security Considerations

  • No security impact
  • Security improvement
  • Potential security impact (please describe)

Additional Notes

Screenshots/Examples

In all call sites, all you need to do is add a ! after the normal call. So instead of

Cache.get(key)

you'd do a

Cache.get!(key)

There is also a slight difference in how you do opts, also done according to the migration guide.

Checklist

  • I have read the Contributing Guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Reviewer Notes

Thanks for your time! 😄

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant