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

Support sources glob patterns #631

Closed
PaulTaykalo opened this issue Aug 21, 2019 · 2 comments · Fixed by bclymer/XcodeGen#1 or #644
Closed

Support sources glob patterns #631

PaulTaykalo opened this issue Aug 21, 2019 · 2 comments · Fixed by bclymer/XcodeGen#1 or #644

Comments

@PaulTaykalo
Copy link
Contributor

PaulTaykalo commented Aug 21, 2019

Issue

Currently, when we're adding sources, we're doing this in the way we get all files inside source and then exclude files, we don't want them to be there

 sources: 
      - path: "MyProject/Sources"
        createIntermediateGroups: true
        excludes:      
          - "*/*Tests.*"

In development often it is nice to have Tests files right near files being tested

SomeFile.swift
SomeFileTests.swift

This will allow Xcode to jump between related sources as well

While we can easily exclude Test files from the original target, we cannot create test target which will include all files passing glob pattern

Suggestion

to have an option that will allow only to include files, passing glob pattern

 sources: 
      - path: "MyProject/Sources"
        createIntermediateGroups: true
        includes-only:      
          - "*/*Tests.*"

Impact on existing realisization

  • Since this is an optional value, no projects will be affected
  • undefined behaviour if include and exclude will be defined at the same time

P.S. This could be potentially done by using negation of excludes, but it seems that glob that is used in xxodegen doesn't like negation match

@bclymer
Copy link
Collaborator

bclymer commented Aug 28, 2019

PR up for this here - bclymer#1

I will put a PR up against this repo once my previous PR is merged #636. This includes PR is dependent on that work.

@yonaskolb
Copy link
Owner

#636 has been merged. Excited for your includes PR @bclymer 😄👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants