|
| 1 | +# Migration: From Clang Tools Binaries to Python Wheels |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Starting from version **v1.0.0**, `cpp-linter-hooks` has migrated from using the `clang-tools` package to using Python wheel packages for `clang-format` and `clang-tidy`. This change provides: |
| 6 | + |
| 7 | +- **Better cross-platform compatibility** |
| 8 | +- **Easier installation and dependency management** |
| 9 | +- **Improved performance and reliability** |
| 10 | + |
| 11 | +## What Changed |
| 12 | + |
| 13 | +### Core Changes |
| 14 | + |
| 15 | +| Aspect | Before (< v1.0.0) | After (≥ v1.0.0) | |
| 16 | +|--------|-------------------|-------------------| |
| 17 | +| **Installation** | Install from GitHub release | Install with from PyPI | |
| 18 | +| **Distribution** | Binary packages | Python wheel packages | |
| 19 | +| **Performance** | Run serially | Run in parallel | |
| 20 | + |
| 21 | +### Implementation Details |
| 22 | + |
| 23 | +- **Dependencies**: Updated to use separate `clang-format==20.1.7` and `clang-tidy==20.1.0` Python wheels |
| 24 | +- **Installation Logic**: Enhanced with pip-based installation and runtime version checks |
| 25 | +- **Performance**: Pre-commit hooks can now run in parallel for better speed |
| 26 | + |
| 27 | +## Breaking Changes |
| 28 | + |
| 29 | +**No breaking changes for end users** |
| 30 | + |
| 31 | +- Your existing `.pre-commit-config.yaml` files will continue to work without modification |
| 32 | +- All hook configurations remain backward compatible |
| 33 | +- No changes required to your workflow |
| 34 | + |
| 35 | +## Migration Steps |
| 36 | + |
| 37 | +**No action required!** Your existing configuration will continue to work seamlessly. |
| 38 | + |
| 39 | +However, we recommend updating to the latest version for: |
| 40 | +- Better performance |
| 41 | +- Enhanced reliability |
| 42 | +- Latest features and bug fixes |
| 43 | + |
| 44 | +## Support |
| 45 | + |
| 46 | +If you encounter issues after migration: |
| 47 | + |
| 48 | +1. **Check this guide**: Review the troubleshooting section above |
| 49 | +2. **Search existing issues**: [GitHub Issues](https://github.com/cpp-linter/cpp-linter-hooks/issues) |
| 50 | +3. **Report new issues**: Include the following information: |
| 51 | + - Operating system and version |
| 52 | + - Python version |
| 53 | + - `cpp-linter-hooks` version |
| 54 | + - Complete error message/stack trace |
| 55 | + - Your `.pre-commit-config.yaml` configuration |
| 56 | + |
| 57 | +## References |
| 58 | + |
| 59 | +### Official Packages |
| 60 | +- [clang-format Python wheel](https://pypi.org/project/clang-format/) - PyPI package |
| 61 | +- [clang-tidy Python wheel](https://pypi.org/project/clang-tidy/) - PyPI package |
| 62 | + |
| 63 | +### Source Repositories |
| 64 | +- [clang-format wheel source](https://github.com/ssciwr/clang-format-wheel) - GitHub repository |
| 65 | +- [clang-tidy wheel source](https://github.com/ssciwr/clang-tidy-wheel) - GitHub repository |
| 66 | + |
| 67 | +### Documentation |
| 68 | +- [cpp-linter-hooks Documentation](https://github.com/cpp-linter/cpp-linter-hooks) - Main repository |
| 69 | +- [Pre-commit Framework](https://pre-commit.com/) - Pre-commit documentation |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +**Happy linting!** |
0 commit comments