yonaskolb / yonaskolb/XcodeGen

How to have a build settings defined in "base", while customising it further in "config/Release"?

Open
#1,371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

Hi 👋

I have the following spec:

...
settings:
  base:
    OTHER_SWIFT_FLAGS:
      - -Xfrontend
      - -warn-long-expression-type-checking=500
      - -Xfrontend
      - -warn-long-function-bodies=1000

  configs:
    Release:
      OTHER_SWIFT_FLAGS:
        - -Xfrontend 
        - -internalize-at-link
...

The intended behaviour is that:

  • For all configurations, OTHER_SWIFT_FLAGS has a value of -Xfrontend -warn-long-expression-type-checking=500 -Xfrontend -warn-long-function-bodies=1000
  • For release configuration, OTHER_SWIFT_FLAGS has a value of -Xfrontend -warn-long-expression-type-checking=500 -Xfrontend -warn-long-function-bodies=1000 -Xfrontend -internalize-at-link

The reality (which is somewhat expected) is that:

  • For all configurations, OTHER_SWIFT_FLAGS has a value of -Xfrontend -warn-long-expression-type-checking=500 -Xfrontend -warn-long-function-bodies=1000
  • For release configuration, OTHER_SWIFT_FLAGS has a value of -Xfrontend -internalize-at-link

Is there any way to achieve the intended behaviour?

Thanks! 🙏

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides no repository file or test path. Start by tracing how the YAML settings.base and configs.Release values are parsed and merged, then verify the behavior with a minimal spec; done means Release retains base OTHER_SWIFT_FLAGS and appends its own flags while other configurations remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift, yaml
Domain
build-system, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.