Skip to content

Conversation

@maltoe
Copy link

@maltoe maltoe commented Dec 2, 2025

Description

This patch adds a mandatory actions_module option to Permit.__using__/1, removing the compile-time access to the user-supplied permissions module and thus avoiding the compile-time dependency.

Type of Change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related Issues

Fixes #46

Testing

Test Environment

  • Elixir version: 1.18.2
  • OTP version: 27

Test Cases

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

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 includes breaking changes (please describe below)
  • Migration guide provided for breaking changes

Breaking Changes

This breaks existing setups with custom action modules as the Authorization module will not generate the same set of predicate functions.

Performance Impact

  • No performance impact

Security Considerations

  • No security impact

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

@vincentvanbush
Copy link
Collaborator

Thanks @maltoe, it's a cool little change that's impactful to compilation performance. If you'd like to do any further polishing in the PR, please do. Otherwise, I'll just have it merged in.

@maltoe maltoe marked this pull request as ready for review December 22, 2025 11:46
@maltoe
Copy link
Author

maltoe commented Dec 22, 2025

Added a changelog entry, don't remember what else I wanted to polish 🤷

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.

[Feature]: Remove compile-time dependency on permissions module

2 participants