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

refactor(features): remove fs and vault feature gates #2592

Closed
wants to merge 1 commit into from

Conversation

dirvine
Copy link
Member

@dirvine dirvine commented Jan 2, 2025

Remove Feature Gates for File System and Vault Operations

Overview

This PR removes the feature gates for fs and vault functionality, making these core operations available by default in the codebase. This change simplifies the dependency structure and ensures consistent availability of file system and vault operations across all builds.

Changes

  • Removed fs and vault feature flags from Cargo.toml files
  • Added tokio/fs as a direct dependency to ensure file system operations are always available
  • Removed conditional compilation directives (#[cfg(feature = ...)]) from:
    • Client module declarations
    • File system operations
    • Vault-related functionality
    • Associated test files

Motivation

Previously, file system and vault operations were gated behind optional features, requiring explicit feature activation during builds. This led to:

  1. Increased complexity in dependency management
  2. Potential confusion when certain functionality wasn't available
  3. Additional overhead in testing and deployment configurations

By making these core features available by default, we:

  • Simplify the build process
  • Ensure consistent behavior across all deployments
  • Reduce the cognitive overhead of managing feature flags
  • Make the codebase more maintainable and easier to understand

Testing

  • All existing tests have been updated to run without feature flags
  • Test coverage remains unchanged, but tests are now simpler without conditional compilation
  • Verified that all file system and vault operations work correctly in the default build

Impact

Breaking Changes

  • Projects explicitly enabling fs or vault features will need to remove these feature flags
  • No functional changes, but build configurations may need updates

Performance

  • No significant impact on binary size or runtime performance
  • Slight improvement in compile times due to reduced conditional compilation

Related Issues

none

Future Work

  • Consider similar simplification for other feature-gated functionality
  • Review and potentially consolidate remaining feature flags

Checklist

  • Updated relevant documentation
  • All tests passing
  • No new warnings introduced
  • Verified functionality without feature flags

- Remove fs and vault feature gates to include functionality by default

- Update Cargo.toml to include tokio/fs as direct dependency

- Remove conditional compilation in client modules and tests

- Ensure all filesystem and vault operations are always available
Copy link
Member

@grumbach grumbach left a comment

Choose a reason for hiding this comment

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

LGTM!

@grumbach grumbach enabled auto-merge January 3, 2025 13:48
@dirvine dirvine closed this Jan 3, 2025
auto-merge was automatically disabled January 3, 2025 13:51

Pull request was closed

@dirvine dirvine deleted the fs_flags branch January 3, 2025 13:51
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.

2 participants