Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 281028

Summary: [xpath2] Need to Refactor Promotion rule implementation
Product: [WebTools] WTP Source Editing Reporter: David Carver <d_a_carver>
Component: wst.xpathAssignee: Jesper Moller <jesper>
Status: RESOLVED FIXED QA Contact: David Carver <d_a_carver>
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Carver CLA 2009-06-22 01:27:22 EDT
There are a set of rules that fn:avg needs to implement before working on calculating the average.  These rules are outlined in the xpath specification.

http://www.w3.org/TR/xpath-functions/#op.numeric
Comment 1 David Carver CLA 2009-09-02 15:24:14 EDT
Assigning inbox items to triaged since these have all be triaged.
Comment 2 Jesper Moller CLA 2009-09-03 18:23:35 EDT
I'm tackling this now (and a number of other type promotion issues along the way)
Comment 3 David Carver CLA 2009-09-10 00:46:15 EDT
Any status update on this, we have about another week before the 3.2M2 cut off date.
Comment 4 Jesper Moller CLA 2009-09-10 15:46:29 EDT
Progress + regression.
I was interrupted by other work (Denmark is now live as the first country with 100% digital registration of real estate titles and mortgages, it just went into production. XML heavy!)

Also I found a wad of tests that were expecting the wrong error code (XPST0013), so I'm dealing with that., but I will make the M2 deadline for this bug.
Comment 5 David Carver CLA 2009-09-10 16:06:27 EDT
(In reply to comment #4)
> Progress + regression.
> I was interrupted by other work (Denmark is now live as the first country with
> 100% digital registration of real estate titles and mortgages, it just went
> into production. XML heavy!)
> 
> Also I found a wad of tests that were expecting the wrong error code
> (XPST0013), so I'm dealing with that., but I will make the M2 deadline for this
> bug.

Cool thanks for the update.  Yeah I know about those tests expecting the wrong error code, I fixed several the other day in LocalNameFromQNameFuncTest.
Comment 6 Jesper Moller CLA 2009-09-17 16:19:29 EDT
This wasn't supposed to happen!

I thought the cut-off date was by the end of this week. Sorry 'bout that.

Anyway, I've been sidetracked by the negative test expectations. There are hundreds of test expectations that are not set correctly (which is taken by the test harness as XPST0003).
Once fixed, they revealed that most type errors were reported as XPST0003 as well, which is very wrong. So I'm fixing the error messages first.
Comment 7 David Carver CLA 2009-09-17 20:28:39 EDT
WTP likes a stabilization period in general before a stable build.  Unfortunately this means you don't really have a full six weeks of development.  It's a week ramp up (planning, 4 weeks dev, one week ramp down).   Not my preferred method, but that is what wtp follows.

Anyways, sounds like you could use the extra time anyways.
Comment 8 David Carver CLA 2009-10-16 13:26:22 EDT
Jesper just checking to see how this is going.  We have about 2 weeks before we hit freeze again.  I think this is the last big set of unit tests we need to get working.
Comment 9 David Carver CLA 2009-10-18 10:24:27 EDT
Renaming summary to better reflect scope of the work.  Jesper do you have a patch that you could attach to this bug, maybe I can help finish it up over the next week or so.  Feel free to attach  mylyn context as well.
Comment 10 Jesper Moller CLA 2009-10-19 20:30:07 EDT
Are you committing to these at the moment?
Comment 11 Jesper Moller CLA 2009-10-19 20:30:51 EDT
Previous comment was meant for Dave... Bugzilla is not Google Wave. :-)
Comment 12 David Carver CLA 2009-10-19 20:32:02 EDT
Sorry for the late response, I've fixed up these so they pass the test suite.  So the rest of the work is re-implementing the promotion and sub-type rules correctly.  I'm going to change the title to reflect the remaining work, and remove the blocking on bug 262765, as it no longer blocks that bug.

Latest code is in head.
Comment 13 David Carver CLA 2009-10-19 20:34:37 EDT
I'm done touching this portion of the code.  We have a hand full of tests that still need to pass (about 12).  Will take a look at fn:collection and maybe fn:in-scope-prefixes during 3.2M4.
Comment 14 David Carver CLA 2009-10-26 01:45:27 EDT
Moving to 3.2M4 since we are approaching the ramp down of 3.2M3.  If you can get it in for 3.2M3 that is great otherwise shoot for 3.2M4.
Comment 15 Jesper Moller CLA 2009-11-30 20:50:09 EST
yeah, it's finally done. Just have to fix up copyrights. Committing Tuesday.
Comment 16 Jesper Moller CLA 2009-12-01 18:39:19 EST
Woohoo, committed. I think Hudson ate it without spitting it back out.
Comment 17 David Carver CLA 2009-12-01 18:54:22 EST
Actually..yellow build.

https://build.eclipse.org/hudson/view/WTP/job/cbi-wtp-wst.xsl.psychopath/lastBuild/testReport/org.eclipse.wst.xml.xpath2.processor.testsuite.functions/SeqAVGFuncTest/test_fn_avg_mix_args_066/

1 test is failing.

Re-Opening...I won't fix, so you get the CI point once it is fixed.
Comment 18 Jesper Moller CLA 2009-12-01 18:57:08 EST
Yep, I was too trigger happy, I really thought I had run the tests properly locally as well.

the test was somehow wrong, FORG0001 is the correct error code.
Fixed in CVS.

You can re-spin it if you want.
Comment 19 David Carver CLA 2009-12-01 19:11:03 EST
It'll respin itself every 10 minutes if there are new changes.  Should be green soon then. And you'll get the points. :)

Just check it in a half hour, if it's green, resolve the bug.
Comment 20 David Carver CLA 2009-12-01 20:18:26 EST
build back to green resolving.