Update OSGi classloader #741

Merged
merged 646 commits into from May 17, 2013

Projects

None yet
@ajuckel
Contributor
ajuckel commented May 16, 2013

I've added an OSGi integration test. Currently it needs to be run after ant jar-jruby-complete and you need to use either the felix2 or felix4 profile. I'm open to suggestions for how to better integrate the test case.

After adding the test case, I added a different method to find the classloader for a bundle. I added this as a set of new classes, mostly because I wanted to ensure any users of the existing classes wouldn't be affected.

I verified that the new method does fallback correctly in the felix2 profile (which doesn't export the new org.osgi.framework.wiring package.

enebo and others added some commits Apr 23, 2013
@enebo enebo Remove abstract class since there will only ever be one concrete version ce86721
@enebo enebo Remove capture feature since ripper does not use it 8495de6
@enebo enebo Start of correcting column offsets in ripper cad8aa3
@enebo enebo Ripper returns string tokens with proper offsets for integer numbers 235f0f2
@headius headius Match Ruby 2.1 naming and namespace for Wait*able exceptions. f83ac9e
@headius headius Actually move Wait*able exceptions under IO, as intended. 057969f
@headius headius Add io/try_nonblock ext for nonblock without exceptions. b97e022
@josedonizetti josedonizetti Fixing support of new params to 1.9 compatibility only! c0aa1d0
@headius headius Implement defined?(yield) (BlockGivenInstr) in IR JIT. 103163c
@headius headius Implement BUndefInstr in IR JIT...I think? 647089b
@headius headius Implement CheckArgsArrayArityInstr in IR JIT. 84970b0
@headius headius Implement ConstMissingInstr in IR JIT (is this used?) e7858a5
@headius headius Some renaming for sanity in IR JIT. 7b9b21e
@enebo enebo bah. merging and nor pring fd55eb7
@enebo enebo Merge pull request #650 from josedonizetti/io_readlines
File/IO readlines supporting new params limit, and open mode (thanks jose!)
a09d139
@enebo enebo Merge pull request #615 from tychobrailleur/exist_fix
Restore $! when catching exception.  In most cases jnr-posix on an error will throw and not get caught like this.   This is a special case and without significant changes jnr-posix this looks like the best fix to me.
de7171d
@headius headius Implement some array splat/msagn/ensure in IR JIT. a634d31
@headius headius Restore syswrite and write_nonblock I mercilessly deleted. 090e1ac
@headius headius Improve not-impl error in IRVisitor. 4a0e512
@headius headius Fix recent OpenSSL failures by updating CA certs used to verify.
It seems that www.amazon.com changed the CA cert it uses for its
ssl connection, and that caused us to start failing tests. After
some investigation, I figured out which cert we needed and what
the filename needed to be in the ca_path test. I have added a
README.txt to the ca_path and comments to all the related certs.
I also removed a cert file that appeared to be duplicate and added
a more explicitly incorrect cert for the test that is supposed to
fail verification.
8961d94
@headius headius Fix reference to SSLErrorReadable I missed during the rename. c4f2e1b
@headius headius Fix additional backref-aware paths in Rational construction. 659f99f
@headius headius Move 1.8 specs out of expected failures. bf1872a
@headius headius Set travis spec runs to use specdoc format, so we can see hangs. 227f308
@headius headius Remove force of dotted formatter from mspec configs. faff192
@enebo enebo At a minimum have parser treat source as UTF-8 by default in 2.0 mode cee5191
@headius headius Catch all exceptions when running ant subtask, to avoid bubbling.
This should fix #653. We may catch too much here, but it seems
the intent of the rescue block was to capture most exceptions. It
also would have caught the ant ExitStatusException as a
NativeException before, but that stopped working after we stopped
wrapping Java exceptions. The fix should catch it properly now.
ca30066
@headius headius Reduce races in Mutex#sleep spec. 7156792
Wayne Meissner Fix #654 - FFI::AutoPointer#free causes FFI::AutoPointer#autorelease?…
… to cast NullPointerException
c253096
@enebo enebo Update jnr-posix.jar for new error method e5cff7c
@enebo enebo JRUBY-6136: Changing jnr-posix to use errno() value unconditionally h…
…as created lots of failures in windows (take one)
947c661
@enebo enebo Update for next jnr-posix which has fstat() support for windows 27f00a9
@tychobrailleur @headius tychobrailleur Fix #645 by calling Java Math.cbrt directly. efa39c0
@tychobrailleur tychobrailleur Return -∞ for -0.0 9a83277
@headius headius Merge pull request #658 from tychobrailleur/gamma_zero
Math.gamma should return -∞ for -0.0
03aed6c
@headius headius Update RubySpec to 80bb145. b8b7f7b
@headius headius Fix Array#delete return value in 1.8 mode. 7c35e75
@atambo
Member

Bleh, thanks for the catch.

headius and others added some commits Apr 26, 2013
@headius headius Fix (non-)tainting of single-element Array#join with tainted sep. 3d15125
@headius headius Also passing due to Array#join fix. c4f48e6
@headius headius Fix two Array#to_s/inspect encoding issues and add minor optz. 6ac4722
@headius headius Move BasicObject constant up from Object to BasicObject. 8672aa7
@headius headius These are passing now. b9f632a
@headius headius Fix div of 0.0 error and clean up comparison tags (no bug number). 2164923
@headius headius Untag some passing IO.for_fd specs. 86a87d8
@headius headius Untag passing Time specs. 3abac0e
@headius headius Untag passing Struct specs. c9c4967
@headius headius Untag passing 1.8 mode String specs. 76d38db
@headius headius Untag passing 1.9-mode Regexp specs. 0419feb
@headius headius Tidy up Rational#** tags for hangs and tag slow #round spec. f1419eb
@headius headius Actually add tag for slow Rational#round spec. 4979c3f
@headius headius Untag passing Module specs. 1f30f7f
@headius headius Remove rogue logging line from spec. 5639ad7
@josedonizetti @headius josedonizetti fixing the support of new params on IO.foreach
Signed-off-by: Charles Oliver Nutter <headius@headius.com>
987b731
@headius headius Remove passing IO#foreach tags. b9e1aa4
@headius headius Re-tag Struct.new spec that appears to fail on Travis. 311160d
@headius headius Merge remote-tracking branch 'github/master' 26df243
@josedonizetti josedonizetti Fixing IO.foreach rubyspec, set env variable $_ to nil 30fc726
@headius headius Update version to 0.8.8 for renamed Wait*able exceptions. 3392241
@headius headius Bump jruby-openssl version to 0.8.9.dev. 01bb528
@tychobrailleur tychobrailleur '==' behaves like '===' in ruby 1.9.
This fixes the bignum/case_compare_spec.rb rubyspec.

It seems however that this behaviour changed again in 2.0.
Compare:
```
1.9.3p362 :001 > b =  0x8000_0000_0000_0000 + 10
 => 9223372036854775818
1.9.3p362 :002 > b === b.to_f
 => true
1.9.3p362 :003 > puts RUBY_VERSION
1.9.3
 => nil
```

to

```
irb(main):001:0> b =  0x8000_0000_0000_0000 + 10
=> 9223372036854775818
irb(main):002:0> b === b.to_f
=> false
irb(main):003:0> puts RUBY_VERSION
2.0.0
=> nil
```
56a62c3
@tychobrailleur tychobrailleur '===' differs from 'eql?' in ruby 1.9. a2163ca
@tychobrailleur tychobrailleur Bignum#to_s returns a US-ASCII encoded string.
This fixes bignum/to_s_spec.rb failures.
26be0c5
@tychobrailleur tychobrailleur Add license header to anno package classes. 4f1ff5a
@headius headius Merge pull request #662 from tychobrailleur/license
Add license header to anno package classes.
0ec6904
@headius headius Merge pull request #661 from tychobrailleur/bignum_fix
Bignum failing specs
119fbd8
@headius headius Merge pull request #660 from josedonizetti/sets_env_variable_to_nil
Fixing IO.foreach rubyspec, set env variable $_ to nil
b223904
@atambo atambo Tempfile#size should return the size of self even if self is closed i…
…n 1.9
96454ac
@atambo atambo GzipReader#rewind should reset the position of the stream pointer 55726ea
@tychobrailleur tychobrailleur Do not display class name for an anonymous struct. a53e411
@tychobrailleur tychobrailleur Fix float rounding issues. ad9cbe7
@headius headius Merge pull request #663 from atambo/tempfile_size_closed
Tempfile#size should return the size of self even if self is closed in 1.9
42ce3e6
@headius headius Merge pull request #664 from atambo/gzipreader_rewind_position
GzipReader#rewind should reset the position of the stream pointer
a99444d
@headius headius Load 2.0 Range#bsearch. adc76a1
@headius headius Fix #666 by implementing LoadError#path and related load logic. 0d1ff02
@headius headius Merge pull request #667 from tychobrailleur/struct_fix
Do not display class name for an anonymous struct.
d4271dd
@headius headius Merge pull request #668 from tychobrailleur/float_round
Fix float rounding issues.
baa048a
@headius headius Untag specs fixed by recent PRs. 65a548a
@atambo atambo BigDecimal#div should raise FloatDomainError if NaN is involved in 1.9 393d264
@atambo atambo BigDecimal#div should return 0 if divided by Infinity and no precisio…
…n given in 1.9
fbc83a7
@atambo atambo BigDecimal#div should raise ZeroDivisionError if divided by zero and …
…no precision given in 1.9
3f1aab3
@headius headius VERSION toplevel constant is not defined in 1.9 or 2.0. Fixes #665 41d174f
@headius headius Do not attempt to reuse SSL session.
JRuby does not yet implement OpenSSL::SSL::Session, so the reuse
of session broke net/http in JRuby's Ruby 2.0 mode. Since it's
only to speed up the establishment of SSL connections, we can
comment it out until we support OpenSSL::SSL:Session.

Related: #197.
62aa994
@atambo atambo BigDecimal#div should raise FloatDomainError if (+|-) Infinity divide…
…d by 1 and no precision given
66c45fe
@headius headius Add Kernel#__dir__. Fixes #651. 3efc72f
@headius headius Merge pull request #669 from atambo/bigdecimal_div_nan
Fix BigDecimal#div rubyspecs
d1b6d68
@atambo atambo Untag passing conditional variable rubyspecs 400809c
@atambo atambo Fix Etc rubyspecs 735c236
@atambo atambo Remove required argument constraint from StringIO#readpartial b9b09ba
@headius headius Merge pull request #671 from atambo/conditionalvariable
Untag passing conditional variable rubyspecs
25f8f99
@headius headius Merge pull request #672 from atambo/fix_etc
Fix Etc rubyspecs
2144a2f
@headius headius Merge pull request #673 from atambo/stringio_readpartial
Remove required argument constraint from StringIO#readpartial
7523401
@d-noll d-noll My stab at fixing JRUBY-7122 37e33c3
@tychobrailleur tychobrailleur Support '#' in String#unpack. 46da9c3
@tychobrailleur tychobrailleur MRI does add trailing nils for Q in String#unpack. df8ebec
@tychobrailleur tychobrailleur Support '_' and '!' after '<' and '>'. ed10095
@tychobrailleur tychobrailleur Delete unpack spec tags. d5ef6c0
@atambo atambo Fix class path reference to jzlib b6a5144
@atambo atambo Correctly exclude generated source from classpath ef519da
@atambo atambo Fix package for Ripper19YyTables 45a5897
headius and others added some commits May 3, 2013
@headius headius Merge pull request #694 from atambo/regex_equality_with_n_option
Regexp #== and #eql? is true if self does not specify /n option and other does and vise versa
443ddb6
@atambo atambo Regexp#options should include FIXEDENCODING and NOENCODING when enabled 2e6a80a
@atambo atambo Range#first should raise an ArgumentError when count is negative 84786ee
@atambo atambo Range#each should raise a TypeError if the first element is a Time ob…
…ject
4966837
@atambo atambo Numeric#div should raise ZeroDivisionError for 0 8d08b77
@atambo atambo Untag passing Math.cbrt and Math.gamma specs 7265ece
@atambo atambo Kernel.abort should set the exception message to the given message bd19973
@headius headius Merge pull request #697 from josedonizetti/support_ungetbyte
Supporting IO.ungetbyte
87605ef
@headius headius Merge pull request #695 from atambo/regex_options_fixed_none
Regexp#options should include FIXEDENCODING and NOENCODING when enabled
6768039
@headius headius Merge pull request #698 from atambo/range_first_error_on_negative
Range#first should raise an ArgumentError when count is negative
7aa7596
@headius headius Merge pull request #699 from atambo/range_each_error_on_time
Range#each should raise a TypeError if the first element is a Time object
ec393a4
@headius headius Merge pull request #700 from atambo/numeric_div_error_on_zero
Numeric#div should raise ZeroDivisionError for 0
6eb214e
@headius headius Merge pull request #701 from atambo/untag_math_specs
Untag passing Math.cbrt and Math.gamma specs
b6fcf48
@headius headius Merge pull request #703 from atambo/kernel_abort_should_set_message
Kernel.abort should set the exception message to the given message
48dd511
@atambo atambo Kernel.exec should raise an ArgumentError if the command includes a n…
…ull byte
acaec7a
@headius headius Merge pull request #704 from atambo/kernel_exec_error_on_null_byte
Kernel.exec should raise an ArgumentError if the command includes a null byte
d90f2db
@atambo atambo Kernel#open should correctly handle objects that responds to to_open 3c26b1f
@atambo atambo Kernel#singleton_methods should return a unique list of methods 2997b7a
@tychobrailleur tychobrailleur Fix Encoding#compatible? failing rubyspecs. 4d6f4a9
@tychobrailleur tychobrailleur Improved code formatting:
- Removed unused import,
- Added some whitespaces where missing,
- Removed a pair of curly braces for a simple if.
806f4cd
@headius headius Merge pull request #706 from atambo/kernel_open_to_open
Kernel#open should correctly handle objects that responds to to_open
4de60c0
@headius headius Merge pull request #707 from atambo/kernel_singleton_methods_uniq
Kernel#singleton_methods should return a unique list of methods
23d9817
@headius headius Merge pull request #708 from tychobrailleur/encoding_fix
Fix failing rubyspecs for Encoding#compatible?
9caad5d
@headius headius Get EINPROGRESSWaitWritable from proper location. Fixes JRUBY-7161 db853d3
@headius headius Merge remote-tracking branch 'github/master' ffe7b72
@headius headius Enable more tests for Socket stuff. f593fc2
@atambo atambo Exception#== should return true if the two exceptions inherit from Ex…
…ception but have different classes
6d27ca1
@atambo atambo Complex#/ with a Numeric which responds to #real? with false should c…
…oerce the passed argument to Complex and divide the resulting elements
96cc332
@headius headius Make .java_class work properly for "real" ifc impls. Fixes #709. bc92e76
@headius headius Only call dataGetStruct once. 8af4d99
@headius headius Merge pull request #711 from atambo/exception_equals_different_classes
Exception#== should return true if the two exceptions inherit from Exception but have different classes
e45c269
@headius headius Merge pull request #712 from atambo/complex_divide_non_real
Complex#/ with a Numeric which responds to #real? with false should coerce the passed argument to Complex and divide the resulting elements
8ec745c
@atambo atambo Including etc rubyspecs in CI 27219ce
@atambo atambo Add 1.9 library back to ci_files fb44369
@atambo atambo Include ping rubyspecs in CI cd1aae3
@atambo atambo Bignum#/ should not raise ZeroDivisionError if other is zero and is a…
… Float
1d64892
@atambo atambo Add fails tag to failing Kernel.spawn spec d06a39a
@atambo atambo Add fails tags for Process.{get,set}rlimit 2aad860
@enebo enebo Missing tDSTAR from debugging method d887e20
@enebo enebo Fixed some logic in kwargs to not throw wrong # of arguments in a few…
… cases. Change keywordrestarg to store and allocate a local variable just like restarg. Mildly changed interp logic for kwargs processing
c7238f6
@enebo enebo Doh. Nixed 2.0 logic check for block arg in optimized args path 174cf21
@enebo enebo Make callsite **blah work in 2.0 mode 49a1b78
@enebo enebo Remove extraneous println 4ebffba
@enebo enebo 2.0: If no extra kwargs assign empty hash to variable dd7c720
@headius headius Initial reimplementation of Enumerator#next in Java. d09e2d5
@headius headius Complete new threaded Enumerator#next and remove old logic. 6de1555
@headius headius Split out abstract superclass for Nexters. 9aa35f1
@headius headius Fixes to prevent finalization from setting interrupt status. 71c1e6a
@headius headius Add option for lightweight enums and introduce Array#each enum. 6132e96
@headius headius Perf improve Enum#next by using SyncQueue instead of Exchanger. f19a837
@enebo enebo 20: Was erroneously marking kwargs as simple method if keywordrest wa…
…s specified. Basic interp kwargs done?
909a0d2
@headius headius Try harder to shut down Nexter thread.
Don't look too close.
d3cf295
@headius headius Make compiler hard fail for kwargs for now. 5397068
@atambo atambo Merge pull request #715 from atambo/bignum_should_not_raise_error_whe…
…n_divided_by_zero_float

Bignum#/ should not raise ZeroDivisionError if other is zero and is a Float
d526d6a
@atambo atambo Merge pull request #714 from atambo/include_etc_rubyspecs
Some rubyspec additions
1b9d2e4
@atambo atambo Merge pull request #716 from atambo/add_tags_for_failing_getsetrlimit
Add fails tags for Process.{get,set}rlimit
80925ae
@atambo atambo Merge pull request #717 from atambo/add_tag_for_failing_spawn_spec
Add fails tag to failing Kernel.spawn spec
7b44855
@josedonizetti josedonizetti REFACTORING: supporting flag about receiving an offset or not. 05de78e
@headius headius Update to invokebinder 1.2 artifact. 70d6002
@headius headius Remove debug flag. b4bb482
@headius headius Go back to known-working-but-slower Exchanger impl of #next.
The exchanger impl is still slower than the pure-Ruby +
queue impl, but it does not leak threads and appears to
reliably shut down abandoned Enumerators. We can iterate on
improving perf of this impl (and applying that knowledge to
Fiber perf) post 1.7.4.

This reverts commits d3cf295
and f19a837.
b571861
@headius headius Improved killifying of Enumerator#next thread. a826173
@headius headius Fix #497 by using nearest class's name for anon inspect prefix. 6480caa
@headius headius Merge pull request #722 from josedonizetti/supporting_offset
REFACTORING: supporting flag about receiving an offset or not.
d9a1e1d
@headius headius Fix misspelling. 76e277d
@headius headius Restore use of FileOutputStream in ChannelDescriptor.
We use FileOutputStream here because it can handle append mode
for us, as opposed to RandomAccessFile which requires us to do
our own seeking. I am restoring this with documentation and Jose
will provide a new patch that only flips to RAF when we need to
provide an offset.
7a6b4eb
@enebo enebo Update to HEAD of jruby-launcher 6e88bff
@josedonizetti josedonizetti When offset passed return RandomAccessFile when not return FileOutput…
…Stream
ffef306
@headius headius Clear nexter on rewind, to avoid it accidentally being used. c713f73
@headius headius Merge pull request #724 from josedonizetti/hasoffet_flag
When offset passed return RandomAccessFile when not return FileOutputStream
81061ac
@enebo enebo Update to use official 1.0.10 version of jcodings a955fa2
@enebo enebo Make joni use newly released joni 2.0.0 (now with interrupts) 97a79da
@atambo atambo Merge remote-tracking branch 'github/master' fe78661
@atambo atambo Revert "REFACTORING: supporting flag about receiving an offset or not."
This reverts commit 05de78e.
7a9f23b
@atambo atambo IO.binwrite doesn't truncate the file if an offset is given b78564b
@atambo atambo Switch to using ModeFlags in order to specify CREAT and RDWR at the s…
…ame time
571f37b
@enebo enebo ACK merge when I wanted to rebase a295b23
@enebo enebo Make regexp interruptible. Regexp will throw InterruptedRegexpError <…
… RegexpError
c2c9432
@atambo atambo Merge pull request #726 from jruby/io_binwrite_dont_truncate_with_offset
IO.binwrite doesn't truncate the file if an offset is given
f3374be
@atambo atambo Tag failing Socket::BasicSocket#ioctl rubyspec 3ce9c34
@atambo atambo Remove 1.9 specs from travis allow_failures 4d95475
@atambo atambo IO.binwrite should accept options hash 2e61708
@prathamesh-sonpatki prathamesh-sonpatki Refactored directed graph specs a9ce79d
@enebo enebo 20: Don't include kwargsRest as final arguments to rest arg f66b8d9
@enebo enebo 20: More kwargs fixing block kwargs don't classcastexception (icky fi…
…x until 9k)
0be551f
@donv donv Allow Process::Status to be used as an integer and be returned as an …
…exit status
e520636
@enebo enebo 20: take this as far as possible without serious changes for kwargs 2f860fc
@donv donv * Reuse the to_i method for to_int 8f21bdb
@headius headius Fix and refactor slightly GC and GC::Profiler. a66de22
@enebo enebo Merge pull request #728 from prathamesh-sonpatki/directed_graph_specs
Refactored directed graph specs
7d2e27c
@headius headius Additional fixes for GC::Profiler and enable some related tests. 5aa44bd
@headius headius Fix #733 by doing a lightweight return from lightweight rescue. ba4df82
@enebo enebo unused getRuntime() call af3aeae
@enebo enebo GH #737: require_relative fails in jars (missing test coverage of this) 9a87e6e
@enebo enebo Try and remove travis failure for spawn 767120e
@ajuckel ajuckel Merge branch 'feature/add-osgi-test'
Conflicts:
	.classpath
	nbproject/project.xml
3fcbf47
@ajuckel ajuckel Update parent artifact version e74c159
@jrubyci jrubyci merged commit e74c159 into jruby:master May 17, 2013

1 check failed

default The Travis CI build failed
Details
@headius
Member
headius commented May 17, 2013

Wow, I don't know what happened there, but it's merged.

@enebo
Member
enebo commented May 17, 2013

EPIC!!!

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