Hi,
We have improved MooseChef with a generic version MooseQuery.
In the following when we talk about MooseChef, it means the current version available by default in Moose. When we talk about MooseQuery, it means the generic improved version, available on Anne’s smalltalkHub repository.
All the tests of MooseChef except 4 are passing when using our new MooseQuery API.
These four tests concern the same point package scope for extension method.
Considering classA having a method methodA1 calling a method methodBExt1 that extends classB.
classB is defined in pckgB and its extension method by pckgC.
Considering the two following requests:
1. classA queryOutgoingInvocation atClassScope atPackageScope
2. classA queryOutgoingInvocation atPackageScope
To the first query, MooseChef and MooseQuery answer the same: pckgB
To the second query, MooseChef answers pckgC and MooseQuery answers pckgB and pckgC.
So first question: What is the expected behavior? What do we want?
According to us, MooseQuery behavior is more consistent.
***************
Considering now Java code.
class1 contains a method method1 which in its turn contains an inner class innerClass2. innerClass2 contains 2 methods method21 and method22.
the following query:
innerClass2 methodScope
In MooseChef this query has for result method21 and method22.
The following query:
innerClass2 atScope: FAMIXMethod
In MooseQuery this query has for result method1. Indeed, the atScope: method look for the container (also called parent).
So the second question: what is the expected behavior? Do we want like in MooseQuery that atScope: by default always goes up in the containment tree since it is a generic version of atTypeScope, atPackageScope... and do we want another method to goes down in the containment tree?
In MooseChef, methodScope, always goes down to look for the contained methods. typeScope always goes up except for ScopingEntities. These methods have been implemented for each type of entities. It is what we want to avoid with MooseQuery.
******************
It is clear that Synectique will soon migrate to this new version and that our project of SQL analysis will also use it. Please don’t hesitate to use it.
MCHttpRepository
location: 'http://smalltalkhub.com/mc/AnneEtien/MooseQueryDraft/main'
user: ''
password: ‘'
We will do as soon as possible a small doc to explain the usage.
Thank you in advance for your answer to our questions.