Skip to content

Restructure bind-hub folder for clarity (v2.1.1)#33

Merged
AntonioCS merged 1 commit intomainfrom
feature/MD-1-restructure-bind-hub-and-move-mbmodulesmk-to-an-internal-folder
Dec 10, 2025
Merged

Restructure bind-hub folder for clarity (v2.1.1)#33
AntonioCS merged 1 commit intomainfrom
feature/MD-1-restructure-bind-hub-and-move-mbmodulesmk-to-an-internal-folder

Conversation

@AntonioCS
Copy link
Owner

@AntonioCS AntonioCS commented Dec 10, 2025

Summary

  • Simplify file naming: Remove mb_ prefix from user-editable files (config.mk, project.mk)
  • Improve organization: Move auto-generated modules.mk to internal/ subfolder
  • Add deprecation detection: Projects using old structure fail with clear migration instructions

New bind-hub structure

bind-hub/
├── config.mk           (user-editable)
├── config.local.mk     (optional, gitignored)
├── project.mk          (user-editable)
├── project.local.mk    (optional, gitignored)
├── README.md           (auto-generated)
├── internal/           (auto-generated files)
│   └── modules.mk
├── configs/            (created on-demand)
└── modules/            (created on-demand)

Migration for existing projects

Projects using the old structure will see an error with these instructions:

  1. mv bind-hub/mb_config.mk bind-hub/config.mk
  2. mv bind-hub/mb_project.mk bind-hub/project.mk
  3. mkdir -p bind-hub/internal && mv bind-hub/mb_modules.mk bind-hub/internal/modules.mk

Test plan

  • All 37 unit tests pass (80 assertions)
  • Verified deprecation message appears for old structure
  • Verified new projects initialize with correct structure
  • Verified migrated project (compression_api) works correctly

Simplify file naming and improve organization of the bind-hub folder:

- Rename user-editable files (remove mb_ prefix):
  - mb_config.mk → config.mk
  - mb_project.mk → project.mk
  - mb_config.local.mk → config.local.mk
  - mb_project.local.mk → project.local.mk

- Move auto-generated modules file to internal/ subfolder:
  - mb_modules.mk → internal/modules.mk

- Add deprecation detection that fails with migration instructions
  for projects using the old structure

- Update internal variable names for consistency:
  - mb_project_bindhub_modules_file → mb_project_bindhub_internal_modules_file

Files:
- core/deprecation.mk: New file with deprecation checks
- templates/README.bind-hub.md: New README template for bind-hub folders
- templates/config.tpl.mk, project.tpl.mk: Renamed from mb_* versions
- mb_config.mk: Updated variable definitions
- main.mk: Added deprecation check, updated variable refs
- core/init_project.mk: Creates internal/ folder, copies README
- core/modules_manager.mk: Updated to use new variable names
- core/targets.mk: Fixed malformed variable reference
- CHANGELOG.md, CLAUDE.md, README.md: Updated documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AntonioCS AntonioCS merged commit c839ae1 into main Dec 10, 2025
1 check 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