Skip to content

Conversation

MartinNowak
Copy link
Member

So I've tested the Rust package manager and it has a nice feature to search available packages.

$ cargo search gl
Updating registry `https://github.com/rust-lang/crates.io-index`
gfx_gl (0.1.4)           OpenGL bindings for gfx, based on gl-rs
gl_common (0.0.4)        Common glue for libraries using gl-rs
gl_generator (0.0.27)    Syntax extension for creating bindings to the Khronos OpenGL and related APIs
gl (0.0.12)              OpenGL bindings
gfx_device_gl (0.5.0)    OpenGL backend for gfx-rs
glutin (0.3.5)           Cross-plaform OpenGL context provider.
kugel (0.0.2)            Rust-oriented OpenGL wrapper.
khronos_api (0.0.8)      Khronos API XML descriptions for gl_generator
freetypegl (0.1.0)       Rust build helpers and bindings for freetype-gl.
nice_glfw (1.0.1)        Create a modern GL context with glfw

It's also nice that it says when its package list cache is updated.

@grogancolin
Copy link
Contributor

The easiest way of doing this is to make use of the dub-registry api.

I went some way towards that, but never finished it, I'll put it higher to the top of my to-do list.

@p0nce
Copy link
Contributor Author

p0nce commented Sep 15, 2015

Maybe there is something both simpler and more useful.

The dub registry command would simply opens http://code.dlang.org

  • the registry page is already designed for package discovery, searchable, and have categories
  • it is very common to want to reach this page to bump the version of a managed package. I have a script to do this faster.

I can implement it if there is approval.

@MartinNowak
Copy link
Member

It's fairly easy to implement b/c dub-registry already has a better search functionality now. The only thing needed is to integrate it with the API.

@MartinNowak
Copy link
Member

Implementation done, still waiting for dlang/dub-registry#121 to be deployed.

@s-ludwig
Copy link
Member

Deployment is done now.

- queries all package suppliers and outputs any found package
@MartinNowak
Copy link
Member

Deployment is done now.

Nice, tests pass as well.

@p0nce
Copy link
Contributor Author

p0nce commented Sep 22, 2015

Yay!

@MartinNowak
Copy link
Member

I left-justified the package names and versions for better readability.
Now we only need a xapian binding for better search results ;).

@s-ludwig
Copy link
Member

Okay, looks good.

s-ludwig added a commit that referenced this pull request Sep 22, 2015
A feature like `cargo search`
@s-ludwig s-ludwig merged commit 80d8292 into dlang:master Sep 22, 2015
@s-ludwig
Copy link
Member

I added a call to .array to avoid the map.filter chain in Dub.searchPackages to execute the GET request multiple times.

@MartinNowak MartinNowak deleted the feat663 branch September 22, 2015 12:45
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 this pull request may close these issues.

4 participants