You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use-case: a tool that wants to run sourcekit or swift on a file in a swiftpm package needs a way to get correct compiler arguments.
Using libSwiftPM's `BuildPlan` today, you can get a `TargetDescription` contains something called `compileArguments()`, but this only provides some of the arguments. The rest of the arguments are produced only by `swift-build-tool`. If you want to build a tool that uses `libSwiftPM` to get arguments, you need to replicate that logic for e.g. turning import paths into `-I` flags, and adding incidental flags like `-parse-as-library`, '-c', setting the mdoule name, etc.
libSwiftPM should provide an API to get the compiler arguments of a file/target
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 4876f7f49e77b266871bc2b16fda82f3
Issue Description:
Use-case: a tool that wants to run sourcekit or swift on a file in a swiftpm package needs a way to get correct compiler arguments.
Using libSwiftPM's `BuildPlan` today, you can get a `TargetDescription` contains something called `compileArguments()`, but this only provides some of the arguments. The rest of the arguments are produced only by `swift-build-tool`. If you want to build a tool that uses `libSwiftPM` to get arguments, you need to replicate that logic for e.g. turning import paths into `-I` flags, and adding incidental flags like `-parse-as-library`, '-c', setting the mdoule name, etc.
libSwiftPM should provide an API to get the compiler arguments of a file/target
The text was updated successfully, but these errors were encountered: