Improve Tuist project declaration #5956
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description π
The schemes setup in the generated project required developers to switch to a scheme to run a particular acceptane test. This is something that I found slightly annoying, so I went ahead and iterated on our schemes list. I disabled the automatic generation of schemes, which is fine for 90% of use cases, but we've reached a point when we need something more custom. Note that I considered the idea of making automated schemes more configurable, but I think it's a bad idea because the configuration interface will end up being complex and we'll start getting request along the lines of "can you also extend automatically-generated schemes to allow me to do X, Y, and Z?".
I've also taken the opportunity to embrace a new pattern where our modules are cases in an
enum
, and we can then useallCases
and attributes to get the list of targets that we are interested in. That leads to a leanerProject.swift
, and also a project that's easier to reason about.How to test the changes locally π§
You should see schemes for the runnable targets (tuist, tuistfixturegenerator, and tuistbenchmark) and a workspace one that contains everything. They should all compile and run tests fine.
Contributor checklist β
mise run lint:fix
Reviewer checklist β
changelog:added
,changelog:fixed
, orchangelog:changed
, and the title is usable as a changelog entry