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

Use name+USR for deduplication #462

Merged
merged 3 commits into from
Feb 1, 2016
Merged

Conversation

pcantrell
Copy link
Collaborator

Verified that this does work around #459, but I’ll leave that one open for you, @jpsim, so you can investigate the underlying cause further if you want.

This increases the L content of the changelog by 3.4%.
@pcantrell
Copy link
Collaborator Author

Any feedback on this? I’ll merge if there are no concerns.

@AliSoftware
Copy link

@pcantrell hey, I had the same issue as #460 on my Reusable pod and wanted to try your PR to confirm it solved the issue. But I can't manage to install your branch using a Gemfile to test your fix, any idea what's wrong?

$ cat Gemfile
source 'https://rubygems.org'

gem 'jazzy', :git => 'https://github.com/pcantrell/jazzy.git', :branch => 'issue-460'

$ bundle install
Updating https://github.com/pcantrell/jazzy.git
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.5.1
Using claide 0.9.1
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using cocoapods-core 0.39.0
Using cocoapods-downloader 0.9.3
Using cocoapods-plugins 0.4.2
Using cocoapods-search 0.1.0
Using cocoapods-stats 0.6.2
Using netrc 0.7.8
Using cocoapods-trunk 0.6.4
Using cocoapods-try 0.5.1
Using colored 1.2
Using escape 0.0.4
Using molinillo 0.4.2
Using xcodeproj 0.28.2
Using cocoapods 0.39.0
Using mustache 0.99.8
Using open4 1.3.4
Using redcarpet 3.3.4
Using rouge 1.10.1
Using sass 3.4.21
Using sqlite3 1.3.11
Using liferaft 0.0.4
Using xcinvoke 0.2.0
Using jazzy 0.5.0 from https://github.com/pcantrell/jazzy.git (at issue-460)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-0.9.6/bin/rake RUBYARCHDIR=/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/extensions/universal-darwin-15/2.0.0/jazzy-b83ac66ec423 RUBYLIBDIR=/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/extensions/universal-darwin-15/2.0.0/jazzy-b83ac66ec423
rake aborted!
File exists - (A, Versions/Current)
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:10:in `symlink'
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:10:in `block (3 levels) in <top (required)>'
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:6:in `chdir'
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:6:in `block (2 levels) in <top (required)>'
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:5:in `each'
/Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423/lib/jazzy/SourceKitten/Rakefile:5:in `block in <top (required)>'
Tasks: TOP => default => prepare
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/jazzy-b83ac66ec423 for inspection.
Results logged to /Users/olivier/.mygemhome/.gem/ruby/2.0.0/bundler/gems/extensions/universal-darwin-15/2.0.0/jazzy-b83ac66ec423/gem_make.out
An error occurred while installing jazzy (0.5.0), and Bundler cannot continue.

@pcantrell
Copy link
Collaborator Author

@AliSoftware Try using git clone instead of gem install and see if that works.

@AliSoftware
Copy link

@pcantrell Just tested and it seems like I still have the issue even with this branch 😢

$ git clone https://github.com/pcantrell/jazzy.git
…
$ cd jazzy
$ git checkout issue-460
$ git describe
v0.5.0-17-gb83ac66

$ bundle install
…
$ bin/jazzy --podspec ../Reusable.podspec
Updating local specs repositories

CocoaPods 1.0.0.beta.2 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Fetching podspec for `Reusable` from `/Users/olivier/Documents/Dev/GitHub/AliSoftware/Reusable`
Downloading dependencies
Installing Reusable (2.1.0)
Generating Pods project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
building site
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol NibLoadable, protocol NibLoadable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static variable nib, static variable nib
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static method loadFromNib(), static method loadFromNib()
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol Reusable, protocol Reusable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: static variable reuseIdentifier, static variable reuseIdentifier
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: protocol NibReusable, protocol NibReusable
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableCell(indexPath:), instance method dequeueReusableCell(indexPath:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableHeaderFooterView(_:), instance method registerReusableHeaderFooterView(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableHeaderFooterView(_:), instance method registerReusableHeaderFooterView(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableHeaderFooterView(), instance method dequeueReusableHeaderFooterView()
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableCell(_:), instance method registerReusableCell(_:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableCell(indexPath:), instance method dequeueReusableCell(indexPath:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableSupplementaryView(_:viewType:), instance method registerReusableSupplementaryView(_:viewType:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method registerReusableSupplementaryView(_:viewType:), instance method registerReusableSupplementaryView(_:viewType:)
Found conflicting type declarations with the same name, which may indicate a build issue or a bug in Jazzy: instance method dequeueReusableSupplementaryView(_:indexPath:), instance method dequeueReusableSupplementaryView(_:indexPath:)
jam out ♪♫ to your fresh new docs in `docs`

@AliSoftware
Copy link

Oh wait, it actually fixed the generated docs (now the methods are correctly dispatched in the proper protocol in the generated HTML documentation), so that's a win.

But those "conflicting type declarations with the same name" are still appearing — as you see in the trace — whereas I guess they shouldn't appear anymore…?!

@pcantrell
Copy link
Collaborator Author

It looks like it’s compiling everything twice:

Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
Running xcodebuild
Parsing NibLoadable.swift (1/2)
Parsing Reusable.swift (2/2)
building site

…which is probably #439.

If you’re seeing all the extension methods attached to the proper type, then this PR is working. If you’re seeing them duplicated, then that’s #439.

@AliSoftware
Copy link

Ohhh yeah so sorry, you're totally right!

I had the two issues and already saw #439 (I actually commented on #439 too before starting looking on #459)… but as I was investigating both at quite the same time and being quite tired lately, I confused the two when trying your PR. 😫

So yep indeed I can confirm that your PR is totally working! Thanks a lot for the fix, hope to see it merged soon 👌

@pcantrell
Copy link
Collaborator Author

No need for apologies. I can barely keep all this straight myself. Thanks for verifying!

@pcantrell
Copy link
Collaborator Author

What the heck … merging! “YOLO is a whole roll of smiles”

pcantrell added a commit that referenced this pull request Feb 1, 2016
Use name+USR for deduplication
@pcantrell pcantrell merged commit 7549ac2 into realm:master Feb 1, 2016
@pigeon-archive pigeon-archive modified the milestone: The Past Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants