Skip to content

feature: support private registries #51

Open
@mercxry

Description

@mercxry

Hello, I use a private registry for some crates at work, unfortunately this plugin is not able to fetch the crate versions from there.

Are there plans to support private registries?

Screen Shot 2023-02-03 at 15 05 44

Activity

saecki

saecki commented on Feb 13, 2023

@saecki
Owner

That sounds reasonable, I'll see what I can do

LeonKowarschickKenbun

LeonKowarschickKenbun commented on Mar 1, 2023

@LeonKowarschickKenbun

Any updates? I'd be happy to take a look myself, if you're busy ^^

saecki

saecki commented on Mar 2, 2023

@saecki
Owner

Yeah, sorry I'm currently quite swamped, feel free

stvndall

stvndall commented on May 10, 2023

@stvndall

Stumbled onto this plugin, it's awesome, but I also use a custom registry.

Having just found the plugin, it will take me a while to familiarise myself with the code, and make any changes. @LeonKowarschickKenbun Did you manage to take a look at all?

LeonKowarschickKenbun

LeonKowarschickKenbun commented on May 10, 2023

@LeonKowarschickKenbun

Not yet, sadly

saecki

saecki commented on May 12, 2023

@saecki
Owner

Here are some thoughts as to how this could be implemented

  • First we have to parse the registry declaration in the toml module and store it on the Crate struct
  • Then we need to obtain the user defined registries
    • global ones stored in the user home
    • and local ones stored in the repository
    • they should probably be lazy loaded when fetching metadata, since this involves FS operations
  • Lastly we just pass the whole crate struct to the functions in the API module which decide where to fetch metadata from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @stvndall@mercxry@saecki@LeonKowarschickKenbun

        Issue actions

          feature: support private registries · Issue #51 · saecki/crates.nvim