Coder Social home page Coder Social logo

cocoapods-search's Introduction

CocoaPods Logo

CocoaPods: The Cocoa dependency manager

Build Status Gem Version Maintainability Test Coverage

CocoaPods manages dependencies for your Xcode projects.

You specify the dependencies for your project in a simple text file: your Podfile. CocoaPods recursively resolves dependencies between libraries, fetches source code for all dependencies, and creates and maintains an Xcode workspace to build your project. The latest released Xcode versions and the prior version are supported.

Installing and updating CocoaPods is very easy. Don't miss the Installation guide and the Getting Started guide.

Project Goals

CocoaPods aims to improve the engagement with, and discoverability of, third party open-source Cocoa libraries. These project goals influence and drive the design of CocoaPods:

  • Create and share libraries, and use them in your own projects, without creating extra work for library authors. Integrate non-CocoaPods libraries and hack on your own fork of any CocoaPods library with a simple transparent Podspec standard.
  • Allow library authors to structure their libraries however they like.
  • Save time for library authors by automating a lot of Xcode work not related to their libraries' functionality.
  • Support any source management system. (Currently supported are git, svn, mercurial, bazaar, and various types of archives downloaded over HTTP.)
  • Promote a culture of distributed collaboration on pods, but also provide features only possible with a centralised solution to foster a community.
  • Build tools on top of the core Cocoa development system, including those typically deployed to other operating systems, such as web-services.
  • Provide opinionated and automated integration, but make it completely optional. You may manually integrate your CocoaPods dependencies into your Xcode project as you see fit, with or without a workspace.
  • Solve everyday problems for Cocoa and Xcode developers.

Sponsors

Lovingly sponsored by a collection of companies, see the footer of CocoaPods.org for an up-to-date list.

Collaborate

All CocoaPods development happens on GitHub. Contributions make for good karma and we welcome new contributors with joy. We take contributors seriously, and thus have a contributor code of conduct.

Links

Link Description
CocoaPods.org Homepage and search for Pods.
@CocoaPods Follow CocoaPods on Twitter to stay up to date.
Blog The CocoaPods blog.
Mailing List Feel free to ask any kind of question.
Guides Everything you want to know about CocoaPods.
Changelog See the changes introduced in each CocoaPods version.
New Pods RSS Don't miss any new Pods.
Code of Conduct Find out the standards we hold ourselves to.

Projects

CocoaPods is composed of the following projects:

Status Project Description Info
Build Status CocoaPods The CocoaPods command line tool. guides
Build Status CocoaPods Core Support for working with specifications and podfiles. docs
Build Status CocoaPods Downloader Downloaders for various source types. docs
Build Status Xcodeproj Create and modify Xcode projects from Ruby. docs
Build Status CLAide A small command-line interface framework. docs
Build Status Molinillo A powerful generic dependency resolver. docs
Master Repo Master repository of specifications. guides

cocoapods-search's People

Contributors

dnkoutso avatar emkosz avatar kylef avatar manuyavuz avatar mrackwitz avatar nwest avatar orta avatar segiddins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocoapods-search's Issues

Pod still shows in search after deleting it from trunk

Report

What did you do?

I accidentally created a Podspec using a lowercase character 'kron' instead of 'Kron' (First pod mistake!)

I tried to delete the Pod but it still shows in the search

[~] ->  pod trunk delete kron 1.2.3
WARNING: It is generally considered bad behavior to remove versions of a Pod that others are depending on!
Please consider using the `deprecate` command instead.
Are you sure you want to delete this Pod version?
> yes

[!] The version is already deleted.
[~] ->
[~] ->  pod trunk me
  - Name:     Eonfluxor
  - Email:    [email protected]
  - Since:    September 9th, 13:39
  - Pods:
    - kron
    - Delayed
  - Sessions:
    - September 9th, 13:39 - January 16th, 2019 13:40. IP: 47.33.86.138
    Description: Macbook SGI
[~] ->  pod trunk info kron

kron
    - Versions:
      - 1.2.2 (2018-09-09 20:41:20 UTC)
    - Owners:
      - Eonfluxor <[email protected]>

What did you expect to happen?

ℹ I originally expected to be able to resubmit the Pod after deleting it, but further research shows that this is not possible?

