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

scopedRegistries is not removed when remove all dependencies #153

Closed
TylerTemp opened this issue Feb 27, 2024 · 4 comments
Closed

scopedRegistries is not removed when remove all dependencies #153

TylerTemp opened this issue Feb 27, 2024 · 4 comments

Comments

@TylerTemp
Copy link

  1. Create any empty project
  2. add any dependence like: openupm add today.comes.saintsfield
  3. remove it, like: openupm remove today.comes.saintsfield

Expected Behavior

When all dependencies removed, the item in scopedRegistries in Packages/manifest.json gets removed too:

"scopedRegistries": [
]

Actual Behavior

The registry of openupm is still there with empty scopes, and lead to error:

"scopedRegistries": [
  {
    "name": "package.openupm.com",
    "url": "https://package.openupm.com",
    "scopes": []
  }
]

image

Version

  • openupm: 1.19.7
  • Unity: 2022.2.0f1
@favoyang
Copy link
Member

@TylerTemp, thank you for reporting the bug.

It's a known issue that was partly addressed by #134. However, it appears we forgot the openupm remove command.

@favoyang
Copy link
Member

@all-contributors please add @TylerTemp for bug.

Copy link
Contributor

@favoyang

I've put up a pull request to add @TylerTemp! 🎉

favoyang pushed a commit that referenced this issue Mar 5, 2024
* test: add establishing tests

Add tests to establish the behaviour described in #153.

* feat: manifest prune logic

Add helper function to prune manifest. This removes scoped-registries without scopes.

* feat: prune manifest before saving

Prune manifest before saving to file-system.
github-actions bot pushed a commit that referenced this issue Mar 5, 2024
## [1.19.10](1.19.9...1.19.10) (2024-03-05)

### Bug Fixes

* empty scoped-registry after remove ([#157](#157)) ([db0537e](db0537e)), closes [#153](#153)
@favoyang
Copy link
Member

favoyang commented Mar 5, 2024

Fixed by #157, thanks @ComradeVanti.

@favoyang favoyang closed this as completed Mar 5, 2024
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

No branches or pull requests

2 participants