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

[PackageGraph] Allow package-level cyclic dependency only for >= 6.0 … #7579

Merged

Conversation

xedin
Copy link
Member

@xedin xedin commented May 18, 2024

…manifests

Motivation:

Follow-up to #7530

Otherwise it might be suprising for package authors to discover that their packages cannot be used with older tools because they inadvertently introduced a cyclic dependency in a new version.

Modifications:

ModulesGraph.load has been adjusted to run findCycle some of the root manifests support tools version that is older than 6.0. New diagnostic was added to help guide package authors to update their versions if they have cyclic package-level dependencies.

Result:

Attempts to introduce cyclic package-level dependencies to manifests that support tools-versions less than 6.0 would result in a failure.

@xedin
Copy link
Member Author

xedin commented May 18, 2024

@swift-ci please test

…manifests

Follow-up to apple#7530

Otherwise it might be suprising for package authors to discover that
their packages cannot be used with older tools because they inadvertently
introduced a cyclic dependency in a new version.
@xedin xedin force-pushed the gate-cycle-dependencies-feature-on-6.0-tools branch from 8f966c4 to 3098b2d Compare May 20, 2024 04:17
@xedin
Copy link
Member Author

xedin commented May 20, 2024

@swift-ci please test

@xedin
Copy link
Member Author

xedin commented May 20, 2024

@swift-ci please test Windows platform

@xedin xedin merged commit c9186a5 into apple:main May 22, 2024
5 checks passed
xedin added a commit that referenced this pull request Jun 1, 2024
… 6.0 … (#7617)

…manifests

- Explanation:

Follow-up to #7530

Otherwise it might be surprising for package authors to discover that
their packages cannot be used with older tools because they
inadvertently introduced a cyclic dependency in a new version.

- Scope: dependency resolution.

- Main Branch PR:
#7579

- Resolves: rdar://126217172

- Risk: Low

- Reviewed By: @bnbarham      

- Testing: New tests added to the test suite.

(cherry picked from commit 3098b2d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants