Xcodegen: Exclude files syntax (or possible bug?)

Created on 30 Jul 2018  路  5Comments  路  Source: yonaskolb/XcodeGen

Hi there,

Apologies in advance if this is not the right place for asking these questions (feel free to tell me off :) ) but I haven't been able to exclude source files from a generated project

I created a very simple example that reproduces the issue and attached here.

TestProject.zip

Here's my project.yml inlined in case you spot any obvious mistakes:

name: TestProjectGenerated
targets:
  TestProject:
    type: application
    platform: iOS
    sources:
      - path: TestProject
        excludes:
          - "TestProject/Excluded/**"

I also tried a few different variations of the excludes string, even a simple wildcard, but they all seem to be ignored.

Thanks!
Rog

Most helpful comment

Hi @rpassis, you can absolutely ask questions here.

Yes, it鈥檚 relative to the source path. But also at the moment the exclude don鈥檛 support glob patterns with double wildcards, only 1. We are using PathKit鈥檚 implementation, so we鈥檒l need to write one by hand to support that.
Would be a good task for someone to pickup

All 5 comments

Ok I figured out I'm an idiot. The excludes path is relative to the sources path.

Closing this as it is not an issue.

Closing this as it is not an issue.

Hi @rpassis, you can absolutely ask questions here.

Yes, it鈥檚 relative to the source path. But also at the moment the exclude don鈥檛 support glob patterns with double wildcards, only 1. We are using PathKit鈥檚 implementation, so we鈥檒l need to write one by hand to support that.
Would be a good task for someone to pickup

I want to exclude {*.m} except GPBProtocolBuffers.m. Here's my project.yml

name: business
    excludes:
      - ProtoBuffer/Headers/(?<!GPBProtocolBuffers).m
      - ProtoBuffer/Headers/google/protobuf/*.m

- ProtoBuffer/Headers/(?<!GPBProtocolBuffers).mnot work. Pattern (?<!GPBProtocolBuffers).m, only match .m, which not start with GPBProtocolBuffers. Is it the problem. I don't know how to fix.Can you help?

I misunderstand regex pattern.The fixed pattern is ^(?:(?!GPBProtocolBuffers).)*.m$,but not work .If I miss something important?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yonaskolb picture yonaskolb  路  3Comments

thecb4 picture thecb4  路  3Comments

dabaddah picture dabaddah  路  4Comments

ImLaufderZeit picture ImLaufderZeit  路  5Comments

mohammdsss1 picture mohammdsss1  路  6Comments