Tuist v2.0.0 Release Notes
-
๐ Changed
- ๐ฅ Breaking made constructors from scheme action models internal and exposed static methods for initializing them instead. For example,
TestAction.init(..)
becomesTestAction.testAction(...)
. #3400 by @pepibumur:- Motivation:: Using static initializers gives us the flexibility to introduce improvements without breaking the API.
- Migration: Update all the action initializers to use the static methods instead. The name of the static method matches the name of the class but starting with a lowercase.
- ๐ฅ Breaking
tuist focus
no longer includes automatically related tests and bundle targets as sources. #3501 by @danyf90.- Motivation: the behavior might cause to include unwanted targets in some scenario
- Migration: if you need to include tests and bundle targets as sources, specify them as arguments of the
tuist focus
command
โ Removed
- ๐ฅ Breaking
.cocoapods
target dependency- Motivation:
.cocoapods
's API led users to believe their integration issues were Tuist's fault. Therefore we decided to remove it and make it an explicit action developers need to run after the generation of Xcode projects through Tuist. - Migration: we recommend wrapping the the generation of projects in a script that runs
pod install
right after generating the project:tuist generate && pod install
. Alternatively, you might consider adopting Swift Package Manager and using our built-in support for package dependencies through theDependencies.swift
manifes tfile.
- Motivation:
- ๐ฅ Breaking Support for deprecated
TuistConfig.swift
has been ended. Define your configuration usingConfig.swift
. Check documentation for details. #3373 by @laxmorek - ๐ฅ Breaking Support for deprecated
Template.swift
has been ended. Define your templates using any name that describes them (name_of_template.swift
). Check documentation for details. #3373 by @laxmorek- Migration: we recommend wrapping the generation of projects in a script that runs
pod install
right after generating the project:tuist generate && pod install
. Alternatively, you might consider adopting Swift Package Manager and using our built-in support for package dependencies through theDependencies.swift
manifest file.
- Migration: we recommend wrapping the generation of projects in a script that runs
- ๐ฅ Breaking simplified
TestAction
's methods for creating an instance. #3375 by @pepibumur:- Motivation: there was some redundancy across all the methods to initialize a
TestAction
. To ease its usage, we've simplified all of them into a single method. It takes the test plans as an array ofPath
s and the configuration as an instance ofPresetBuildConfiguration
. We've also made theinit
constructor internal to have the flexibility to change the signature without introducing breaking changes. - Migration: In those places where you are initializing a
TestAction
, update the code to use either the.testActions
or the.targets
methods.
- Motivation: there was some redundancy across all the methods to initialize a
- ๐ฅ Breaking removed the
tuist doc
command. #3401 by @pepibumur - ๐ฅ Breaking removed
PresetBuildConfiguration
in favour ofConfigurationName
. #3400 by @pepibumur:- Motivation: Making the configuration a type gives the developers the flexibility to provide their list of configurations through extensions. For example,
ConfigurationName.beta
. - Migration: Scheme actions are now initialized passing a
configuration
argument of typeConfigurationName
. Note that it conformsExpressibleByStringLiteral
so you can initialize it with a string literal.
- Motivation: Making the configuration a type gives the developers the flexibility to provide their list of configurations through extensions. For example,
- ๐ฅ Breaking removed the
tuist up
command in favour of a sidecar CLI tool,tuist-up
that can be installed independently.- Motivation: provisioning environments for working with Xcode projects was outside of the scope of the project. Moreover, it added up to our triaging and maintenace work because errors that bubbled up from underlying commands made people think that they were Tuist bugs.
- Migration: as suggested here, turn your
Setup.swift
into aup.toml
and usetuist-up
instead.
- ๐ฅ Breaking Scheme
TestAction
options have been consolidated together under a new typeTestActionOptions
.- Motivation: This makes the API consistent with some of the other Scheme actions as well as how it appears in the Scheme editor.
- Migration: Use
TestAction.targets(options: .options(language:region:codeCoverage:codeCoverageTargets))
TestAction.language
>TestActionOptions.language
TestAction.region
>TestActionOptions.region
TestAction.codeCoverage
>TestActionOptions.codeCoverage
TestAction.codeCoverageTargets
>TestActionOptions.codeCoverageTargets
๐ฅ Breaking removed deprecated
TUIST_*
configuration variables. #3493 by @danyf90.- Motivation:: They have been replaced by the corresponding
TUIST_CONFIG_*
variables instead. - Migration: Use the corresponding
TUIST_CONFIG_*
variables instead.
- Motivation:: They have been replaced by the corresponding
๐ฅ Breaking
Settings
is now publicly initialized via a new static method.settings()
.- Motivation: Using static initializers gives us the flexibility to introduce improvements without breaking the API.
- Migration: Replace
settings: Settings(base: ["setting": "value"])
withsettings: .settings(base: ["setting": "value"])
๐ฅ Breaking
CustomConfiguration
has been merged withConfiguration
.- Motivation: Simplify the API and reduce confusion between
Configuration
andCustomConfiguration
. - Migration: Replace
let configurations: [CustomConfiguration] = [ ... ]
withlet configurations: [Configuration] = [ ... ]
.
- Motivation: Simplify the API and reduce confusion between
๐ฅ Breaking Specifying custom build settings files for default configurations via
Settings(base:debug:release:)
has changed.- Motivation: To support the
CustomConfiguration
API simplification. - Migration: Replace
let settings = Settings( debug: Configuration(settings: ["setting": "debug"]), release: Configuration(settings: ["setting": "release"]) )
with:
let settings: Settings = .settings( debug: ["setting": "debug"], release: ["setting": "release"] )
- Motivation: To support the
๐ฅ Breaking Specifying xcconfig files for default configurations via
Settings(base:debug:release:)
has changed.- Motivation: To support the
CustomConfiguration
API simplification. - Migration: Replace
let settings = Settings( debug: Configuration(xcconfig: "configs/debug.xcconfig"), release: Configuration(xcconfig: "configs/release.xcconfig") )
with:
let settings: Settings = .settings( configurations: [ .debug(name: .debug, xcconfig: "configs/debug.xcconfig"), .release(name: .release, xcconfig: "configs/release.xcconfig"), ] )
- Motivation: To support the
๐ฅ Breaking Rename target
actions
toscripts
to align with Xcode's terminology #3374 by @pepibumur- Motivation To align with Xcode's terminology used for the build phase counterpart,
scripts
. - Migration Replace
let target = Target(actions: [.post(tool: "/bin/echo", arguments: ["rocks"], name: "tuist")])
with
let target = Target(scripts: [.post(tool: "/bin/echo", arguments: ["rocks"], name: "tuist")])
- Motivation To align with Xcode's terminology used for the build phase counterpart,
- ๐ฅ Breaking made constructors from scheme action models internal and exposed static methods for initializing them instead. For example,