Skip to content

Fix/release please permissions#106

Merged
sameeul merged 11 commits intoPolusAI:masterfrom
sameeul:fix/release-please-permissions
Mar 13, 2026
Merged

Fix/release please permissions#106
sameeul merged 11 commits intoPolusAI:masterfrom
sameeul:fix/release-please-permissions

Conversation

@sameeul
Copy link
Member

@sameeul sameeul commented Mar 13, 2026

No description provided.

sameeul and others added 11 commits March 12, 2026 14:43
BREAKING CHANGE: Version management system changed from versioneer to setuptools-scm.
This enables automated releases via release-please and eliminates manual version updates.

Changes:
- Remove versioneer artifacts (versioneer.py, _version.py, .gitattributes)
- Add modern pyproject.toml configuration with setuptools-scm
- Eliminate src/filepattern/cpp/version.h (not needed - CMake now reads from VERSION file)
- Add automated version sync script (scripts/update_versions.py)
- Add release-please workflow for automated releases
- Update all CI/CD workflows to sync versions before building
- Add CONTRIBUTING.md with conventional commit guidelines
- Add MIGRATION_TO_SETUPTOOLS_SCM.md with detailed migration guide
- Update README.md with new release process

Version file reduction:
- Before: 3 files to update manually (pom.xml, version.h, git tags)
- After: 2 files, auto-synced (VERSION, pom.xml) from git tags

New workflow:
1. Use conventional commits (feat:, fix:, etc.)
2. Push to master
3. release-please creates Release PR with version bump
4. Merge Release PR -> automated release and publishing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add detailed prerequisites installation steps
- Document actual build process matching CI workflows
- Include cibuildwheel usage for wheel building
- Add troubleshooting section for common build issues
- Clarify FILEPATTERN_DEP_DIR usage and local_install directory
- Add platform-specific notes for macOS builds
- Replace Unicode checkmarks with ASCII [OK] for Windows cp1252 compatibility
- Add explicit git tag fetching in all workflows (fetch-tags: true)
- Add git fetch --force --tags step to ensure tags are available
- Improve version detection fallback logic in update_versions.py
- Add support for GITHUB_REF_NAME in publish workflows for release tags
- Handle edge cases where setuptools-scm can't detect version

Fixes:
- UnicodeEncodeError on Windows when running update_versions.py
- setuptools-scm 'not a git repository' errors in CI
- Missing git tags during checkout in workflows
Fixes compilation error on macOS with conda environments where ptrdiff_t
is not resolved. This is required for libc++ on certain macOS SDK versions.

Error: reference to unresolved using declaration for ::ptrdiff_t
The conda-provided libc++ on macOS has compatibility issues with
ptrdiff_t and other standard library types due to _LIBCPP_USING_IF_EXISTS
failing to resolve types from the global namespace.

Changes:
- Include stddef.h (C header) before C++ headers to ensure types are defined
- Add _LIBCPP_DISABLE_AVAILABILITY flag on macOS to disable availability checks
  that can conflict with conda environments

This resolves the 'reference to unresolved using declaration' error for
ptrdiff_t in char_traits.h when building with conda on macOS.

References:
- conda/conda#11196
- llvm/llvm-project#54233
On macOS's case-insensitive filesystem, the VERSION file conflicts with
the C++ standard library header <version> (C++20). When the compiler
tries to #include <version>, it picks up our VERSION file instead,
causing compilation errors.

Solution: Rename VERSION to .version (hidden file with dot prefix)

Updated:
- CMakeLists.txt: Read from .version instead of VERSION
- update_versions.py: Write to .version
- release-please.yml: Upload .version as asset
- release-please-config.json: Track .version in extra-files

This is a known issue on case-insensitive filesystems:
llvm/llvm-project#51214
- Add local_install/ directory
- Add pybind11*/ source directories
- Add *.zip archive files
- Add *.ogv video files
- Add test_*.py test scripts
Remove local build artifacts that were accidentally committed:
- local_install/ directory with pybind11 installation
- pybind11-2.11.1/ source directory
- src/filepattern/cpp/test_build/ CMake build directory
- src/filepattern/libfilepattern.so.* shared libraries
- out.ogv video recording file
- test_fp.py test script
- v2.11.1.zip pybind11 archive

These files are now properly ignored via .gitignore.
The trigger-publish job needs 'actions: write' permission to dispatch
workflows for publish_pypi.yml and publish_maven.yml. This fixes the
'Resource not accessible by integration' error (HTTP 403).
@sameeul sameeul merged commit 290763c into PolusAI:master Mar 13, 2026
27 checks passed
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