-
-
Notifications
You must be signed in to change notification settings - Fork 198
3.0 Migration Guide
Version 3.0 is a major breaking release that fundamentally changes how Periphery scans source files. In prior versions, targets need to be explicitly chosen with the -—targets
option, whereas in version 3.0, Periphery will scan all source files referenced in the index store (excluding some reasonable defaults). This is a beneficial change for the following reasons:
- You no longer need to specify which targets to scan, which was cumbersome, especially for very large projects.
- It avoids false positive results in cases where a target was accidentally omitted.
- Code generated by Xcode or Swift packages that could not be specified by a target is now scanned automatically.
The --targets
option has been removed, and you should now use the various options for excluding files. See Excluding Files in the README for more details.
The --workspace
option has been removed. The --project
option should now be used for both .xcworkspace
and .xcodeproj
.
Periphery is now included in the official Homebrew repository, and the peripheryapp/periphery
tap is no longer updated. To migrate run the following:
brew remove periphery
brew untap peripheryapp/periphery
brew update
brew install periphery
Periphery now supports Bazel projects directly, and the -—file-targets-path
option is no longer needed. Instead, add the following to your MODULE.bazel
file:
bazel_dep(name = "periphery", version = "<version>", dev_dependency = True)
use_repo(use_extension("@periphery//bazel:generated.bzl", "generated"), "periphery_generated")
and use the --bazel
option when performing the scan:
bazel run @periphery -- scan --bazel
See the README for more details.
The —-file-targets-path
option has been replaced with -—generic-project-config
. See Build Systems in the README for more details.