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

Pick some packages from other vpm repository #21

Open
anatawa12 opened this issue Oct 23, 2023 · 9 comments · May be fixed by #23
Open

Pick some packages from other vpm repository #21

anatawa12 opened this issue Oct 23, 2023 · 9 comments · May be fixed by #23

Comments

@anatawa12
Copy link
Contributor

I think it's better to pick some packages from other vpm listing.

In some vpm listing, this generator is not used (since this is not published in early days) so I think it's better to have way to pick package from other vpm listing instead of adding repository.

@momo-the-monster
Copy link
Collaborator

You are welcome to fork and modify these scripts to fit your needs!

@anatawa12
Copy link
Contributor Author

@momo-the-monster, Could you answer #11? This repository has no license so I cannot know which license will be applied to new features I'll write.

@Spokeek
Copy link

Spokeek commented Nov 8, 2023

@anatawa12 That was one of the ideas i had for my issue #20 but in the end what i did is integrate the projects as github projects and only handled a specific use case for what i called "deprecated project ids".

Would that help you ?

@anatawa12
Copy link
Contributor Author

Many of vpm repository author creates vpm repository without this action so I think it's much better for compatibility to use vpm repository.
For example, QvPen, one of the most popular pen for worlds, uses manual update and NDMF, a framework for avatars, uses their own action.
I think such a repository author can break compatibility with this action.
When I actually need update package.json for vpm for compatibility in the future, I (and I think many of non-this action based repository author) may change vpm.json only not with package zip.

In addition, I think this action is not good for picking third-party because this action increases download count when vpm repository creates.
I want to use download count for estimating how much user use my tool so I do not want downstream to register our repository for this action, instead
(this is one of the reasons why I still use my own action for vpm repo)

@Spokeek
Copy link

Spokeek commented Nov 8, 2023

So you would definitly need a way to integrate within this action to integrate packages from another vpm repository.
As I was planning to do so a while ago but in the end fixed my issue in my own way, i could work on that.

Any idea on how you would describe such thing in the source.json ?

I thought about having an "vpmRepos" entry as following:

{
  "vpmRepos": [
      "https://spokeek.github.io/vpm-repository/index.json",
      {
          "source": "https://vpm.anatawa12.com/vpm.json",
          "ignorePackages":  [
              "com.anatawa12.continuous-avatar-uploader"
          ]
      }
    ]
}

or would you rather do the opposite and list the needed packages ?
Tell me so i can get started on that, or maybe you already did ?

@anatawa12
Copy link
Contributor Author

anatawa12 commented Nov 8, 2023

I think listing picking packages instead of listing ignored is much better since vpm repository author can add any package any time.
I think it's very bad to unexpectedly include third party package.
(Removing package from repository is BRAKING change for repository so unexpectedly including package from external repository is bad I think.)
So, I think configuration like any of the following is good.

{
  "vpmPackages": {
      "nadena.dev.ndmf": "https://vpm.nadena.dev/vpm.json",
      "com.anatawa12.continuous-avatar-uploader": ["https://vpm.anatawa12.com/vpm.json"],
      "com.anatawa12.avatar-optimizer": {
          "includePrereleases": true,
          "versionRange": ">=1.0.0, <2.0.0"
          "sources": ["https://vpm.anatawa12.com/vpm.json"]
      }
  }
}
{
  "vpmRepos": [
      {
          "source": "https://vpm.anatawa12.com/vpm.json",
          "packages":  [
              "com.anatawa12.continuous-avatar-uploader"
          ]
      }
    ]
}
{
  "vpmRepositories": {
      "https://vpm.anatawa12.com/vpm.json": {
          "packages": ["com.anatawa12.continuous-avatar-uploader"]
      }
  }
}

I think the first is the best format for configuration since

  • it's clear we have to declare package by package
  • it's easy to add configuration for each package.
    In my example i've added includePrerelease and versionRange but I think it's not required for initial implementation.
    I think it's not likely to add repository-scope configuration.

@anatawa12
Copy link
Contributor Author

maybe you already did?

No yet. I can do tomorrow but not started yet.

@Spokeek
Copy link

Spokeek commented Nov 8, 2023

It's up to you, If you want to do it, please describe it on that issue or on a PR, i'll look at it and my use it myself (wanted to use _bd vpm repo in that way)

@anatawa12
Copy link
Contributor Author

I'll implement this suggestion tomorrow.

@anatawa12 anatawa12 linked a pull request Nov 9, 2023 that will close this issue
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.

3 participants