Merge lp:~matthias-brantner/zorba/bug-fixing into lp:zorba

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~matthias-brantner/zorba/bug-fixing
Merge into: lp:zorba
Diff against target: 122 lines (+28/-34)
7 files modified
ChangeLog (+1/-0)
doc/cxx/examples/errors.cpp (+4/-4)
src/compiler/translator/translator.cpp (+2/-16)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq (+10/-6)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq (+9/-6)
To merge this branch: bzr merge lp:~matthias-brantner/zorba/bug-fixing
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
William Candillon Pending
Review via email: mp+83681@code.launchpad.net

This proposal supersedes a proposal from 2011-11-28.

This proposal has been superseded by a proposal from 2011-11-28.

Commit message

Do not raise warnings for unknown annotations in unknown namespaces

Description of the change

- Do not raise warnings for unknown annotations in unknown namespaces
- Improved error message for wrong annotations

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~matthias-brantner/zorba/bug-fixing into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bug-fixing-2011-11-28T20-13-15.46Z is finished. The
  final status was:

  3 tests did not succeed - changes not commited.

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

10557. By Markos Zaharioudakis

fixed a performance bug in the implementation of groupby: no node copying for non-groupby vars Approved: Matthias Brantner, Markos Zaharioudakis

10558. By Sorin Marian Nasoi

Fix for bug #897619. Approved: Markos Zaharioudakis, Sorin Marian Nasoi

10559. By Sorin Marian Nasoi

Fix for bug #897616. Approved: Nicolae Brinza, Sorin Marian Nasoi

10560. By Matthias Brantner

Do not raise warnings for unknown annotations in unknown namespaces Approved: Nicolae Brinza, William Candillon, Matthias Brantner

10561. By Juan Zacarias

API changes
Removed isBoundExternalVariable from xquery.h
Added 2 functions to dynamic_context.h
isBoundContextItem and isBoundExternalVariable Approved: Matthias Brantner, Markos Zaharioudakis

10562. By Daniel Turcanu

fn:analyze-string fix
also, adding config.h include to ensure correct error messages Approved: Chris Hillery, Matthias Brantner

10563. By Matthias Brantner

fix for building modules outside of Zorba Approved: Chris Hillery, Matthias Brantner

10564. By William Candillon

Fix bug #897825 Approved: Rodolfo Ochoa, Matthias Brantner

10565. By Matthias Brantner

Unmarked XQueryX fn-put-005-fail as expected to fail in CMake. Approved: Chris Hillery, Matthias Brantner

10566. By Chris Hillery

Update ExternalModules.conf to download modules tagged 'zorba-2.1'. Approved: Matthias Brantner, Chris Hillery

10567. By Chris Hillery

fix for installing and using modules on windows Approved: Chris Hillery, Matthias Brantner

10568. By Chris Hillery

Separate check_uris into check_core_uris and check_uris. zorbacmd depends on check_core_uris, so non-core modules may depend on zorbacmd and be assured that the Zorba executable is fully functional. Approved: Matthias Brantner, Chris Hillery

10569. By Chris Hillery

Fix reversed URI installation directories. Approved: Matthias Brantner, Chris Hillery

10570. By Matthias Brantner

fix for bug #898064 Approved: Nicolae Brinza, William Candillon

10571. By Markos Zaharioudakis

small optimization of the group by Approved: Markos Zaharioudakis

10572. By Matthias Brantner

made destructors of Item subclasses virtual Approved: Markos Zaharioudakis, Matthias Brantner

10573. By Matthias Brantner

optimization: only have exactly two instances of boolean items in the simple store Approved: Markos Zaharioudakis, Matthias Brantner

10574. By Chris Hillery

Only create check_core_uris and associated dependencies if there are any core URIs (to prevent creating this target in standalone module projects).
 Approved: Juan Zacarias, Chris Hillery

10575. By Paul J. Lucas

undo previous changes and mark bug as expected to fail. Approved: Paul J. Lucas, Matthias Brantner

10576. By Paul J. Lucas

Things should be reverted now. Approved: Matthias Brantner, Paul J. Lucas

10577. By Matthias Brantner

fix build on windows Approved: Juan Zacarias, Matthias Brantner

10578. By Paul J. Lucas

Fixed build. Approved: Matthias Brantner, Paul J. Lucas

10579. By Matthias Brantner

exclude .bzr dir from source packages Approved: Cezar Andrei, Matthias Brantner

10580. By Markos Zaharioudakis

Cleaned up unused stuff in debugger_expr Approved: Gabriel Petrovay, Markos Zaharioudakis

10581. By Matthias Brantner

removed obsolete code guarded by the USE_POS macro Approved: Markos Zaharioudakis, Matthias Brantner

10582. By Matthias Brantner

- automatic caching of recursive, non-sequential, and deterministic functions with atomic parameter and return types
- %ann:cache and %ann:no-cache for controlling function result caching Approved: Markos Zaharioudakis, Matthias Brantner

10583. By Markos Zaharioudakis

Optimized and cleaned up SimpleTempSeq implementation and its usage. Approved: Markos Zaharioudakis

10584. By Paul J. Lucas

