Merge branch 'refs/heads/master' into feature/prefixed_attribute_acce…
[BUGFIX] # attribute getter on XML nodes should require attribute p…
* JRuby implementation
Of course, this now doesn't work on JRuby. I need to move the changes in Node# into the C extension.
[BUGFIX] Move prefixed attribute getter logic into C extension
[BUGFIX] JRuby version should not require #key? check before #get jus…
…t to get nil rather than an empty string
After doing bloody-battle with the C code, and a brief drop into Java, this is the best solution I have managed to come up with.
@yokolet Any thoughts?
[BUG] Setting attributes on XML nodes using #= does not set namespa…
…ce on JRuby
Can this be reviewed/merged please?
Anything I can do?
@flavorjones @jvshahid @yokolet: I'd really, really like to get this change in to 1.5.6. Can I get some feedback? I'd love to not have to move away from Nokogiri but this is becoming a deal-breaker for me.
When I run the test suite on this branch under jruby-18.104.22.168 I get the following error:
NoMethodError: undefined method `href' for nil:NilClass
1159 tests, 2787 assertions, 0 failures, 1 errors, 10 skips
Command failed with status (1): [/home/miked/.rvm/rubies/jruby-22.214.171.124/bin/...]
Unfortunately I'm no longer able to run the specs on JRuby, due to this issue with racc. Any ideas?
Disregard that last comment, merging master in solved that issue. Working on fixing the spec failure.
So, re-familiarising myself with the situation, that bug was documented by this failing test. Unfortunately, my knowledge of the Java code is not great. What I need to do is get hold of the namespace definition for a particular prefix on the node (or its ancestors) in order to set that when doing:
node['foo:bar'] = 'baz'
Can someone help me out with how I might get hold of that namespace definition?
[BUG] Add further test coverage to setting attributes with a namespac…
Can we get this merged so the failure is at least infront of everyone? This is broken in master anyway, just hidden. There should be a failing test for it until it can be fixed.
I've merged the failing tests onto master. I'd like to take a whack at fixing this.
And what of the prefixed Node#?
@benlangfeld - Are you referring to the behavior described by your tests? If so, as I said above, I'm going to write the code to make the tests pass. If not, can you be more specific with your question?
You only merged the commits from this pull request which describe the current failure on jruby, but not the earlier ones which normalise the getter behaviour between jruby and the c extension, which form the bulk of this pull request (a whole bunch of C code to match JRuby, whose behaviour I consider correct as outlined in the linked issue this pull request fixes).
Are we in agreement on these points:
This pull request is messy. You have an unused private method implemented in C hanging around; you have a Ruby commit that is later reverted by your C implementation; and you're using regular expressions where they're not necessary.
I will make these tests pass by implementing a cleaner patchset. You are welcome to submit a new PR that addresses the above issues.
Sure, we agree on those points.
As for the messy change-set:
I don't mean to appear ungrateful for your attention here, but your last comments are rather harshly worded considering 3 months of repeated requests for comments. One does not spend half a day preparing a pull request, despite the fact that you might be able to do a better job in 10 minutes, hoping to be berated for doing a less than perfect job.
I politely declined to merge the code, and you seemed to not understand why, so I explained. This should be interpreted as constructive feedback, and not "berating".
I don't mind implementing the fix. I'm not complaining, and I'm not attacking. I apologize that it took so long to get feedback; we all have day jobs and families here at Team Sparklemotion, and sometimes things fall through the cracks.
Your contribution on this issue has been extremely valuable, thank you again.
Fix the failing test that was added by PR #726 related to issue #712.
More efficient implementation of fix from #726 for #712.
Make the last commit's code more readable (related to #726 and #712)
Can we get an RC with this change?
Yes. I'll put something together today/tonight.
1.5.6.rc3 was released earlier this week.