8000 Re-add support for revision hash or local/editing keyword as dependency description by wcrd · Pull Request #1667 · swiftlang/vscode-swift · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wcrd
Copy link
@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

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.

1 participant
0