Skip to content

Re-add support for revision hash or local/editing keyword as dependency description #1667

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

Merged
merged 4 commits into from
Jul 2, 2025

Conversation

wcrd
Copy link
Contributor

@wcrd wcrd commented Jun 29, 2025

Description

Issue: #1666

This MR makes a small change to how the description property of the dependency vscode.TreeItem gets determined.

  • For dependencies using a specific revision it will show the partial commit hash as the description
  • For dependencies that are paths to a local pacakge is will show the local keyword
  • For dependencies that are edited local versions of a dependency it will show the editing keyword

This is not 'new' functionality - v2.0.2 and earlier of this extension had this functionality.

Screenshot 2025-06-29 at 2 52 08 PM

Code Changes

  • Updated the ResolvedDependency interface to additionally have the revision value
  • Added getDescription function to PackageNode to get the correct description value based on the package type

Additionally I also slightly modified the new PackageNode.id property to utilise the partial commit hash if no version variable was available. Prior to this change, for the specific revision and local packages the id was showing as "{packageName}-". I can remove this if needed.

Testing

I did not add any tests for these changes. Existing suite passed locally. Based on the current suite I wasn't sure if this warranted additional tests - please lmk if I need to add some.

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@award999 award999 requested a review from plemarquand July 2, 2025 11:52
@award999
Copy link
Contributor

award999 commented Jul 2, 2025

LGTM but @plemarquand should have a look

Copy link
Contributor

@plemarquand plemarquand 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 to me, thank you for this!

@award999
Copy link
Contributor

award999 commented Jul 2, 2025

@wcrd can you add a changelog entry please

@wcrd wcrd force-pushed the feature/dependency-revision-hash branch from 47f56e2 to 0d4ec78 Compare July 2, 2025 15:45
@wcrd wcrd force-pushed the feature/dependency-revision-hash branch from 0d4ec78 to 6847d9b Compare July 2, 2025 15:58
@wcrd wcrd marked this pull request as ready for review July 2, 2025 15:59
@wcrd
Copy link
Contributor Author

wcrd commented Jul 2, 2025

Rebased and added a changelog entry - it looks like the 2.6.1 title was duplicated so also removed that. LMK if OK! Thanks

@plemarquand plemarquand merged commit 8eb902a into swiftlang:main Jul 2, 2025
@plemarquand
Copy link
Contributor

Verified with 323d996

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