jpsim / jpsim/SourceKitten

Structure that is aware of build configuration options

Open
#482 1 comment 0 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.