tuist icon indicating copy to clipboard operation
tuist copied to clipboard

`tuist inspect implicit-imports` crashing in tuist 4.45.1

Open shahzadmajeed opened this issue 1 year ago • 5 comments

What happened?

I have a swift package being referenced locally in a Tuist project. The swift package itself is very complex project so I wanted to add a dependency check as a lint rule. I am seeing tuist inspect implicit-imports crashing in tuist 4.45.1

How do we reproduce it?

  1. Run

Error log

_NIOFileSystem/SystemFileHandle.swift:131: Fatal error: Leaking file descriptor: the handle for '/MyApp/Sources/Views/PickerOption.swift' MUST be closed or detached with 'close()' or 'detachUnsafeFileDescriptor()' before the final reference to the handle is dropped.
[1]    79768 trace trap  tuist inspect implicit-imports

macOS version

15.3.1

Tuist version

4.45.1

Xcode version

16.2

shahzadmajeed avatar Apr 02 '25 15:04 shahzadmajeed

I found a similar closed issue related to tuist inspect implicit-imports crashing due to a large number of files: Bug: tuist inspect implicit-imports failed for projects with huge count of files. This issue was resolved by a pull request titled Fix inspect implicit imports in large projects on February 17, 2025 [1].

The error message you are encountering suggests a file descriptor leak, which might be related to how file handles are managed in the code. It could be beneficial to check if there have been any updates or patches after version 4.45.1 that address file descriptor management issues. If the problem persists, reviewing the changes made in the pull request mentioned above might provide insights into a potential solution.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Apr 02 '25 15:04 dosubot[bot]

Hey @shahzadmajeed 👋

Would it be possible to add a reproducible sample?

fortmarek avatar Apr 03 '25 07:04 fortmarek

hi @shahzadmajeed, were you able to fix this issue? I have the same problem in my project

Gaziav avatar Apr 28 '25 09:04 Gaziav

We also seem to have this issue. We don't have a reproducible sample though unfortunately, it mainly seems to happen in the CI

alexjameslittle avatar May 02 '25 15:05 alexjameslittle

It seems like this perhaps happens during indexing of the xcode project, it happens immediately after tuist clean & regenerate. It also happens reliably every time in a fresh environment in the CI

alexjameslittle avatar May 06 '25 12:05 alexjameslittle