CocoaPods / Core

The models used within the CocoaPods gem
MIT License
160 stars 349 forks source link

fix missing spec repos #749

Closed fnxpt closed 11 months ago

fnxpt commented 1 year ago

Probably not the best ruby code since I don't actively develop in ruby.

When doing pod install with a Podfile.lock already created, some of the spec repos might be skipped because the key already exists

Fixes #748

fnxpt commented 1 year ago

@dnkoutso can you check this one please?

dnkoutso commented 1 year ago

Hi @fnxpt can you add a test for this?

dnkoutso commented 1 year ago

Thanks for the PR!

fnxpt commented 1 year ago

Hey @dnkoutso sorry for the delay, I couldn't find any tests on that file... do you have any guidelines?

PedroT172 commented 1 year ago
uuuummmm....
dnkoutso commented 1 year ago

@fnxpt the tests are called "specs" and the file you want is lockfile_spec.rb

fnxpt commented 1 year ago

Ok going to have a look at it today

fnxpt commented 1 year ago

sorry for the delay @dnkoutso. Im having issues setting the tests... Are you able to help?

fnxpt commented 1 year ago

@dnkoutso Finally fixed my environment to be able to run the tests but unfortunately Im getting a lot of errors on existing code. Is this only on my side or its really broken? I'm running rspec spec/lockfile_spec.rb. This is blocking our pipelines, is there a way we can have a beta version for this, until we have the tests fixed/implemented.

45 examples, 21 failures

Failed examples:

rspec ./spec/lockfile_spec.rb:129 # Pod::Lockfile In general stores the initialization hash
rspec ./spec/lockfile_spec.rb:134 # Pod::Lockfile In general loads from a file
rspec ./spec/lockfile_spec.rb:140 # Pod::Lockfile In general returns nil if it can't find the initialization file
rspec ./spec/lockfile_spec.rb:145 # Pod::Lockfile In general returns the file in which is defined
rspec ./spec/lockfile_spec.rb:151 # Pod::Lockfile In general raises if the provided YAML doesn't returns a hash
rspec ./spec/lockfile_spec.rb:164 # Pod::Lockfile In general returns whether it is equal to another
rspec ./spec/lockfile_spec.rb:173 # Pod::Lockfile In general returns the list of the names of the  installed pods
rspec ./spec/lockfile_spec.rb:177 # Pod::Lockfile In general returns the versions of a given pod
rspec ./spec/lockfile_spec.rb:183 # Pod::Lockfile In general returns the versions of a given pod handling the case in which the root spec was not stored                                                                                                                                
rspec ./spec/lockfile_spec.rb:188 # Pod::Lockfile In general returns the spec repo of a given pod
rspec ./spec/lockfile_spec.rb:194 # Pod::Lockfile In general returns the checksum for the given Pod
rspec ./spec/lockfile_spec.rb:198 # Pod::Lockfile In general returns the dependencies used for the last installation
rspec ./spec/lockfile_spec.rb:207 # Pod::Lockfile In general returns the spec repo sources
rspec ./spec/lockfile_spec.rb:214 # Pod::Lockfile In general returns the spec repo sources when that section is missing
rspec ./spec/lockfile_spec.rb:219 # Pod::Lockfile In general only includes root names in spec repo sources
rspec ./spec/lockfile_spec.rb:231 # Pod::Lockfile In general includes the external source information in the generated dependencies
rspec ./spec/lockfile_spec.rb:236 # Pod::Lockfile In general returns the dependency that locks the pod with the given name to the installed version                                                                                                                                     
rspec ./spec/lockfile_spec.rb:243 # Pod::Lockfile In general raises if there is a request for a locking dependency for a not stored Pod
rspec ./spec/lockfile_spec.rb:249 # Pod::Lockfile In general returns the version of CocoaPods which generated the lockfile
rspec ./spec/lockfile_spec.rb:435 # Pod::Lockfile Serialization serializes correctly external dependencies
rspec ./spec/lockfile_spec.rb:599 # Pod::Lockfile Private helpers #generate_spec_repos sorts specs per spec repo by lowercase
fnxpt commented 1 year ago

@dnkoutso found the issue, running the wrong command. Added the test, please have a look

biehl1 commented 1 year ago

Hi, can this be expedited somehow? We really need this too

camisLuisa commented 1 year ago

Thank you for the PR! It is really necessary.

fnxpt commented 1 year ago

@dnkoutso/ @amorde / @orta do you think we can merge this?

santam85 commented 1 year ago

Encountered the same issue. Anything blocking this PR we can help with?

fnxpt commented 11 months ago

@dnkoutso can we merge this and include it on next version?

biehl1 commented 11 months ago

Hi guys, anything missing to merge this one? Seems all green to go

fnxpt commented 11 months ago

Hey guys, what are the next steps, do I need to do anything extra? This PR is already approved for 2 weeks now and I would like to know when is it going to be merged.