[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-13 Thread noreply
The proposal to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-13 Thread Zorba Build Bot
Validation queue job trace_without_debug_info-2012-07-13T08-33-57.278Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-13 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/trace_without_debug_info-2012-07-13T08-33-57.278Z/log.html
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-13 Thread David Graf
The proposal to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread Zorba Build Bot
The proposal to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread Zorba Build Bot
The attempt to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job trace_without_debug_info-2012-07-13T05-56-14.18Z is
  finished.  The final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/trace_without_debug_info-2012-07-13T05-56-14.18Z/log.html
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread David Graf
The proposal to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba has been updated.

Commit Message changed to:

Removed internal debug info from fn:trace out by using zorba serializer instead 
of the internal show function.

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread Chris Hillery
The proposal to merge lp:~davidagraf/zorba/trace_without_debug_info into 
lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-12 Thread Chris Hillery
Review: Approve

Ok, yeah, I see your point. I'd prefer it if we could test this SOMEhow, but 
it's not too critical. For now, I've tested your changes locally and the work 
fine, so let's run with it.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-07-02 Thread David Graf
Review: Approve


-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-27 Thread David Graf
Hey Chris

There is a quick solution: I could just pipe the trace stuff into the result 
file of a test. But I think this is not clean. The query result file should not 
contain trace stuff.

But implementing a clean solution would take quite some time. I don't know if 
it is worth it. I think I would need to introduce fn:trace output files in the 
ExpQueryResults directory. Something like 
test/rbkt/ExpQueryResults/zorba/misc/baseuri.fntrace.res for example. And 
compare the resulting fn:trace output with those files.

Do you think this is necessary?
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-26 Thread Chris Hillery
The changes all look good.

Is there any way you can add any test cases for this? I don't know if 
testdriver captures fn:trace() output, but if it does (or can do so easily) I'd 
feel better if we had at least one or two tests showing the functionality.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-26 Thread David Graf
Chris, can you review the change again and give some feedback?
Thanks
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-18 Thread David Graf
- Extended serializer to print attributes
- storing serializer in the trace state object
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-15 Thread Chris Hillery
Ah, I see what you're saying. Another option, though, would be to have the flag 
on the xml_emitter constructor; then you just need to pass it from setup(), and 
wouldn't need to change the emit_item() signature. I haven't looked deeply to 
see whether it would be possible to get the option value easily at setup() time 
or not, though.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-15 Thread David Graf
> David:
> 
> 1. I agree, the duplication of code to output attributes is not pretty. I
> don't think it would be too difficult to add support for directly serializing
> attributes to the serializer itself. And it wouldn't have to be changed in
> every emitter, only whichever emitter is used for basic XML serialization.
> 
Hello Chris
The only solution I see is to pass an additional parameter to 
emitter::emit_item to tell the function if it should throw an error or not if 
an attribute is passed. But this implies changing the emit_item function of all 
emitters. Do you see a nicer solution?
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Matthias Brantner
> > > Matthias: why is that desirable? Especially for SingletonItemSequence, is
> > > there any internal-runtime class with equivalent functionality?
> > It's one level of indirection which is not necessary and it bloats includes
> > and dependencies.
> 
> In that case, can you answer my other question: Is there equivalent
> functionality he could use in the runtime?
store::TempSeq_t Store::createTempSeq(store::Item_t&) could be used.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Chris Hillery
> > Matthias: why is that desirable? Especially for SingletonItemSequence, is
> > there any internal-runtime class with equivalent functionality?
> It's one level of indirection which is not necessary and it bloats includes
> and dependencies.

In that case, can you answer my other question: Is there equivalent 
functionality he could use in the runtime?
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Chris Hillery
David: 

1. I agree, the duplication of code to output attributes is not pretty. I don't 
think it would be too difficult to add support for directly serializing 
attributes to the serializer itself. And it wouldn't have to be changed in 
every emitter, only whichever emitter is used for basic XML serialization.

2. I think adding the serializer to the either the state or the iterator class 
is the right answer. I'm not quite clear enough on how the whole 
state/STACK_PUSH stuff works in the runtime to say whether the state or the 
iterator is the better place for it.

I don't immediately see any problem with adding the #include of serializer to 
the corresponding header file. If you're desperate to avoid this, however, you 
could have a forward reference to Serializer and put a Serializer* on the 
appropriate class. Yes, that means the Serializer would need to be 
heap-allocated and you'd have to worry about de-allocating it in the destructor.

I wonder if you could have a forward reference to Serializer and then have a 
data member that was an auto_ptr or unique_ptr?
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Matthias Brantner
> Matthias: why is that desirable? Especially for SingletonItemSequence, is
> there any internal-runtime class with equivalent functionality?
It's one level of indirection which is not necessary and it bloats includes and 
dependencies.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Chris Hillery
Matthias: why is that desirable? Especially for SingletonItemSequence, is there 
any internal-runtime class with equivalent functionality?
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread Matthias Brantner
It would be great if the usage of API classes such as SingletonItemSequence, 
zorba::Item, or zorba::Iterator_t could be avoided in the runtime.
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread David Graf
Hello Chris
Here is the current work I've done to remove the debug output in fn:trace (as 
discussed in the email with markos). It's working fine. But I need some advice 
to make it better. I am doing this via a merge request. I think that's easier 
for you because I can see the diff.
In the current implementation, I am doing two nasty things:
1) The code to print an attribute is redundant. That's bad. Would it make sense 
to add an option to the serializer to enable printing of all nodes? I am not 
sure. Especially because it is not so easy to do. All the emmitter need to be 
changed. Do you see a nicer solution?
2) If the node is not an attribute, I create a serializer in each iteration! 
Although I always need the same. But I didn't find a nice solution to use just 
one serializer. If I do a singleton, I need to create the serializer on the 
heap. If I put the seralizer as a member in the state or the iterator, I need 
to import the serializer in the header file.
Best
David