Applied William's patch; patched William's patch to handle UTF-8 properly. Approved: William Candillon, Paul J. Lucas

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2011-11-23 22:25:05 +0000
+++ ChangeLog 2011-11-28 20:48:35 +0000
@@ -38,6 +38,7 @@
38 * Fixed bug #3290122 (ZDST0003 needs collection name)38 * Fixed bug #3290122 (ZDST0003 needs collection name)
39 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all39 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all
40 updates have been applied).40 updates have been applied).
41 * Don't raise warnings for unknown annotations.
41 * Fixed bug #3409344 (during detach, if the node being detached is the root of42 * Fixed bug #3409344 (during detach, if the node being detached is the root of
42 its tree, it should be detached from the tree as well; otherwise memory43 its tree, it should be detached from the tree as well; otherwise memory
43 corruption will occur)44 corruption will occur)
4445
=== modified file 'doc/cxx/examples/errors.cpp'
--- doc/cxx/examples/errors.cpp 2011-08-11 05:11:12 +0000
+++ doc/cxx/examples/errors.cpp 2011-11-28 20:48:35 +0000
@@ -139,12 +139,12 @@
139 // make sure that the warning zwarn::ZWST0002 is turned139 // make sure that the warning zwarn::ZWST0002 is turned
140 // into an error140 // into an error
141 StaticContext_t lCtx = aZorba->createStaticContext();141 StaticContext_t lCtx = aZorba->createStaticContext();
142 lCtx->declareOption(lQName, "ZWST0002");142 lCtx->declareOption(lQName, "ZWST0003");
143143
144 std::ostringstream s;144 std::ostringstream s;
145 s << "declare namespace unknown = 'unknown-annotation';" << std::endl145 s << "declare namespace z = 'http://www.zorba-xquery.com/annotations';" << std::endl
146 << "declare %unknown:test variable $var := 3;" << std::endl146 << "declare %z:sequential function local:foo() { 1 };" << std::endl
147 << "$var" << std::endl;147 << "local:foo()" << std::endl;
148 XQuery_t lQuery = aZorba->compileQuery(s.str(), lCtx); 148 XQuery_t lQuery = aZorba->compileQuery(s.str(), lCtx);
149149
150 std::cout << lQuery << std::endl;150 std::cout << lQuery << std::endl;
151151
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2011-11-24 10:18:51 +0000
+++ src/compiler/translator/translator.cpp 2011-11-28 20:48:35 +0000
@@ -3811,24 +3811,10 @@
3811 if (AnnotationInternal::lookup(lExpandedQName) == AnnotationInternal::zann_end)3811 if (AnnotationInternal::lookup(lExpandedQName) == AnnotationInternal::zann_end)
3812 {3812 {
3813 RAISE_ERROR(err::XQST0045, loc,3813 RAISE_ERROR(err::XQST0045, loc,
3814 ERROR_PARAMS( "%" + (lExpandedQName->getPrefix().empty() ?3814 ERROR_PARAMS( "%" + ("\"" + lExpandedQName->getNamespace() + "\""
3815 "\'" + lExpandedQName->getNamespace() + "\'"3815 + ":" + lExpandedQName->getLocalName())));
3816 : lExpandedQName->getPrefix())
3817 + ":" + lExpandedQName->getLocalName()));
3818 }3816 }
3819 }3817 }
3820 else
3821 {
3822 // annotation in unknown namespace -- generate a warning
3823 theCCB->theXQueryDiagnostics->add_warning(
3824 NEW_XQUERY_WARNING(
3825 zwarn::ZWST0002_UNKNOWN_ANNOTATION,
3826 WARN_PARAMS( "%" + (lExpandedQName->getPrefix().empty() ?
3827 "\'" + lExpandedQName->getNamespace() + "\'"
3828 : lExpandedQName->getPrefix())
3829 + ":" + lExpandedQName->getLocalName()),
3830 WARN_LOC(loc)));
3831 }
38323818
3833 std::vector<rchandle<const_expr> > lLiterals;3819 std::vector<rchandle<const_expr> > lLiterals;
38343820
38353821
=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec'
--- test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec 2011-07-12 23:32:16 +0000
+++ test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec 2011-11-28 20:48:35 +0000
@@ -1,1 +1,1 @@
1Error: http://www.zorba-xquery.com/warnings:ZWST00021Error: http://www.zorba-xquery.com/warnings:ZWST0003
22
=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq'
--- test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq 2011-07-12 23:32:16 +0000
+++ test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq 2011-11-28 20:48:35 +0000
@@ -1,7 +1,11 @@
1declare namespace unknown = "unknown-annotation";1declare namespace zann = "http://www.zorba-xquery.com/annotations";
2declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";2declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";
3declare option zwarn:error "ZWST0002";3declare option zwarn:error "ZWST0003";
44
5declare %unknown:test variable $var := 3;5declare %zann:sequential function local:foo()
66{
7$var7 1
8};
9
10local:foo()
11
812
=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec'
--- test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec 2011-07-12 23:32:16 +0000
+++ test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec 2011-11-28 20:48:35 +0000
@@ -1,2 +1,2 @@
1Error: http://www.zorba-xquery.com/warnings:ZWST00021Error: http://www.zorba-xquery.com/warnings:ZWST0003
22
33
=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq'
--- test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq 2011-07-12 23:32:16 +0000
+++ test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq 2011-11-28 20:48:35 +0000
@@ -1,9 +1,12 @@
1declare namespace unknown = "unknown-annotation";1declare namespace zann = "http://www.zorba-xquery.com/annotations";
2declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";2declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";
3declare option zwarn:enable "all";3declare option zwarn:enable "all";
4declare option zwarn:error "ZWST0002";4declare option zwarn:error "ZWST0003";
55
6declare %unknown:test variable $var := 3;6declare %zann:sequential function local:foo()
77{
8$var8 1
9};
10
11local:foo()
912

Subscribers

People subscribed via source and target branches