4.1.0 #7

Merged
merged 19 commits into from Dec 29, 2015

Conversation

Projects
None yet
3 participants
@zzak
Member

zzak commented Dec 26, 2015

2a813b3 is the meat of this release

zzak added some commits Dec 26, 2015

Implement supported ruby version build step to replace multiruby
This allows us to drop dependency on third-party tools to build the data.

In order to build the data, you need the necessary tools for building Ruby.

This change also modifies the build system to use a different naming scheme.

Previously, multiruby was used to select the version build dir, then rdoc was
run on each version of ruby installed from multiruby to generate the ri data.

The new system works like this:

For each SUPPORTED_VERSIONS:
  * Download the tarball (i.e. ruby-2.3.0.tar.gz)
  * Extract and move it without patch-level (i.e. rubies/2.3)
  * Generate the data in matching format (i.e. data/2.3)

This allows us to then select the data more easily using only RUBY_VERSION.

We need to strip any patch-level from the version to find the data during install.

See this commit for more: fd4c655
Rakefile
require 'hoe'
+SUPPORTED_VERSIONS = %w[1.8.7-p374 1.9.3-p551 2.0.0-p647 2.1.8 2.2.3 2.3.0]

This comment has been minimized.

@hsbt

hsbt Dec 26, 2015

Member

2.2.4?

@hsbt

hsbt Dec 26, 2015

Member

2.2.4?

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Dec 26, 2015

Member

Here's the current blocker.. and it's got something to do with 1.8.

~ => ruby -v
ruby 1.8.7 (2013-12-22 patchlevel 375) [x86_64-linux]

~ => rdoc-data --install

~ => ri Object
/home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:548:in `load': undefined class/module Encoding (ArgumentError)
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:548:in `load_cache'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:547:in `open'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:547:in `load_cache'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:391:in `initialize'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/paths.rb:54:in `each'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:385:in `initialize'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:362:in `new'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:362:in `run'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/bin/ri:12
        from /home/zzak/.gem/ruby/1.8.7/bin/ri:23:in `load'
        from /home/zzak/.gem/ruby/1.8.7/bin/ri:23

but if I clear the ri cache.. it works:

ruby -rubygems -e 'require "rdoc"; require "rdoc/ri/paths"; system "rm #{RDoc::RI::Paths.system_dir}/cache.ri"'
Member

zzak commented Dec 26, 2015

Here's the current blocker.. and it's got something to do with 1.8.

~ => ruby -v
ruby 1.8.7 (2013-12-22 patchlevel 375) [x86_64-linux]

~ => rdoc-data --install

~ => ri Object
/home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:548:in `load': undefined class/module Encoding (ArgumentError)
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:548:in `load_cache'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:547:in `open'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/store.rb:547:in `load_cache'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:391:in `initialize'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/paths.rb:54:in `each'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:385:in `initialize'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:362:in `new'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/lib/rdoc/ri/driver.rb:362:in `run'
        from /home/zzak/.gem/ruby/1.8.7/gems/rdoc-4.2.1/bin/ri:12
        from /home/zzak/.gem/ruby/1.8.7/bin/ri:23:in `load'
        from /home/zzak/.gem/ruby/1.8.7/bin/ri:23

but if I clear the ri cache.. it works:

ruby -rubygems -e 'require "rdoc"; require "rdoc/ri/paths"; system "rm #{RDoc::RI::Paths.system_dir}/cache.ri"'
@drbrain

This comment has been minimized.

Show comment
Hide comment
@drbrain

drbrain Dec 26, 2015

Member

Did you build the data with Ruby 1.8.7? Can you dump the cache.ri with ri --dump

Member

drbrain commented Dec 26, 2015

Did you build the data with Ruby 1.8.7? Can you dump the cache.ri with ri --dump

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Dec 26, 2015

Member

@drbrain I think just using the system rdoc, but can change that to use the same version of Ruby that we're building.

Also, ri --dump doesn't work for me:

ri --dump
/home/zzak/.rubies/1.8.7-p375/lib/ruby/1.8/optparse.rb:451:in `parse': missing argument: --dump (OptionParser::MissingArgument)
Member

zzak commented Dec 26, 2015

@drbrain I think just using the system rdoc, but can change that to use the same version of Ruby that we're building.

Also, ri --dump doesn't work for me:

ri --dump
/home/zzak/.rubies/1.8.7-p375/lib/ruby/1.8/optparse.rb:451:in `parse': missing argument: --dump (OptionParser::MissingArgument)
@drbrain

This comment has been minimized.

Show comment
Hide comment
@drbrain

drbrain Dec 26, 2015

Member

You need to give it the file to dump (path to cache.ri)

Member

drbrain commented Dec 26, 2015

You need to give it the file to dump (path to cache.ri)

zzak added some commits Dec 27, 2015

Refactor `:build_ri_data` into each version task
Now each version also creates a `destdir` used for the install prefix.

From here, we can use each version of ruby, and rdoc, to generate the ri data.

This change also adds a `:clean` task to remove any build artifacts.
Refactor to use directory task for `:rubies` and `:data`,
as well as `rdoc_dir`, or output dir, and `buildir` (where ruby is built).
Use generate script to setup options for newer RDoc.
This avoids a bug when using the command-line rdoc form,
but still works on older versions of RDoc.
@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Dec 29, 2015

Member

@drbrain Almost ready to wrap this up, just doing some testing to make sure all versions are working properly. Then I should be able to ship the gem!

Member

zzak commented Dec 29, 2015

@drbrain Almost ready to wrap this up, just doing some testing to make sure all versions are working properly. Then I should be able to ship the gem!

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Dec 29, 2015

Member

Now.. for some reason, the 1.8 dir isn't being included when building the gem.

~/code/rdoc-data => ls data/
1.8  1.9  2.0  2.1  2.2  2.3
~/code/rdoc-data => ls pkg/rdoc-data-4.1.0/data/
1.8  1.9  2.0  2.1  2.2  2.3

from the gem:

~/.gem/ruby/1.8.7/gems => ls rdoc-data-4.1.0/data/
1.9  2.0  2.1  2.2  2.3
Member

zzak commented Dec 29, 2015

Now.. for some reason, the 1.8 dir isn't being included when building the gem.

~/code/rdoc-data => ls data/
1.8  1.9  2.0  2.1  2.2  2.3
~/code/rdoc-data => ls pkg/rdoc-data-4.1.0/data/
1.8  1.9  2.0  2.1  2.2  2.3

from the gem:

~/.gem/ruby/1.8.7/gems => ls rdoc-data-4.1.0/data/
1.9  2.0  2.1  2.2  2.3

zzak added a commit that referenced this pull request Dec 29, 2015

@zzak zzak merged commit 336f452 into master Dec 29, 2015

@zzak zzak deleted the 4-1 branch Dec 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment