Structure that is aware of build configuration options
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Is there a way to get code structure that would be aware of build configuration options?
I.e. from code like this:
#if FLAG
class Foo {}
#else
class Bar {}
#endif
I would like to get only Foo class description if -D FLAG is provided in compiler arguments. Or it can be a check for swift version.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing SourceKitten's code-structure handling and how compiler arguments are passed to SourceKit. Define how -D FLAG and Swift-version options should affect the returned structure, using the example as the expected behavior. Done means conditional code produces only the branch enabled by the supplied build configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100