What happened instead?

The pod is still showing in the search

screen shot 2018-09-10 at 1 40 04 pm

CocoaPods Environment

Stack

   CocoaPods : 1.5.3
        Ruby : ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin17]
    RubyGems : 2.6.14
        Host : Mac OS X 10.13.6 (17G65)
       Xcode : 9.4.1 (9F2000)
         Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /Users/hassanvfx/.rvm/rubies/ruby-2.4.0/lib
Repositories : Delayed - [email protected]:eonfluxor/delayed.git @ ea0f32dcbb6e6ee059f993be76985d0328864e9f
               eonfluxor - https://github.com/eonfluxor/kron @ b51097ed861b0914e797aa28597aaf6ae9c8da04
               eonfluxor-1 - https://github.com/eonfluxor/delayed @ ea0f32dcbb6e6ee059f993be76985d0328864e9f
               HourGlass - [email protected]:hassanvfx/hourglass.git @ 2e50d10fa9f364737146c45ed312c79b475d894f
               master - https://github.com/CocoaPods/Specs.git @ a5fb8f68f082f1e5e15ad95c3c70e4f9d9e220ba

Installation Source

Executable Path: /Users/hassanvfx/.rvm/rubies/ruby-2.4.0/bin/pod

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

Project that demonstrates the issue

This is the repo

https://cocoapods.org/pods/kron

  • I tried deleting it from trunk, and the command did succed but the pod is still available.
  • After researching on similar issues I learned that there is no way to "free" the name even after deleting the pod from trunk.
  • It's still a problem because I created another Pod with a different name (Delayed) but potential users will be confused using the deleted pod that still shows in the search

Print found pods using `less` command

I think this will really help with printing results of search queries.

Currently, when you try pod search a, just printing found pods takes 20 secs. With pod search --simple a, it takes 16 secs.

Current way really does not fit well. We should find a way to print only first parts, and let user continue with input.

I thought about using the following:

IO.popen('less', 'w') do |io|
  io.puts('blah blah')
end

However, it currently is not possible because search prints pods using UI.pod method, which calls puts internally.

Do you have any suggestions how should/could I integrate this, @orta, @floere, @segiddins?

pod search marqueeview error,this pod is made by myself,but it doesn't work;I have try anything;

pod search marqueeview

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/Users/jack/.rvm/gems/ruby-2.4.0/bin/pod search marqueeview
Report

What did you do?

What did you expect to happen?

What happened instead?

Stack

CocoaPods : 1.5.0
Ruby : ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin17]
RubyGems : 2.6.14
Host : Mac OS X 10.13.4 (17E199)
Xcode : 9.3 (9E145)
Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /Users/jack/.rvm/rubies/ruby-2.4.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ d4815404ae25a0ca3e73d1298cff56ea10ec447c
specs - https://github.com/OneWang/MarqueeView.git @ 1c5d8bfb2a0928094524896b1d4be5b5c2aaf217
Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
Error

ArgumentError - comparison of Pod::Version with nil failed
/Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/aggregate.rb:60:in <' /Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/aggregate.rb:60:in block in representative_set'
/Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/aggregate.rb:56:in each' /Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/aggregate.rb:56:in representative_set'
/Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/manager.rb:129:in block in search_by_name' /Users/jack/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/set.rb:324:in each_key'
/Users/jack/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/set.rb:324:in each' /Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/manager.rb:128:in map'
/Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-core-1.5.0/lib/cocoapods-core/source/manager.rb:128:in search_by_name' /Users/jack/.rvm/gems/ruby-2.4.0/gems/cocoapods-search-1.0.0/lib/cocoapods-search/command/search.rb:87:in local_search'
/Users/jack/.rvm/gems/ruby-2.4.0/gems/cocoapods-search-1.0.0/lib/cocoapods-search/command/search.rb:63:in run' /Users/jack/.rvm/gems/ruby-2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in run'
/Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in run' /Users/jack/.rvm/gems/ruby-2.4.0@global/gems/cocoapods-1.5.0/bin/pod:55:in <top (required)>'
/Users/jack/.rvm/gems/ruby-2.4.0/bin/pod:23:in load' /Users/jack/.rvm/gems/ruby-2.4.0/bin/pod:23:in

'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=comparison+of+Pod%3A%3AVersion+with+nil+failed&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

