Understanding provides/requires

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding provides/requires

garduino
Hi:

I'm trying to understand the whole picture of this new feature (named Feature :)  and I can not figure out the correct way of obtain the #requires specification of a package.

This seems not be on CodePackage, but in CodePackageFile.

A bit of clarification about this will help me!

Thanks.

--
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
bpi
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

bpi
Hi Germán,

I found the following class diagram helpful:

CodePackageFile seems to be used only temporarily. All the Features seem to be referenced indirectly by the InstalledPackages class variable in CodePackage.

My feeling is that the functionality could be implemented a bit more clearly with fewer classes. E.g. FeatureSpec is just a data class. I found it difficult at first to understand the differences between FeatureSpec, Feature and FeatureRequirement.

However, that is just nitpicking. The functionality is really cool. Thanks Ken and Juan!

Cheers,
Bernhard

Am 13.08.2013 um 18:34 schrieb Germán Arduino:

Hi:

I'm trying to understand the whole picture of this new feature (named Feature :)  and I can not figure out the correct way of obtain the #requires specification of a package.

This seems not be on CodePackage, but in CodePackageFile.

A bit of clarification about this will help me!

Thanks.

-- 
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com
_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

Hannes Hirzel
Thank you Bernhard for the diagram and explanation. A contribution to
the upcoming documentation on the Cuis-Smalltalk web site :-)

--Hannes

On 8/13/13, Bernhard Pieber <[hidden email]> wrote:

> Hi Germán,
>
> I found the following class diagram helpful:
>
>
> CodePackageFile seems to be used only temporarily. All the Features seem to
> be referenced indirectly by the InstalledPackages class variable in
> CodePackage.
>
> My feeling is that the functionality could be implemented a bit more clearly
> with fewer classes. E.g. FeatureSpec is just a data class. I found it
> difficult at first to understand the differences between FeatureSpec,
> Feature and FeatureRequirement.
>
> However, that is just nitpicking. The functionality is really cool. Thanks
> Ken and Juan!
>
> Cheers,
> Bernhard
>
> Am 13.08.2013 um 18:34 schrieb Germán Arduino:
>
>> Hi:
>>
>> I'm trying to understand the whole picture of this new feature (named
>> Feature :)  and I can not figure out the correct way of obtain the
>> #requires specification of a package.
>>
>> This seems not be on CodePackage, but in CodePackageFile.
>>
>> A bit of clarification about this will help me!
>>
>> Thanks.
>>
>> --
>> Saludos / Regards,
>> Germán Arduino
>> www.arduinosoftware.com
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

garduino
In reply to this post by bpi
Hi Bernhard:

Thanks for the explanation, very useful to me!

I put a self halt in the browse command of the Installed Packages Browser, to work with the "current" package and at this level, I'm having trouble to find the "requires" in a direct way (at this package level).

I'm seeing the dictionary on the class level of CodePackage but seems not that I need.

I will investigate a bit more.

Thanks!



2013/8/13 Bernhard Pieber <[hidden email]>
Hi Germán,

I found the following class diagram helpful:

CodePackageFile seems to be used only temporarily. All the Features seem to be referenced indirectly by the InstalledPackages class variable in CodePackage.

My feeling is that the functionality could be implemented a bit more clearly with fewer classes. E.g. FeatureSpec is just a data class. I found it difficult at first to understand the differences between FeatureSpec, Feature and FeatureRequirement.

However, that is just nitpicking. The functionality is really cool. Thanks Ken and Juan!

Cheers,
Bernhard

Am 13.08.2013 um 18:34 schrieb Germán Arduino:

Hi:

I'm trying to understand the whole picture of this new feature (named Feature :)  and I can not figure out the correct way of obtain the #requires specification of a package.

This seems not be on CodePackage, but in CodePackageFile.

A bit of clarification about this will help me!

Thanks.

-- 
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com
_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org




--
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

Juan Vuletich-4
In reply to this post by garduino
On 8/13/2013 1:34 PM, Germán Arduino wrote:
Hi:

I'm trying to understand the whole picture of this new feature (named Feature :)  and I can not figure out the correct way of obtain the #requires specification of a package.

This seems not be on CodePackage, but in CodePackageFile.

Yes. The reason for that is that a CodePackage instance only exists after the .pck.st file is installed. Before we install it, we can have a CodePackageFile, because all we have is the file... no loaded package yet. And we need to know dependencies before loading the package, because they need to be loaded in proper order. That's why we have that info in CodePackageFile.

On the other hand, CodePackage also has a 'featureSpec' instance variable. You can just copy the implementation of #requires from CodePackageFile. Please email me a change set with this, and/or any other addition you might consider useful, and I will integrate it.

Cheers,
Juan Vuletich


A bit of clarification about this will help me!

Thanks.

--
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com



_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

KenDickey
In reply to this post by garduino
On Tue, 13 Aug 2013 20:14:29 -0300
Germán Arduino <[hidden email]> wrote:

> I put a self halt in the browse command of the Installed Packages Browser,
> to work with the "current" package and at this level, I'm having trouble to
> find the "requires" in a direct way (at this package level).

Perhaps load one or more packages, then:

        CodePackage installedPackages inspect.

--
Ken [dot] Dickey [at] whidbey [dot] com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

garduino
In reply to this post by Juan Vuletich-4
HI Juan:


2013/8/13 Juan Vuletich <[hidden email]>

Yes. The reason for that is that a CodePackage instance only exists after the .pck.st file is installed. Before we install it, we can have a CodePackageFile, because all we have is the file... no loaded package yet. And we need to know dependencies before loading the package, because they need to be loaded in proper order. That's why we have that info in CodePackageFile.


Understood, thanks!
 
On the other hand, CodePackage also has a 'featureSpec' instance variable. You can just copy the implementation of #requires from CodePackageFile. Please email me a change set with this, and/or any other addition you might consider useful, and I will integrate it.


Yes, this is the way I was playing around with this issue, the .cs is attached.

Thanks!

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

1799-CuisCore-GermanArduino-2013Aug14-09h47m-gsa.1.cs.st (274 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Understanding provides/requires

garduino
In reply to this post by KenDickey
HI Ken, thanks for the hint!

I was searching a way of have the prereq returned at CodePackage level, because I'm thinking in implement an UI to edit the prereq of a package, starting from the Installed Packages Browser.

Cheers.


2013/8/13 Ken Dickey <[hidden email]>
On Tue, 13 Aug 2013 20:14:29 -0300
Germán Arduino <[hidden email]> wrote:

> I put a self halt in the browse command of the Installed Packages Browser,
> to work with the "current" package and at this level, I'm having trouble to
> find the "requires" in a direct way (at this package level).

Perhaps load one or more packages, then:

        CodePackage installedPackages inspect.

--
Ken [dot] Dickey [at] whidbey [dot] com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



--
Saludos / Regards,
Germán Arduino
www.arduinosoftware.com

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org