Skip to content

Locally edited packages in Packages folder should be listed #371

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

Closed
adam-fowler opened this issue Jul 24, 2022 · 3 comments
Closed

Locally edited packages in Packages folder should be listed #371

adam-fowler opened this issue Jul 24, 2022 · 3 comments

Comments

@adam-fowler
Copy link
Contributor

Currently they are not because the workspace.json file doesn't include a path for them. We can work this out though from the subpath member ie they are inside the Packages folder

@aelam
Copy link
Contributor

aelam commented Jul 24, 2022

I don't quite understand the edited packages, Could you please share more about it

@adam-fowler
Copy link
Contributor Author

swift package edit allows you to edit the code in dependencies. You can either use a local version of the dependency somewhere else on your file system or have it create a copy of the dependency in the Packages folder. Currently the extension supports the first case, right click on the extension and chose use local version. You can still use the second version but have to type swift package edit my-dependency outside of vscode. The problem is when you do this the dependency is removed from the dependency view.

@aelam
Copy link
Contributor

aelam commented Jul 24, 2022

Thank s for your answer!

You can either use a local version of the dependency somewhere else on your file system or have it create a copy of the dependency in the Packages folder.

Just tried swift package edit, and it seems not much difference for in Packages folder or not, an alias would be created

I'm trying to learning the code and fixing it

Is it like this? I tested it with Packages folder, it works well

3333

When I read the code I got three points that I'd like to share

  • it seems thatworkspace.json is all needed for dependency list.
  • more status can be introduced like resolving, fetching.
  • PackageNode should be prepared before it's used otherwise there would be a lot of conditional checks for paths
  • current type: local, remote, editing seems to make two types into one type to control
    local/remote is a pair
    edited, not_edited is a pair

#370

@adam-fowler adam-fowler linked a pull request Jul 30, 2022 that will close this issue
2 tasks
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 a pull request may close this issue.

2 participants