[Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 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:~paul-lucas/zorba/pjl-misc into lp:zorba
The attempt to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba failed. Below is the output from the failed tests. CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message): Validation queue job pjl-misc-2012-12-05T04-55-07.832Z is finished. The final status was: 4 tests did not succeed - changes not commited. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 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:~paul-lucas/zorba/pjl-misc into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/pjl-misc-2012-12-05T04-55-07.832Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 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:~paul-lucas/zorba/pjl-misc into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 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:~paul-lucas/zorba/pjl-misc into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 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:~paul-lucas/zorba/pjl-misc into lp:zorba
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba. Commit message: 1. Added operator<< for SchemaTypeCode to (a) print it better and (b) eliminate warning. 2. Eliminated a few other warnings as well. Requested reviews: Paul J. Lucas (paul-lucas) For more details, see: https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 1. Added operator<< for SchemaTypeCode to (a) print it better and (b) eliminate warning. 2. Eliminated a few other warnings as well. -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/138054 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/internal/ztd.h' --- include/zorba/internal/ztd.h 2012-09-19 21:16:15 + +++ include/zorba/internal/ztd.h 2012-12-05 04:32:21 + @@ -84,7 +84,7 @@ * \internal * This namespace is used only to bundle the implementation details for * implementing \c has_insertion_operator. - * This implementation is based on http://stackoverflow.com/questions/4434569/ + * This implementation is based on http://stackoverflow.com/q/4434569/ */ namespace has_insertion_operator_impl { typedef char no; === modified file 'include/zorba/store_consts.h' --- include/zorba/store_consts.h 2012-09-19 21:16:15 + +++ include/zorba/store_consts.h 2012-12-05 04:32:21 + @@ -16,6 +16,7 @@ #ifndef ZORBA_STORE_STORE_CONSTS_H #define ZORBA_STORE_STORE_CONSTS_H +#include #include #include @@ -89,6 +90,8 @@ XS_LAST }; +std::ostream& operator<<( std::ostream&, SchemaTypeCode ); + class ZORBA_DLL_PUBLIC StoreConsts { === modified file 'src/api/CMakeLists.txt' --- src/api/CMakeLists.txt 2012-10-08 12:09:36 + +++ src/api/CMakeLists.txt 2012-12-05 04:32:21 + @@ -57,6 +57,7 @@ zorba_functions.cpp annotationimpl.cpp auditimpl.cpp +store_consts.cpp streambuf.cpp transcode_streambuf.cpp uuid.cpp === added file 'src/api/store_consts.cpp' --- src/api/store_consts.cpp 1970-01-01 00:00:00 + +++ src/api/store_consts.cpp 2012-12-05 04:32:21 + @@ -0,0 +1,87 @@ +/* + * Copyright 2006-2008 The FLWOR Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +namespace zorba { +namespace store { + +/// + +std::ostream& operator<<( std::ostream &o, SchemaTypeCode c ) { + static char const *const s[] = { +"xs:anyAtomicType", // 0 +"xs:string", // 1 +"xs:normalizedString",// 2 +"xs:token", // 3 +"xs:language",// 4 +"xs:NMTOKEN", // 5 +"xs:Name",// 6 +"xs:NCName", // 7 +"xs:ID", // 8 +"xs:IDREF", // 9 +"xs:ENTITY", // 10 +"xs:untypedAtomic", // 11 +"xs:dateTime",// 12 +"xs:date",// 13 +"xs:time",// 14 +"xs:duration",// 15 +"xs:dayTimeDuration", // 16 +"xs:yearMonthDuration", // 17 +"xs:float", // 18 +"xs:double", // 19 +"xs:decimal", // 20 +"xs:integer", // 21 +"xs:nonPositiveInteger", // 22 +"xs:negativeInteger", // 23 +"xs:long",// 24 +"xs:int", // 25 +"xs:short", // 26 +"xs:byte",// 27 +"xs:nonNegativeInteger", // 28 +"xs:unsignedLong",// 29 +"xs:unsignedInt", // 30 +"xs:unsignedShort", // 31 +"xs:unsignedByte",// 32 +"xs:positiveInteger", // 33 +"xs:gYearMonth", // 34 +"xs:gYear", // 35 +"xs:gMonthDay", // 36 +"xs:gDay",// 37 +"xs:gMonth", // 38 +"xs:boolean", // 39 +"xs:base64Binary",// 40 +"xs:hexBinary", // 41 +"xs:anyURI", // 42 +"xs:QNAME", // 43 +"xs:NOTATION",// 44 +"js:null",// 45 + }; + + if ( c >= 0 && c < XS_LAST ) +o << s[ c ]; + else +o << "'; + + return o; +}; + +/// + +} // namespace store +} // namespace zorba + +/* vim:set et sw=2 ts=2: */ === modified file 'src/diagnostics/CMakeLists.txt' --- src/diagnostics/CMakeLists.txt 2012-10-
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1073175 into lp:zorba
Review: Needs Fixing OK, I'm afraid I guess I don't know enough about the problem to know which solution is best. Sorin, please work with Paul to determine how (and if) it might be possible to implement this function without breaking streamability. Paul can probably provide a method to allow the stream to check itself as it is consumed by the remainder of the query, but it's not clear to me what the consequences of that might be - in particular, it's not clear where the exception would come from if this stream found invalid bytes. -- https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/136488 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba failed. Below is the output from the failed tests. CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message): Validation queue job bug-1026250-2012-12-05T01-32-06.304Z is finished. The final status was: 13 tests did not succeed - changes not commited. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-1026250-2012-12-05T01-32-06.304Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba has been updated. Commit Message changed to: fix for bug lp:1026250 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 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:~zorba-coders/zorba/bug-1026250 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-1026250 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'include/zorba/pregenerated/diagnostic_list.h' --- include/zorba/pregenerated/diagnostic_list.h 2012-11-12 16:17:02 + +++ include/zorba/pregenerated/diagnostic_list.h 2012-12-05 01:28:26 + @@ -640,6 +640,8 @@ extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0036_NON_ROOT_NODE_DELETION; +extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0037_CONCURRENT_MODIFICATION; + extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED; extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED; === modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq' --- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-11-08 05:38:30 + +++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-12-05 01:28:26 + @@ -566,6 +566,10 @@ (:~ :) +declare variable $zerr:ZDDY0037 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0037"); + +(:~ +:) declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001"); (:~ === modified file 'src/compiler/codegen/plan_visitor.cpp' --- src/compiler/codegen/plan_visitor.cpp 2012-10-29 11:41:36 + +++ src/compiler/codegen/plan_visitor.cpp 2012-12-05 01:28:26 + @@ -883,6 +883,9 @@ if (v.is_sequential()) { +pragma* pr = 0; +theCCB->lookup_pragma(&v, "materialize", pr); + if (!isGeneral) { if (v.has_sequential_clauses()) @@ -929,17 +932,11 @@ } } - // Note: a materialize clause may exist already in case plan serialization - // is on (see comment in materialize_clause::clone) - if (!isGeneral && - v.get_return_expr()->is_sequential() && - v.get_clause(numClauses-1)->get_kind() != flwor_clause::materialize_clause && - (v.get_order_clause() != NULL || v.get_group_clause() == NULL)) + if (pr) { materialize_clause* mat = theCCB->theEM->create_materialize_clause(v.get_sctx(), v.get_return_expr()->get_loc()); - v.add_clause(mat); ++numClauses; } @@ -975,7 +972,7 @@ ++numForClauses; } - if (domExpr->is_sequential()) + if (pr && domExpr->is_sequential()) { if (k == flwor_clause::for_clause || k == flwor_clause::window_clause || === modified file 'src/compiler/expression/flwor_expr.cpp' --- src/compiler/expression/flwor_expr.cpp 2012-10-26 07:13:42 + +++ src/compiler/expression/flwor_expr.cpp 2012-12-05 01:28:26 + @@ -699,7 +699,7 @@ expr::substitution_t& subst) const { // we will reach here under the following scenario: - // 1. We do plan seriazation + // 1. We do plan serialization // 2. getPlan is called on udf A; this causes a mat clause to be created //during the codegen on A's body // 3. getPlan is called on udf B, which invokes A, and A's body is === modified file 'src/compiler/translator/translator.cpp' --- src/compiler/translator/translator.cpp 2012-11-20 18:17:10 + +++ src/compiler/translator/translator.cpp 2012-12-05 01:28:26 + @@ -2331,6 +2331,31 @@ } +/*** +/ +void +recognizePragma(expr* e, const zstring& aLocalName) +{ + for (std::vector::const_iterator lIter = theScopedPragmas.begin(); + lIter != theScopedPragmas.end(); + ++lIter) + { +pragma* p = *lIter; +if (p->theQName->getNamespace() == ZORBA_EXTENSIONS_NS) +{ + if (p->theQName->getLocalName() == aLocalName) + { +e->get_ccb()->add_pragma(e, p); +e->setContainsPragma(ANNOTATION_TRUE); +break; + } +} + } +} + + + + / // // // Module, VersionDecl, MainModule, LibraryModule, ModuleDecl // @@ -6290,6 +6315,8 @@ theFlworClausesStack.resize(curClausePos); + recognizePragma(flwor, "materialize"); + push_nodestack(flwor); } === modified file 'src/diagnostics/diagnostic_en.xml' --- src/diagnostics/diagnostic_en.xml 2012-12-01 01:04:39 + +++ src/diagnostics/diagnostic_en.xml 2012-12-05 01:28:26 + @@ -2255,6 +2255,10 @@ attempt to delete non-root node from collection "$1" + + "$1": collection was modified while reading + + "$1": collection already declared
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1073175 into lp:zorba
> So what is the correct way to check a streamable string? Presumably the check > has to be done while streaming... I think the user of the streamable string has to do the checking, i.e., if getStream() is called, then whoever is reading said stream has to do it -- the StreamableString can't do it itself. Well, the materialize() function could do it for those Item member functions that force materialization; but it's not clear whether even that's worth doing given the above. Unless What if there were a utf8_streambuf that did validation as bytes were read? I think that's doable (and I have time to implement it). -- https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/136488 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:~zorba-coders/zorba/bug1073175 into lp:zorba
Ahh, duh. Sorry I missed that. So what is the correct way to check a streamable string? Presumably the check has to be done while streaming... -- https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/136488 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:~zorba-coders/zorba/bug1073175 into lp:zorba
Review: Needs Fixing Calling getStringValue() on a streamable string (as you do in order to validate it) materializes the entire string -- that defeats the purpose of having a streaming string in the first place. -- https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/136488 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
It's my opinion that that is not a valuable feature, and the downsides outweigh its usefulness. Also, users can do this themselves if they require it by executing a shell or cmd. We should not do it for them, or at the very least this should not be the default. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
it's executing a shell with the commands, this way one can have access to shell commands. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
Review: Needs Fixing Why does the process module execute a shell command? I would expect it to behave like execl(), not exec() (which is not part of POSIX as far as I can tell). Oh, yeah, ugh - I see that process.cpp collects the (separate) command-line arguments from the XQuery functions and concatenates them together with spaces. That's broken, IMHO. It uses double-quotes, but that won't work for arguments that contain double-quotes. I'm not sure how to do all this on Windows, although I'm confident there's a better way. But on Unix this implementation is simply not correct. That probably explains to some degree why the behaviour on Fedora is weird - it's not actually getting the return value of the executed command, but of some intermediate shell which is evaluating that command. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
Interesting Ubuntu and Fedora don't implement this the same way. On Ubuntu running a bash script or the process xq script which calls a program that segFaults, the exit code is 139. The macro WIFEXITED(stat) returns true and WEXITSTATUS(stat) returns 139. Which btw means acording to the link below an 128+signal 11. http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF On Fedora running the same process implementation, the macro WIFEXITED(stat) returns false and WIFSIGNALED(stat) returns true which means we can call WTERMSIG(stat) which returns 11. So in order to bring these two together I propose make them both return 139, just like shell because this process module executes a shell command not just an executable and I think we need to respect the same conventions. This means that for the Fedora case just add 128 and use it as exit code. On Windows I couldn't find something similar, if possible we could follow the same convention. Comments? -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1073175 into lp:zorba
Review: Approve I believe the changes look OK. However, I don't quite understand the issue being checked for here, so I've asked Paul to review as well. -- https://code.launchpad.net/~zorba-coders/zorba/bug1073175/+merge/136488 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:~zorba-coders/zorba/canonicalize-core into lp:zorba
>> - remove from modules/w3c/xpath_functions.xq (it's not defined in the XQuery >> FOTS spec) > Sorry my mistake, I did it for testing because the function as not being > detected and forgot to remove it. > >> - the function should handle streamable strings as well >> - does canonicalization allow for options? If so, we should expose them > Yes it have encoding and some options > http://xmlsoft.org/html/libxml-parser.html#xmlParserOption, should I add them? Yes, probably most of them. I would start with XML_PARSE_NOENT = 2 : substitute entities XML_PARSE_DTDLOAD = 4 : load the external subset XML_PARSE_DTDATTR = 8 : default DTD attributes XML_PARSE_DTDVALID = 16 : validate with the DTD XML_PARSE_NOBLANKS = 256 : remove blank nodes XML_PARSE_NONET = 2048 : Forbid network access XML_PARSE_NSCLEAN = 8192 : remove redundant namespaces declarations XML_PARSE_NOCDATA = 16384 : merge CDATA as text nodes >> - the prefix of the module should not be parse-xml anymore because there are >> not only parsing-related functions in the module > What would be a a good prefix? x >> - the function probably shouldn't raise any errors form the spec (i.e. >> FODC0006) > I thought that message fit the error, is there another one better for it or > should I add one to the diagnostic? I think you should define a new one. Matthias -- https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core/+merge/135777 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
I assume using made-up exit codes was so the new information could fit into the existing result schema, for backwards compatibility. Still, I think it probably would be better to improve the schema and bump the module version number. If there is any way for the results to be the same on posix and Windows that'd be ideal. Also, I would like there to be a test case for this, including invoking a program that segfaults and getting a result. I'm not sure if this could be done cross-platform but it'd be good to try. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
The proposal to merge lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
The attempt to merge lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module failed. Below is the output from the failed tests. CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message): Validation queue job bug1086323-processExitCode-2012-12-04T19-47-40.632Z is finished. The final status was: 4 tests did not succeed - changes not commited. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
Review: Needs Fixing 1. Why return made-up numbers, e.g., -1000, etc? Why not simply return the actual exit status? Of course this implies that you'd have to implement XQuery functions that do the equivalent of the W* macros. Either that, or return XML data, e.g.: or: 2. When you throw the USER_EXCEPTION, why not include the actual OS-level error message? There is code in src/util/error_util.h. Yes, this implies that this code would have to be moved to the public API. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug1086323-processExitCode-2012-12-04T19-47-40.632Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
The proposal to merge lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module has been updated. Description changed to: Fix for bug 1086323. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
The proposal to merge lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module has been updated. Commit Message changed to: Fix for bug 1086323. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
The proposal to merge lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. -- 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:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module
Cezar Andrei has proposed merging lp:~zorba-coders/zorba/bug1086323-processExitCode into lp:zorba/process-module. Commit message: Fix for bug 1086323. Requested reviews: Sorin Marian Nasoi (sorin.marian.nasoi) Paul J. Lucas (paul-lucas) Related bugs: Bug #1086323 in Zorba: "Process module: exit code reporting is broken" https://bugs.launchpad.net/zorba/+bug/1086323 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Fix for bug 1086323. -- https://code.launchpad.net/~zorba-coders/zorba/bug1086323-processExitCode/+merge/137966 Your team Zorba Coders is subscribed to branch lp:zorba/process-module. === modified file 'src/com/zorba-xquery/www/modules/process.xq' --- src/com/zorba-xquery/www/modules/process.xq 2012-09-27 16:53:40 + +++ src/com/zorba-xquery/www/modules/process.xq 2012-12-04 19:46:25 + @@ -56,6 +56,11 @@ : @return the result of the execution as an element as : shown in the documentation of this module. The exit-code : element returns the exit code of the child process. + : For POSIX compliant platforms: returns the process exit code. If process is + : terminated: (-1000) - termination signal code. If process is stoped: + : (-2000) - stop signal code or -1999 othewise. + : For Windows platforms: returns the return value of the process or the exit + : or terminate process specified value. : : @error process:PROC01 if an error occurred while communicating : with the executed process. @@ -75,6 +80,11 @@ : @return the result of the execution as an element as : shown in the documentation of this module. The exit-code : element returns the exit code of the child process. + : For POSIX compliant platforms: returns the process exit code. If process is + : terminated: (-1000) - termination signal code. If process is stoped: + : (-2000) - stop signal code or -1999 othewise. + : For Windows platforms: returns the return value of the process or the exit + : or terminate process specified value. : : @error process:PROC01 if an error occurred while communicating : with the executed process. === modified file 'src/com/zorba-xquery/www/modules/process.xq.src/process.cpp' --- src/com/zorba-xquery/www/modules/process.xq.src/process.cpp 2012-07-21 01:09:37 + +++ src/com/zorba-xquery/www/modules/process.xq.src/process.cpp 2012-12-04 19:46:25 + @@ -257,7 +257,7 @@ }; //start child process - BOOL ok=create_child_process(lStdOut,lStdErr,aCommand,lChildProcessInfo); + BOOL ok = create_child_process(lStdOut,lStdErr,aCommand,lChildProcessInfo); if(ok==TRUE) { @@ -424,6 +424,7 @@ "http://www.zorba-xquery.com/modules/process";, "PROC01"); throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str()); } + exit_code = code; #else //not WIN32 @@ -470,36 +471,33 @@ int stat = 0; -waitpid(pid, &stat, 0); -/*pid_t w; -do -{ - w = waitpid(pid, &stat, WUNTRACED | WCONTINUED); - if (w == -1) - { - perror("waitpid"); - exit(EXIT_FAILURE); - } +pid_t w = waitpid(pid, &stat, 0); + +if (w == -1) +{ +std::stringstream lErrorMsg; +lErrorMsg << "Failed to wait for child process "; +Item lQName = ProcessModule::getItemFactory()->createQName( + "http://www.zorba-xquery.com/modules/process";, "PROC01"); +throw USER_EXCEPTION(lQName, lErrorMsg.str().c_str()); +} - if (WIFEXITED(stat)) - { - printf("exited, status=%d\n", WEXITSTATUS(stat)); - } - else if (WIFSIGNALED(stat)) - { - printf("killed by signal %d\n", WTERMSIG(stat)); - } - else if (WIFSTOPPED(stat)) - { - printf("stopped by signal %d\n", WSTOPSIG(stat)); - } - else if (WIFCONTINUED(stat)) - { - printf("continued\n"); - } -} while (!WIFEXITED(stat) && !WIFSIGNALED(stat)); -*/ -exit_code = WEXITSTATUS(stat); +if (WIFEXITED(stat)) +{ +exit_code = WEXITSTATUS(stat); +} +else if (WIFSIGNALED(stat)) +{ +exit_code = -1000 - WTERMSIG(stat); +} +else if (WIFSTOPPED(stat)) +{ +exit_code = -2000 - WSTOPSIG(stat); +} +else +{ +exit_code = -1999; +} } #endif // WIN32 -- 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:~zorba-coders/zorba/canonicalize-core into lp:zorba
Hi > - remove from modules/w3c/xpath_functions.xq (it's not defined in the XQuery > FOTS spec) Sorry my mistake, I did it for testing because the function as not being detected and forgot to remove it. > - the function should handle streamable strings as well > - does canonicalization allow for options? If so, we should expose them Yes it have encoding and some options http://xmlsoft.org/html/libxml-parser.html#xmlParserOption, should I add them? > - the prefix of the module should not be parse-xml anymore because there are > not only parsing-related functions in the module What would be a a good prefix? > - the function probably shouldn't raise any errors form the spec (i.e. > FODC0006) I thought that message fit the error, is there another one better for it or should I add one to the diagnostic? > - the special state is not needed (theDocString doesn't seem to be used > anyway) Removing it. > - the function doesn't access the dynamic context, hence the > zorba:accessesDynCtx element can be removed from the spec I know I removed this from the description of the function, but as soon as I removed it the implementation was not being linked with the function. I will take a look. > - the condition 'if (consumeNext(result, theChildren[0].getp(), planState))' > can be removed because the function is guaranteed to get one result Removing it -- https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core/+merge/135777 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:~zorba-coders/zorba/xml-in-json-indices into lp:zorba
Review: Needs Fixing -- https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548 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:~zorba-coders/zorba/xml-in-json-indices into lp:zorba
In detachFromCollection(), you declare a local TreeId. A TreeId is currently defined as a typedef for a ulong. Defining a local variable of a C++ built-in type does no initialization, so the value of lTreeId is garbage. -- https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548 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:~zorba-coders/zorba/xml-in-json-indices into lp:zorba
Why are .h files listed in the CMakefiles? You don't need to do that. The CMake system figures out the .h dependences from the specified .cpp files. Remove the .h dependencies. -- https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548 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