-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~davidagraf/zorba/trace_without_debug_info into lp:zorba

2012-06-14 Thread David Graf
David Graf has proposed merging lp:~davidagraf/zorba/trace_without_debug_info 
into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)

For more details, see:
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
-- 
https://code.launchpad.net/~davidagraf/zorba/trace_without_debug_info/+merge/110377
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp'
--- src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp	2012-05-03 12:31:51 +
+++ src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp	2012-06-14 17:55:23 +
@@ -16,6 +16,7 @@
 #include "stdafx.h"
 
 #include 
+#include 
 
 #include "diagnostics/xquery_diagnostics.h"
 #include "diagnostics/user_exception.h"
@@ -31,6 +32,10 @@
 #include "system/globalenv.h"
 #include "zorbatypes/zstring.h"
 
+#include "api/serialization/serializer.h"
+#include "api/serializerimpl.h"
+#include "api/unmarshaller.h"
+
 namespace zorba 
 {
 
@@ -102,9 +107,42 @@
   while (consumeNext(result, theChildren[0], planState)) 
   {
 (*state->theOS) << state->theTagItem->getStringValue() 
-  << " [" << state->theIndex << "]: "
-  << result->show()
-  << std::endl;
+  << " [" << state->theIndex << "]: ";
+
+if (result->getNodeKind() == store::StoreConsts::attributeNode)
+{
+  store::Item* qnameItem = result->getNodeName();
+  const zstring& prefix = qnameItem->getPrefix();
+  const zstring& local = qnameItem->getLocalName();
+
+  if (prefix.empty())
+(*state->theOS) << " " << local << "=\"";
+  else
+(*state->theOS) << " " << prefix << ":" << local << "=\"";
+
+  zstring value;
+  result->getStringValue2(value);
+  (*state->theOS) << value;
+
+  (*state->theOS) << "\"";
+}
+else
+{
+  serializer ser(NULL);
+  Zorba_SerializerOptions options;
+  options.omit_xml_declaration = ZORBA_OMIT_XML_DECLARATION_YES;
+  SerializerImpl::setSerializationParameters(ser, options);
+  const Item lItem(result);
+  SingletonItemSequence lSequence(lItem);
+  Iterator_t seq_iter = lSequence.getIterator();
+  seq_iter->open();
+  ser.serialize(
+  Unmarshaller::getInternalIterator(seq_iter.get()), 
+  (*state->theOS));
+  seq_iter->close(); 
+}
+
+(*state->theOS) << std::endl;
 ++state->theIndex;
 
 STACK_PUSH(true, state);

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp