Skip to content

Conversation

@longlho
Copy link
Member

@longlho longlho commented Jan 6, 2026

Cleanup and Improve Bazel Module Configuration

TL;DR

Reorganize dependencies, implement a native formatjs_verify_test rule, and improve documentation.

What changed?

  • Reorganized Bazel module dependencies:
    • Properly categorized core vs. development dependencies
    • Added descriptive comments for each dependency
    • Removed unused rules_shell dependency
    • Uncommented the compatibility_level = 0 setting
  • Replaced the shell-based formatjs_verify_test macro with a native Bazel rule implementation:
    • Removed dependency on rules_shell
    • Improved error handling and test output
    • Enhanced documentation with better examples
  • Added links to FormatJS CLI documentation in all rule docstrings
  • Cleaned up test comments and improved readability in example code

How to test?

  1. Run the example tests to verify the new formatjs_verify_test rule works correctly:
    bazel test //examples/simple/tests_verify/...
    
  2. Verify that the module loads correctly without the removed dependencies:
    bazel build //...
    

Why make this change?

  • Improved maintainability: Native rule implementation is more robust than shell scripts
  • Better developer experience: Enhanced documentation and clearer dependency structure
  • Reduced dependencies: Removing rules_shell simplifies the dependency graph
  • Consistency: Better organization of the module structure follows Bazel best practices

@longlho longlho marked this pull request as ready for review January 6, 2026 14:59
Copy link
Member Author

longlho commented Jan 6, 2026

@longlho longlho changed the base branch from 01-06-feat_allow_aggregate_to_output_to_specific_file to graphite-base/23 January 6, 2026 15:00
@longlho longlho force-pushed the 01-06-fix_remove_rules_shell_dep branch from a1c5c9f to a31c4c8 Compare January 6, 2026 15:00
@longlho longlho force-pushed the 01-06-fix_remove_rules_shell_dep branch from a31c4c8 to 0060039 Compare January 6, 2026 15:01
@graphite-app graphite-app bot changed the base branch from graphite-base/23 to main January 6, 2026 15:01
@longlho longlho force-pushed the 01-06-fix_remove_rules_shell_dep branch from 0060039 to 8fe1051 Compare January 6, 2026 15:01
@longlho longlho merged commit 3a2c0c0 into main Jan 6, 2026
9 checks passed
Copy link
Member Author

longlho commented Jan 6, 2026

Merge activity

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