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

Proposed by Matthias Brantner on 2011-11-28
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 on 2011-11-28
William Candillon 2011-11-28 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.
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
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.

review: Approve
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 on 2011-11-29

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 on 2011-11-29

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

10559. By Sorin Marian Nasoi on 2011-11-29

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

10560. By Matthias Brantner on 2011-11-29

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

10561. By Juan Zacarias on 2011-11-30

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 on 2011-11-30

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

10563. By Matthias Brantner on 2011-11-30

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

10564. By William Candillon on 2011-11-30

Fix bug #897825 Approved: Rodolfo Ochoa, Matthias Brantner

10565. By Matthias Brantner on 2011-11-30

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

10566. By Chris Hillery on 2011-11-30

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

10567. By Chris Hillery on 2011-12-01

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

10568. By Chris Hillery on 2011-12-01

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 on 2011-12-01

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

10570. By Matthias Brantner on 2011-12-02

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

10571. By Markos Zaharioudakis on 2011-12-05

small optimization of the group by Approved: Markos Zaharioudakis

10572. By Matthias Brantner on 2011-12-05

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

10573. By Matthias Brantner on 2011-12-05

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

10574. By Chris Hillery on 2011-12-05

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 on 2011-12-06

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

10576. By Paul J. Lucas on 2011-12-06

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

10577. By Matthias Brantner on 2011-12-07

fix build on windows Approved: Juan Zacarias, Matthias Brantner

10578. By Paul J. Lucas on 2011-12-08

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

10579. By Matthias Brantner on 2011-12-09

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

10580. By Markos Zaharioudakis on 2011-12-09

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

10581. By Matthias Brantner on 2011-12-12

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

10582. By Matthias Brantner on 2011-12-13

- 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 on 2011-12-14

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

10584. By Paul J. Lucas on 2011-12-15

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
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-11-23 22:25:05 +0000
3+++ ChangeLog 2011-11-28 20:48:35 +0000
4@@ -38,6 +38,7 @@
5 * Fixed bug #3290122 (ZDST0003 needs collection name)
6 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all
7 updates have been applied).
8+ * Don't raise warnings for unknown annotations.
9 * Fixed bug #3409344 (during detach, if the node being detached is the root of
10 its tree, it should be detached from the tree as well; otherwise memory
11 corruption will occur)
12
13=== modified file 'doc/cxx/examples/errors.cpp'
14--- doc/cxx/examples/errors.cpp 2011-08-11 05:11:12 +0000
15+++ doc/cxx/examples/errors.cpp 2011-11-28 20:48:35 +0000
16@@ -139,12 +139,12 @@
17 // make sure that the warning zwarn::ZWST0002 is turned
18 // into an error
19 StaticContext_t lCtx = aZorba->createStaticContext();
20- lCtx->declareOption(lQName, "ZWST0002");
21+ lCtx->declareOption(lQName, "ZWST0003");
22
23 std::ostringstream s;
24- s << "declare namespace unknown = 'unknown-annotation';" << std::endl
25- << "declare %unknown:test variable $var := 3;" << std::endl
26- << "$var" << std::endl;
27+ s << "declare namespace z = 'http://www.zorba-xquery.com/annotations';" << std::endl
28+ << "declare %z:sequential function local:foo() { 1 };" << std::endl
29+ << "local:foo()" << std::endl;
30 XQuery_t lQuery = aZorba->compileQuery(s.str(), lCtx);
31
32 std::cout << lQuery << std::endl;
33
34=== modified file 'src/compiler/translator/translator.cpp'
35--- src/compiler/translator/translator.cpp 2011-11-24 10:18:51 +0000
36+++ src/compiler/translator/translator.cpp 2011-11-28 20:48:35 +0000
37@@ -3811,24 +3811,10 @@
38 if (AnnotationInternal::lookup(lExpandedQName) == AnnotationInternal::zann_end)
39 {
40 RAISE_ERROR(err::XQST0045, loc,
41- ERROR_PARAMS( "%" + (lExpandedQName->getPrefix().empty() ?
42- "\'" + lExpandedQName->getNamespace() + "\'"
43- : lExpandedQName->getPrefix())
44- + ":" + lExpandedQName->getLocalName()));
45+ ERROR_PARAMS( "%" + ("\"" + lExpandedQName->getNamespace() + "\""
46+ + ":" + lExpandedQName->getLocalName())));
47 }
48 }
49- else
50- {
51- // annotation in unknown namespace -- generate a warning
52- theCCB->theXQueryDiagnostics->add_warning(
53- NEW_XQUERY_WARNING(
54- zwarn::ZWST0002_UNKNOWN_ANNOTATION,
55- WARN_PARAMS( "%" + (lExpandedQName->getPrefix().empty() ?
56- "\'" + lExpandedQName->getNamespace() + "\'"
57- : lExpandedQName->getPrefix())
58- + ":" + lExpandedQName->getLocalName()),
59- WARN_LOC(loc)));
60- }
61
62 std::vector<rchandle<const_expr> > lLiterals;
63
64
65=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec'
66--- test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec 2011-07-12 23:32:16 +0000
67+++ test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec 2011-11-28 20:48:35 +0000
68@@ -1,1 +1,1 @@
69-Error: http://www.zorba-xquery.com/warnings:ZWST0002
70+Error: http://www.zorba-xquery.com/warnings:ZWST0003
71
72=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq'
73--- test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq 2011-07-12 23:32:16 +0000
74+++ test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq 2011-11-28 20:48:35 +0000
75@@ -1,7 +1,11 @@
76-declare namespace unknown = "unknown-annotation";
77+declare namespace zann = "http://www.zorba-xquery.com/annotations";
78 declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";
79-declare option zwarn:error "ZWST0002";
80-
81-declare %unknown:test variable $var := 3;
82-
83-$var
84+declare option zwarn:error "ZWST0003";
85+
86+declare %zann:sequential function local:foo()
87+{
88+ 1
89+};
90+
91+local:foo()
92+
93
94=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec'
95--- test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec 2011-07-12 23:32:16 +0000
96+++ test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec 2011-11-28 20:48:35 +0000
97@@ -1,2 +1,2 @@
98-Error: http://www.zorba-xquery.com/warnings:ZWST0002
99+Error: http://www.zorba-xquery.com/warnings:ZWST0003
100
101
102=== modified file 'test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq'
103--- test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq 2011-07-12 23:32:16 +0000
104+++ test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq 2011-11-28 20:48:35 +0000
105@@ -1,9 +1,12 @@
106-declare namespace unknown = "unknown-annotation";
107+declare namespace zann = "http://www.zorba-xquery.com/annotations";
108 declare namespace zwarn = "http://www.zorba-xquery.com/options/warnings";
109 declare option zwarn:enable "all";
110-declare option zwarn:error "ZWST0002";
111-
112-declare %unknown:test variable $var := 3;
113-
114-$var
115+declare option zwarn:error "ZWST0003";
116+
117+declare %zann:sequential function local:foo()
118+{
119+ 1
120+};
121+
122+local:foo()
123

Subscribers

People subscribed via source and target branches