Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
applies pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
meghfossa committed Sep 9, 2021
1 parent 122c5c1 commit 6ad6418
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/strategies/ios/swift.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Find all swift manifest files, named: `Package.swift`

## Limitation

- Path dependencies are ignored in the analyses (e.g. `package(path: "./../local-pkg")`)
- Path dependencies are ignored in the analysis (e.g. `package(path: "./../local-pkg")`)

## Example

Expand Down Expand Up @@ -45,17 +45,17 @@ let package = Package(
)
```

When analyses is performed (e.g. `fossa analyze -o`), we will identify following as direct dependencies:
When analysis is performed (e.g. `fossa analyze -o`), we will identify following as direct dependencies:
- https://github.com/apple/example-package-fisheryates.git
- https://github.com/apple/example-package-playingcard.git

## F.A.Q

### How do I *only perform analysis* for swift package dependencies?

You can explicitly specify analyses target in `.fossa.yml` file.
You can explicitly specify analysis an target in `.fossa.yml` file.

Example below, will exclude all analyses targets except swift.
Example below, will exclude all analysis targets except swift.

```yaml
# .fossa.yml
Expand Down
4 changes: 4 additions & 0 deletions src/Strategy/Swift/PackageSwift.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ data SwiftPackageGitDep = SwiftPackageGitDep
}
deriving (Show, Eq, Ord)

-- | Represents https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageDescription.md#methods-3.
data SwiftPackageGitDepRequirement
= Branch Text
| Revision Text
Expand All @@ -109,6 +110,9 @@ data SwiftPackageGitDepRequirement
| RhsHalfOpenInterval (Text, Text)
deriving (Show, Eq, Ord)

-- Note: Swift fetcher is able to resolve, >=, <, <=, ^, ~ operators.
-- TODO: Leverage `VerConstraint` (CAnd, etc.)
-- TODO: Modify Srclib.Converter.verConstraintToRevision to transform constraint for fetcher
toConstraint :: SwiftPackageGitDepRequirement -> VerConstraint
toConstraint (Branch b) = CEq b
toConstraint (Revision r) = CEq r
Expand Down

0 comments on commit 6ad6418

Please sign in to comment.