Skip to content

Conversation

@neonichu
Copy link
Collaborator

  • Extend BuildDependencyInfo with module/header dependencies
  • Extend ValidateDependenciesTaskAction to dump per target dependency information in the new format
  • The new behavior is opt-in behind a DUMP_DEPENDENCIES build setting

@neonichu
Copy link
Collaborator Author

@swift-ci please test

Copy link
Contributor

@bob-wilson bob-wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to compare the dependency info format changes here. When the new setting is not enabled, will this produce the same output format as before?

@neonichu
Copy link
Collaborator Author

When the new setting is not enabled, will this produce the same output format as before?

This adds a new key dependencies as a peer to the existing inputs one, but doesn't change the format of any existing keys otherwise. Versioning is probably a good idea either way, but my guess is that extra keys are typically ignored by parsers, so this change should be forward compatible.

I don't have a clear idea how the format should look like yet, so I was thinking to make additive changes like this at first and once we have a clearer picture, we could try to consolidate the existing structure if needed.

@neonichu neonichu force-pushed the bbuegling/dump-deps-during-build branch from 659e5f5 to 8bc0ce1 Compare November 3, 2025 22:44
@neonichu
Copy link
Collaborator Author

neonichu commented Nov 3, 2025

@swift-ci please test

- Extend `BuildDependencyInfo` with module/header dependencies
- Extend `ValidateDependenciesTaskAction` to dump per target dependency information in the new format
- The new behavior is opt-in behind a `DUMP_DEPENDENCIES` build setting
@neonichu neonichu force-pushed the bbuegling/dump-deps-during-build branch from 8bc0ce1 to f594124 Compare November 3, 2025 22:48
@neonichu
Copy link
Collaborator Author

neonichu commented Nov 3, 2025

@swift-ci please test

@neonichu
Copy link
Collaborator Author

neonichu commented Nov 3, 2025

Versioning is probably a good idea either way

Actually, we won't need a version here, yet, since we don't serialize any dependencies as part of the existing command. The new format is only utilized for the output generated during the build.

@neonichu neonichu merged commit de01002 into swiftlang:main Nov 5, 2025
50 of 51 checks passed
@neonichu neonichu deleted the bbuegling/dump-deps-during-build branch November 5, 2025 18:57
neonichu added a commit to neonichu/swift-build that referenced this pull request Nov 7, 2025
Since swiftlang#874, we are dumping per-target dependency information, this adds a new task which merges these for a given build request. The task is only created if there's at least one target in the graph that will dump dependency information, so should be a no-op for all builds right now.

Additionally, this declares the dependency info file as an output of `ValidateDependencies` which I neglected to do in my earlier PR.
neonichu added a commit to neonichu/swift-build that referenced this pull request Nov 7, 2025
Since swiftlang#874, we are dumping per-target dependency information, this adds a new task which merges these for a given build request. The task is only created if there's at least one target in the graph that will dump dependency information, so should be a no-op for all builds right now.

Additionally, this declares the dependency info file as an output of `ValidateDependencies` which I neglected to do in my earlier PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants