Hi!
We are importing C++ code in Moose and are bumping into problem when using Chef. packageScope is missing on FAMIXFunction. We could have something like:
FAMIXFunction>>packageScope ^ self declatedType ifNotNil: [ self declatedType packageScope ] ifNil: [ nil ]
Any better idea?
Cheers, Alexandre
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.
But, how are you importing c++?
Cheers, Doru
On Dec 9, 2011, at 17:21, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
We are importing C++ code in Moose and are bumping into problem when using Chef. packageScope is missing on FAMIXFunction. We could have something like:
FAMIXFunction>>packageScope ^ self declatedType ifNotNil: [ self declatedType packageScope ] ifNil: [ nil ]
Any better idea?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
We are importing MSE files generated with inFusion. Cheers, Santiago
2011/12/9 Tudor Girba tudor@tudorgirba.com
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.
But, how are you importing c++?
Cheers, Doru
On Dec 9, 2011, at 17:21, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
We are importing C++ code in Moose and are bumping into problem when
using Chef.
packageScope is missing on FAMIXFunction. We could have something like:
FAMIXFunction>>packageScope ^ self declatedType ifNotNil: [ self declatedType packageScope ] ifNil: [ nil ]
Any better idea?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.
I inspired myself from:
FAMIXMethod>>packageScope
^ self parentPackage ifNil:[ |cl| cl := self parentType. cl isNil ifTrue:[nil] ifFalse:[cl packageScope] ]
So, what the definition of FAMIXFunction>>packageScope should look like?
Cheers, Alexandre
On Dec 9, 2011, at 17:21, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
We are importing C++ code in Moose and are bumping into problem when using Chef. packageScope is missing on FAMIXFunction. We could have something like:
FAMIXFunction>>packageScope ^ self declatedType ifNotNil: [ self declatedType packageScope ] ifNil: [ nil ]
Any better idea?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
On 9 Dec 2011, at 19:41, Alexandre Bergel wrote:
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.
I inspired myself from:
FAMIXMethod>>packageScope
^ self parentPackage ifNil:[ |cl| cl := self parentType. cl isNil ifTrue:[nil] ifFalse:[cl packageScope] ]
But, this is completely not the same as what you proposed for function. packageScope returns the parentPackage of the parent class. If you look for the parentPackage of what the function returns, you end up in a completely different place.
So, what the definition of FAMIXFunction>>packageScope should look like?
There is no notion of packageScope for a Function, so it should return nil in this case.
Cheers, Doru
Cheers, Alexandre
On Dec 9, 2011, at 17:21, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
We are importing C++ code in Moose and are bumping into problem when using Chef. packageScope is missing on FAMIXFunction. We could have something like:
FAMIXFunction>>packageScope ^ self declatedType ifNotNil: [ self declatedType packageScope ] ifNil: [ nil ]
Any better idea?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
Innovation comes in least expected form. That is, if it is expected, it already happened.
So, what the definition of FAMIXFunction>>packageScope should look like?
There is no notion of packageScope for a Function, so it should return nil in this case.
I added -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= FAMIXFunction>>packageScope "No package scope for functions"
^ nil -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
in Famix-Core-AlexandreBergel.188
This could always be adjusted in the future when one need to analyze languages that has scoped function (e.g., Racket)
Cheers, Alexandre