Build of researchr (trunk) with webdsl compiler from javazip revision 939292 gives numerous error messages of previously fine code; seems some issue with compatibility of collection types.


* review/review-ui.app:147/14: error: type of review.groups (Set) should be compatible with type in collection g | g : Usergroup in securityContext.principal.member order by g.name
select ( review.groups from
[ g | g : Usergroup in securityContext.principal.member order by g.name ] )
* review/review-ui.app:153/14: error: type of review.bibliographies (Set) should be compatible with type in collection
bib | bib : Bibliography in securityContext.principal.bibliographies order by bib.name
select ( review.bibliographies from
[ bib | bib : Bibliography in securityContext.principal.bibliographies order by bib.name ]
)
* publication-list/publication-list-data.app:9/6: error: The expression of the derived property usedFacets should have type Set
usedFacets -> Set := [ f | f : PublicationListFacet in facets where f.inUse ]
* publication-list/publication-list-data.app:227/6: error: The return statement in function topCategories should have type Set
function topCategories ( ) : Set
{
return [ cat | cat : PublicationCategory in this.categories where cat.size > 0 && cat.size < list.publications.length order by cat.size desc limit 40 ];
}
* publication/journal-data.app:36/6: error: The expression of the derived property unidentifiedArticles should have type Set


unidentifiedArticles -> Set := [ pub | pub : Article in this.articles where pub.journal == null ]
* publication/entry-data.app:23/6: error: The return statement in function unresolvedEntries should have type Set
function unresolvedEntries ( ) : Set
{
return [ e | e : Entry in entries where e.referenceOf == null ];
}
* publication/entry-data.app:165/6: error: The return statement in function findSimilar should have type Set
function findSimilar ( ) : Set
{
if ( year == """" )
{
return [ pub | pub : Publication in searchPublication(title, 5).set() where pub.aliasOf == null ];
}
return [ pub | pub : Publication in searchPublication(title, 10).set() where pub.aliasOf == null && pub.year == year ];
}
* publication/entry-data.app:234/5: error: The return statement in function findSimilar should have type Set
function findSimilar ( ) : Set
{
if ( title == """" )
{
return searchPublication(reference, 5).set();
}
else
{
if ( year == """" )
{
return searchPublication(title, 5).set();
}
return [ pub | pub : Publication in searchPublication(title, 10).set() where pub.year == year ];
}
}
* publication/citation-data.app:13/6: error: The return statement in function backwardReferences should have type Set
function backwardReferences ( ) : Set
{
return [ ref.references | ref : Reference in citationsFrom where ref.references != null ];
}
* publication/citation-data.app:16/6: error: The return statement in function forwardReferences should have type Set
function forwardReferences ( ) : Set
{
return [ ref.referencedBy | ref : Reference in citationsTo where ref.referencedBy != null ];
}
* bibliography/classification-ui.app:177/16: error: type of c.labels (Set) should be compatible with type in collection l | l : Label in c.lscheme.labels order by l.order asc
select ( c.labels from
[ l | l : Label in c.lscheme.labels order by l.order asc ] )
* servletapp/src-webdsl-template/built-in.app:189/19: error: No function ‘getUniqueTemplateId’ with signature getUniqueTemplateId()
getUniqueTemplateId()
* servletapp/src-webdsl-template/built-in.app:190/25: error: No function ‘getRequestParameter’ with signature getRequestParameter(unknown)
getRequestParameter(rname)
* servletapp/src-webdsl-template/built-in.app:362/30: error: No function ‘getUniqueTemplateId’ with signature getUniqueTemplateId()
getUniqueTemplateId()
* servletapp/src-webdsl-template/built-in.app:543/19: error: No function ‘getUniqueTemplateId’ with signature getUniqueTemplateId()
getUniqueTemplateId()
* servletapp/src-webdsl-template/built-in.app:544/17: error: No function ‘getRequestParameter’ with signature getRequestParameter(unknown)
getRequestParameter(tname)
* servletapp/src-webdsl-template/built-in.app:550/10: error: Template with signature datepickerinput(Date, String, unknown, String, String) not defined
datepickerinput(d, dateformat, tname, picker, options)[all attributes]
* servletapp/src-webdsl-template/built-in.app:554/8: error: Template with signature datepickerinput(Date, String, unknown, String, String) not defined
datepickerinput(d, dateformat, tname, picker, options)[all attributes]
* servletapp/src-webdsl-template/built-in.app:557/11: error: Wrong operand types for operator NotEq: req has type unknown,null has type Null
req != null
* servletapp/src-webdsl-template/built-in.app:558/13: error: Wrong operand types for operator NotEq: req has type unknown,"""" has type String
req != """"
* servletapp/src-webdsl-template/built-in.app:558/24: error: No function ‘parseDate’ for ‘req’ with signature parseDate(String)
req.parseDate(dateformat)
* servletapp/src-webdsl-template/built-in.app:566/13: error: No function ‘inLabelContext’ with signature inLabelContext()
inLabelContext()
* servletapp/src-webdsl-template/built-in.app:568/14: error: No function ‘addLabelError’ with signature addLabelError(String)
addLabelError(s)
* servletapp/src-webdsl-template/built-in.app:600/11: error: No function ‘inLabelContext’ with signature inLabelContext()
inLabelContext()
* servletapp/src-webdsl-template/built-in.app:601/13: error: No function ‘getLabelString’ with signature getLabelString()
getLabelString()
: [user/system] = [59.62s/0.00s]

Submitted by Eelco Visser on 26 February 2011 at 15:20

On 28 February 2011 at 18:31 Danny Groenewegen commented:

This is intended, the list comprehension construct [x|x:type in collection] now always returns a List. Just add [x|x:type in collection].set() if you wanted a Set instead.

You also need to do a webdsl cleanall to get rid of the other errors.


On 1 June 2011 at 12:57 Danny Groenewegen closed this issue.

Log in to post comments