Swift unit tests broken after the migration to cocoapods 0.36.RC.1
#3244 [closed] [11 comments]
31 Mar 2015

Improving search performance while using --full flag

Hi,

I like this pod search --full command very much, however i think it has performance drawbacks which makes me hesitate while using it.

First of all, it makes an update index operation whenever it's called, even if an index was generated before. This makes the command very slow to operate.

Secondly, it generates a hash index such that keys are the pod names and values are strings which are created by concatenating podspec information such as summary, description and authors names. While searching for a given query, it traverses whole these value strings and perform a gsub() operation on them.

I have the following proposal to improve search speed for full text search scenario:

  • Search index generation should be performed only when master repo or another private repo is updated (i.e. after performing git pull --ff-only). Operation should perform as a subprocess to not to block user for pod install and pod update commands.
  • Search index should have a different format which is more suitable for search scenarios. Specifically, index should be a hash index where keys are words used in whole spec repository, and values are names of the pods which contains given word inside it's spec information. This eliminates need to run gsub() on long strings repeatedly. We need to check query with keys only.

I've actually implemented proposed scenario, and made some benchmarks. Results are as follows (_default_ means current implementation, _fast_ means proposed implementation):

Generating Index From Scratch

    user            system      total     real
    defaultIndex:   12.540000   1.130000  13.670000 ( 13.705714)
    fastIndex:      12.800000   0.990000  13.790000 ( 13.797296)

There is no important difference on indexing performance.

Searching 'afnetworking' Query

    user        system     total      real
    default:    7.390000   0.370000   7.760000 (  7.760688)
    fast:       0.470000   0.020000   0.490000 (  0.500742)

Here the proposed method offers a huge performance gain. This gain results from two improvements:

  1. Performing a proactive indexing policy eliminates the need to update index during command execution. We are sure that stored index is up-to-date.
  2. Evaluating query only for repo vocabulary (thanks to the new index format).

To measure the effects individually, I run one more benchmark, which disables default implementation's update index policy. In this case, it just gets index from the file and performs search on it. Here are the results:

    user                        system      total       real
    defaultWithoutUpdateIndex:  2.140000    0.040000    2.180000 (  2.189329)
    fast:                       0.510000    0.030000    0.540000 (  0.548586)

I think the gain of the new index format is pretty obvious.

Conclusion

Proposed method can remarkably improve search performance for full text search scenario. I will generate a PR containing the implementation, but I have a concern for this. Change contains modifications on three classes each belonging to different repositories (CocoaPods/CocoaPods, CocoaPods/Core, CocoaPods/cocoapods-search). How do you perform PR reviews for these cases? Should I create PR's for each repo and give links to each other? Or are there any other suitable methods?

Thanks so much for giving your time to this long issue description!

Improve tokenization policy

As discussed in CocoaPods/Core#265, we can improve tokenizer while generating inverted index for search.

Current policy performs a naive and simple split approach which splits texts from whitespaces using String#split method. As suggested by @floere, we may implement a better tokenizer approach which may handle some typos in texts or clearing special characters like ! and . while preserving term specific usages like - character in Objective-C.

This needs to be evaluated in detail, opening issue as a reminder.

We may tag this as enhancement if appropriate.

Remove --full flag

After the improvements in #8 merged completely, I think we can get rid of --full flag because it would give answer in less than a second in most cases.

The --web option is hitting a ruby error

It looks like the open! func doesn't exist anymore according to CocoaPods/CocoaPods#7702

NoMethodError - undefined method `open!' for #<Pod::Command::Search:0x007f94f58ad180>
Did you mean?  open
/Library/Ruby/Gems/2.3.0/gems/cocoapods-search-1.0.0/lib/cocoapods-search/command/search.rb:79:in `web_search'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-search-1.0.0/lib/cocoapods-search/command/search.rb:61:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

I'm not actually sure where that comes from, after a quick look

Perform a smarter sort algorithm

Currently, all found pods are printed in alphabetical order. New sorting algorithm should have the following ordering:

  1. Pods whose name exactly matches with query
  2. Pods whose name matches with query
  3. Pods whose summary matches with query
  4. Pods whose description matches with query
  5. Pods whose authors matches with query

Is there any other case I missed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.