Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for child configs #1338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jimmya
Copy link
Contributor

@jimmya jimmya commented May 30, 2024

The project I work in uses sourcery and consists of quite a lot packages. Having all these configs in a single .sourcery.yml file is becoming quite hard to manage (350+ lines).

This PR allows for child configs, in order to break configs into smaller sub configs and also directly allow for them to be run independently.

A config with child config would look like this:

configurations:
    - child: ./.child_config.yml
    - child: Subdirectory/.another_child_config.yml

Whereas the child config would be a regular sourcery config file (or have further child configs). The existing config keeps working as is, so you could have a regular config with also child configs in it.

@art-divin
Copy link
Collaborator

art-divin commented May 30, 2024

Thank you very much @jimmya 🤝 Once CI will pass, I will merge this one.

Next release I plan to do in 2-3 weeks or so, quite busy. There is plenty of new bug reports already.

@art-divin
Copy link
Collaborator

hey @jimmya ,

the following test fails on CI:

/Users/runner/work/Sourcery/Sourcery/Tests/SourceryLibTests/ConfigurationSpec.swift:109: error: -[SourceryLibTests.ConfigurationSpec Configuration__given_config_file_with_child_configurations__resolves_each_child_configuration] : failed - expected to equal </Users/runner/work/Sourcery/Sourcery/.build/x86_64-apple-macosx/debug/Sourcery_SourceryLibTests.bundle/Configs//>, got </Users/runner/work/Sourcery/Sourcery/.build/x86_64-apple-macosx/debug/Sourcery_SourceryLibTests.bundle/Configs/Sources>

@art-divin art-divin modified the milestone: 2.2.5 Jun 8, 2024
@art-divin art-divin removed this from the 2.2.5 milestone Jun 22, 2024
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.

None yet

2 participants