Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[swift] Parent hierarchy and properties improvements #1664

Merged
merged 5 commits into from
Feb 27, 2025

Conversation

prabhu
Copy link
Collaborator

@prabhu prabhu commented Feb 27, 2025

With this PR, we use the name from Package.swift for local modules instead of the directory names.

Tested with this multi-module repo that exhibited the issue: https://github.com/elmetal/multi-module-testing-swift

Example: MyPackage is used here instead of MyLib (directory name).

https://github.com/elmetal/multi-module-testing-swift/blob/fe9d96e7a04ed390101e7b92cebc26cfe15f1141/Sources/MyLib/Package.swift#L7

node /Volumes/Work/CycloneDX/cdxgen/bin/cdxgen.js -t swift -o bom.json . -p
Executing 'xcrun swift package show-dependencies --format json' in /Volumes/Work/sandbox/multi-module-testing-swift. Please wait ...
Executing 'xcrun swift package show-dependencies --format json' in /Volumes/Work/sandbox/multi-module-testing-swift/Sources/MyLib2. Please wait ...
Executing 'xcrun swift package show-dependencies --format json' in /Volumes/Work/sandbox/multi-module-testing-swift/Sources/MyLib. Please wait ...
╔══════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                             BOM summary                                              ║
╟──────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                                                                      ║
║ This Software Bill-of-Materials (SBOM) document was created on Thursday, February 27, 2025 with      ║
║ cdxgen. The data was captured during the build lifecycle phase. The document describes an            ║
║ application named 'multi-module-testing-swift'. There are 3 components.                              ║
║                                                                                                      ║
║ ** Generator Tools **                                                                                ║
║ cdxgen (11.1.10)                                                                                     ║
║                                                                                                      ║
║ ** Package Types (1) **                                                                              ║
║ swift                                                                                                ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════╝

╔══════════════════════════════════════════════════╗
║                 Dependency Tree                  ║
║           Generated with ♥  by cdxgen            ║
╟──────────────────────────────────────────────────╢
║ pkg:swift/multi-module-testing-swift@unspecified ║
║ ├── pkg:swift/MyPackage2@unspecified             ║
║ └───└── pkg:swift/MyPackage@unspecified          ║
║ └── pkg:swift/MyPackage@unspecified              ║
╚══════════════════════════════════════════════════╝

╔═══════════════════════════╤═════════════════════════════════════╤═══════════════════════════╤═════════════════╤═══════════════════════════╗
║ Group                     │ Name                                │                   Version │ Scope           │ Tags                      ║
╟───────────────────────────┼─────────────────────────────────────┼───────────────────────────┼─────────────────┼───────────────────────────╢
║                           │ multi-module-testing-swift          │               unspecified │                 │                           ║
╟───────────────────────────┼─────────────────────────────────────┼───────────────────────────┼─────────────────┼───────────────────────────╢
║                           │ MyPackage                           │               unspecified │                 │                           ║
╟───────────────────────────┼─────────────────────────────────────┼───────────────────────────┼─────────────────┼───────────────────────────╢
║                           │ MyPackage2                          │               unspecified │                 │                           ║
╚═══════════════════════════╧═════════════════════════════════════╧═══════════════════════════╧═════════════════╧═══════════════════════════╝
BOM includes 3 components and 3 dependencies

There is also an open question regarding the name value for all swift packages.

Signed-off-by: Prabhu Subramanian <[email protected]>
@prabhu prabhu merged commit 2bc607a into master Feb 27, 2025
31 of 32 checks passed
@prabhu prabhu deleted the feature/swift-troubleshoot branch February 27, 2025 19:45
@prabhu
Copy link
Collaborator Author

prabhu commented Feb 27, 2025

docker arm tests continue to fail with out of space errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant