Skip to content

Conversation

@pepicrft
Copy link
Contributor

As part of debugging this issue, which we couldn't reproduce consistently (e.g., its behavior changes throughout terminal types), @fortmarek and I had the idea of skipping the hashing of external dependencies, since their hash can be obtained from the lock file.
To achieve this, I'm introducing a new attribute, Project.type, which supersedes Project.external. This attribute can then include a hash when declaring a projects external. The hashing logic can then consider this to skip the hashing altogether. Thanks to this, we'll improve our performance.

Note

This doesn't mitigate the issue, but since it always happens with the same external dependency, we won't run into it.

@pepicrft pepicrft requested a review from fortmarek November 14, 2024 14:30
@pepicrft pepicrft self-assigned this Nov 14, 2024
@pepicrft pepicrft changed the title Introduce Project.type (feat) Supersede Project.external with Project.type Nov 14, 2024
)
}

public static func empty(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we a) deprecate it as well b) don't consider test helpers as part of the public interface?

I'd probably deprecate, so we don't cause a breaking change for tuist/tuist

@pepicrft pepicrft changed the title (feat) Supersede Project.external with Project.type [feat] Supersede Project.external with Project.type Nov 14, 2024
Which allows passing a hash for external projects to speed up the hashing of the graph.
@pepicrft pepicrft merged commit 05720c1 into main Nov 14, 2024
@pepicrft pepicrft deleted the project-type branch November 14, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants