Skip to content

feat(dr): Add cascading includes support to dependency.lic#7293

Merged
MahtraDR merged 2 commits intoelanthia-online:mainfrom
MahtraDR:feat/cascading-includes
Feb 9, 2026
Merged

feat(dr): Add cascading includes support to dependency.lic#7293
MahtraDR merged 2 commits intoelanthia-online:mainfrom
MahtraDR:feat/cascading-includes

Conversation

@MahtraDR
Copy link
Collaborator

@MahtraDR MahtraDR commented Feb 9, 2026

Summary

Add support for cascading includes in YAML configuration files. Include files can now have their own include: property that references other include files, enabling modular and hierarchical configurations.

Version: 2.0.212.1.0

Changes

  • Add resolve_includes_recursively method for depth-first include resolution
  • Modify get_settings to use recursive include resolution
  • Add circular dependency protection via Set-based visited tracking
  • Handle diamond dependencies (shared includes loaded only once)
  • Add debug output for resolved include order
  • Add 18 comprehensive spec tests

Problem

Previously, include: only worked at a single level. If Mahtra-setup.yaml included include-hunting.yaml, that hunting file could NOT itself include other files. Players had to list ALL dependencies in their character file.

Solution

Include files can now nest includes:

# Mahtra-setup.yaml
include:
  - hunting

# include-hunting.yaml
include:
  - combat       # NOW WORKS!
  - survival

# include-combat.yaml
include:
  - weapons      # Also works - any depth supported

Merge Order (Depth-First)

1. base.yaml
2. base-empty.yaml
3. include-weapons.yaml      (deepest dependency)
4. include-combat.yaml       (depends on weapons)
5. include-survival.yaml     (sibling of combat)
6. include-hunting.yaml      (depends on combat, survival)
7. Mahtra-setup.yaml         (character file - always last)

Edge Cases Handled

  • Circular dependencies: a -> b -> a - Uses visited Set, no infinite loops
  • Diamond dependencies: Shared includes loaded only once
  • Missing files: Silently skipped
  • Self-references: Handled gracefully

Backwards Compatibility

Fully backwards compatible - existing configurations work unchanged.

Test Plan

  • 18 new spec tests covering all edge cases
  • All specs pass locally
  • CI passes
  • Manual testing with nested include configurations

🤖 Generated with Claude Code


Important

Adds cascading includes support to YAML configuration files in dependency.lic, with depth-first resolution and circular dependency protection, and introduces 18 new spec tests.

  • Behavior:
    • Adds cascading includes support in YAML configuration files in dependency.lic.
    • New method resolve_includes_recursively for depth-first include resolution.
    • Modifies get_settings to use recursive include resolution.
    • Adds circular dependency protection using Set-based visited tracking.
    • Handles diamond dependencies by loading shared includes only once.
    • Adds debug output for resolved include order.
  • Tests:
    • Adds 18 spec tests in dependency_cascading_includes_spec.rb covering edge cases like circular dependencies, diamond dependencies, missing files, and self-references.
  • Misc:
    • Updates version from 2.0.21 to 2.1.0.

This description was created by Ellipsis for 4c79f71. You can customize this summary. It will automatically update as commits are pushed.

Add support for nested includes in YAML configuration files. Include
files can now have their own `include:` property that references other
include files, enabling modular and hierarchical configurations.

Changes:
- Add `resolve_includes_recursively` method for depth-first resolution
- Modify `get_settings` to use recursive include resolution
- Add circular dependency protection via Set-based visited tracking
- Handle diamond dependencies (shared includes loaded once)
- Add debug output for resolved include order
- Version bump: 2.0.21 -> 2.1.0

Backwards compatible - existing single-level includes work unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 4c79f71 in 9 seconds. Click for details.
  • Reviewed 507 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_Pp9yqzJCiBFkkY1l

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

- Move IncludeResolver class outside RSpec block (Lint/ConstantDefinitionInBlock)
- Fix indentation issues in dependency.lic
- Remove redundant require 'set' (built-in in Ruby 4.0)
- Fix hash alignment and extra spacing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MahtraDR MahtraDR merged commit cef7327 into elanthia-online:main Feb 9, 2026
3 checks passed
@MahtraDR MahtraDR deleted the feat/cascading-includes branch February 9, 2026 20:00
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