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

'tuist cache' fails when there are targets without sources #6315

Closed
voidless opened this issue May 22, 2024 · 4 comments
Closed

'tuist cache' fails when there are targets without sources #6315

voidless opened this issue May 22, 2024 · 4 comments
Assignees
Labels
type:need Report needs or problems you came across that are not bugs

Comments

@voidless
Copy link

voidless commented May 22, 2024

What problem or need do you have?

'tuist cache' fails when there are targets without sources that return non zero result

I use .macos targets in my iOS project for supplementary tools (eg: swiftlint, periphery) because tuist doesn't support aggregate targets #3388
So when I run tuist cache it tries to build them too and fails (it also runs very slowly for some of them, and they don't produce a cacheable result)
This forces me to provide a list of all normal iOS targets if I want to cache them all

Potential solution

  1. Introduce --platform param to tuist cache (eg: tuist cache --platform iOS)
  2. Only cache targets that have source code files

macOS version

14.4.1

Tuist version

4.13.0

Xcode version

15.3.0

@voidless voidless added the type:need Report needs or problems you came across that are not bugs label May 22, 2024
@pepicrft
Copy link
Contributor

Hi @voidless 👋🏼
Would you mind including a small project where we can reproduce the issue? We can then use that as a fixture to prevent regressions in the future.

@voidless
Copy link
Author

Sure, here is a minimal project with the issue: https://github.com/voidless/tuist_cache_issue

@pepicrft
Copy link
Contributor

Thanks @voidless. We'll try to prioritize it.

@pepicrft pepicrft self-assigned this Jun 4, 2024
@pepicrft
Copy link
Contributor

pepicrft commented Jun 4, 2024

I slept over this one, and I propose that we tackle this issue over adding the functionality described in this issue because having to have targets with no sources is a solution for a limitation that's becoming a problem on its own (this reminds me of JavaScript 😝). So, I'll close this one to continue discussing that other issue. We won't need something like this once we have support for aggregate targets because cache will only compile targets with sources.

@pepicrft pepicrft closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:need Report needs or problems you came across that are not bugs
Projects
None yet
Development

No branches or pull requests

2 participants