swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.72k stars 1.34k forks source link

Ensure package plugin sandbox contents is deterministic #7876

Closed owenv closed 1 month ago

owenv commented 1 month ago

Previously, nondeterministic item replacement directory paths could be included in the sandbox content. This can lead to spurious incremental rebuilds of plugin outputs.

Because itemReplacementDirectories returns a unique temporary directory on each call, I don't believe including it in the sandbox profile had the intended effect, so removing it should not break existing plugins.

owenv commented 1 month ago

@swift-ci please test

owenv commented 1 month ago

@swift-ci please test source compatibility

owenv commented 1 month ago

@swift-ci please test package compatibility

owenv commented 1 month ago

Reworked this a bit so we still include item replacement directories which should remain stable

owenv commented 1 month ago

@swift-ci please test

owenv commented 1 month ago

@swift-ci please test package compatibility

owenv commented 1 month ago

@swift-ci please test Windows platform

owenv commented 1 month ago

@swift-ci please test package compatibility