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

Show project dependencies hierarchically #1339

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

plemarquand
Copy link
Contributor

Currently the Package Dependencies view lists all dependencies in a flat list. This list not only includes those explicitly defined in the project's Package.swift, but also all the dependencies of dependencies.

As such its difficult to tell at a glance how a dependency is included. It can also be confusing to see dependencies in the list that you did not explicitly add.

Instead, show a top level list that is only the dependencies explicitly defined in Package.swift. Expanding one shows any child dependencies of the dependency. The files in the dependency's folder are still shown as well, just after any child deps.

@plemarquand plemarquand force-pushed the nested-project-deps-panel branch 2 times, most recently from f9979d5 to 81c2809 Compare January 27, 2025 21:05
Currently the Package Dependencies view lists all dependencies in a flat
list. This list not only includes those explicitly defined in the
project's Package.swift, but also all the dependencies of dependencies.

As such its difficult to tell at a glance how a dependency is included.
It can also be confusing to see dependencies in the list that you did
not explicitly add.

Instead, show a top level list that is only the dependencies explicitly
defined in Package.swift. Expanding one shows any child dependencies of
the dependency. The files in the dependency's folder are still shown as
well, just after any child deps.
@plemarquand plemarquand force-pushed the nested-project-deps-panel branch from 81c2809 to 7918d27 Compare January 28, 2025 15:44
@plemarquand
Copy link
Contributor Author

Screenshot 2025-01-27 at 3 40 23 PM

@plemarquand plemarquand marked this pull request as ready for review January 28, 2025 15:53
Copy link
Contributor

@award999 award999 left a comment

Choose a reason for hiding this comment

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

looks good, some suggestions

@adam-fowler
Copy link
Contributor

Is it worthwhile having a toggle to switch between displaying a flat or hierarchical view?

@plemarquand
Copy link
Contributor Author

@adam-fowler I've added a toggle button to switch between flat and nested to the panel (defaults to nested)

@adam-fowler
Copy link
Contributor

@adam-fowler I've added a toggle button to switch between flat and nested to the panel (defaults to nested)

That's great. I can see uses for both views

@plemarquand plemarquand merged commit 4fa67ac into swiftlang:main Feb 12, 2025
15 checks passed
@plemarquand plemarquand deleted the nested-project-deps-panel branch February 12, 2025 15:25
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.

4 participants