Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying the default configuration (and possibly target) for generate #6248

Closed
freak4pc opened this issue May 3, 2024 · 2 comments
Closed
Labels
type:need/problem Report needs or problems you came across that are not bugs

Comments

@freak4pc
Copy link
Sponsor Contributor

freak4pc commented May 3, 2024

What problem or need do you have?

When using Tuist Cloud, and specifically binary cache, the cache is sensitive to the specific configuration your app/tests/etc are using. This is a very subtle detail which can make your cache entirely not work, silently, and it is quite hard to catch it happening.

tuist cache and tuist generate by default use the Debug configuration to my understanding, which means that if you locally build with a custom configuration, running tuist generate MyApp will try to grab the cache of the wrong configuration - but you will never know that's the case :)

You need to specifically do tuist cache -c myConfig , tuist generate -c myConfig MyApp - if you know that's an issue.

I think this isn't an issue only from the configuration perspective, but also practically from the perspective a developer most likely doesn't know this minor detail.

Potential solution

At the bare minimum some way to specify a default configuration for these commands (in Config.swift). Not sure if this should apply to the general config or to the cloud one, since I'm unsure if it's even needed outside of cloud.

I'm leaning towards adding it to the cloud config but also make it required to specify so this situation doesn't occur by default, and also developers are more aware of the fact thinking about per-configuration caching is required (maybe a documentation update could also be relevant).

macOS version

14.4.1

Tuist version

4.11

Xcode version

15.3

@freak4pc freak4pc added the type:need/problem Report needs or problems you came across that are not bugs label May 3, 2024
@freak4pc
Copy link
Sponsor Contributor Author

freak4pc commented May 3, 2024

PS - this is a "nice to have" but it could also be nice to allow to (optionally) specify the default target.

For most companies this will be the main app, so they can write tuist generate and get tuist generate MyAwesomeApp by default, which helps for this "happy path", quite a lot.

@fortmarek
Copy link
Member

For most companies this will be the main app, so they can write tuist generate and get tuist generate MyAwesomeApp by default, which helps for this "happy path", quite a lot.

This doesn't make that much sense for local workflows where generating just the App target is not that useful. Adding a default app for CI workflows only does not bring a lot of value since that's specified once in your CI pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:need/problem Report needs or problems you came across that are not bugs
Projects
None yet
Development

No branches or pull requests

3 participants