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

Write a script to migrate https://crates.io/crates/dirs/reverse_dependencies to use our crates #8

Open
tesuji opened this issue May 17, 2020 · 3 comments
Assignees
Labels
C-question Category: Not a bug, but someone asking for support E-help-wanted An issue where some help would be really appreciated. :) E-medium An issue of medium complexity. P-low Low priority issues/PRs

Comments

@tesuji
Copy link
Contributor

tesuji commented May 17, 2020

@tesuji tesuji added C-question Category: Not a bug, but someone asking for support E-help-wanted An issue where some help would be really appreciated. :) labels May 17, 2020
@tesuji tesuji added the E-medium An issue of medium complexity. label May 17, 2020
@sondr3
Copy link
Contributor

sondr3 commented May 19, 2020

I've been quickly looking at this to see how feasible it would be, from a quick glance we might have to involve the Crates.io folks because of rate limiting in the crates.io API. I tried looking at the crates.io-index repo to see how much useful information you can extract there, you can at least find all the crates depending on dirs but not their GitHub (or other service) repository nor their crates.io page (though given that there's no namespacing the name field is probably a 1-to-1 for a crates.io/crate/<name>). This is an example of how a crate looks in the index:

Click to expand!
{
  "name": "prj",
  "vers": "0.1.0",
  "deps": [
    {
      "name": "clap",
      "req": "^2",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "crossterm",
      "req": "^0.14.2",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "dirs",
      "req": "^2.0",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "fuzzy-matcher",
      "req": "^0.3.1",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "git2",
      "req": "^0.11.0",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "serde",
      "req": "^1.0",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "serde_derive",
      "req": "^1.0",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "term_size",
      "req": "^1.0.0-beta1",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    },
    {
      "name": "toml",
      "req": "^0.5",
      "features": [],
      "optional": false,
      "default_features": true,
      "target": null,
      "kind": "normal"
    }
  ],
  "cksum": "341a5e6df29a635b8901aa426f1c6ae688f4150804c2279885e04562373cba93",
  "features": {},
  "yanked": false,
  "links": null
}

I think the biggest hurdle is getting the repositories for downstream repos, otherwise I think this would be a fairly straight forward Python script (rate limiting non-withstanding).

@sondr3 sondr3 self-assigned this May 26, 2020
@sondr3
Copy link
Contributor

sondr3 commented May 31, 2020

Small update, I have a somewhat working script for finding downstream dependents on this crate, but still haven't found a good way to get their repositories, I'm looking into just directly scraping the crates.io website which might require getting permission from their team as I cannot find a good way to get this information from an API/the crates.io-index repo.

@tesuji
Copy link
Contributor Author

tesuji commented Sep 9, 2020

https://github.com/dirs-dev/dirs-rs has been maintained again for a while,
there aren't high desires for transfer-scripts, I intended to close this issue.
But I will keep this issue with P-low instead.

@tesuji tesuji added the P-low Low priority issues/PRs label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-question Category: Not a bug, but someone asking for support E-help-wanted An issue where some help would be really appreciated. :) E-medium An issue of medium complexity. P-low Low priority issues/PRs
Projects
None yet
Development

No branches or pull requests

2 participants