Re: [Pharo-dev] Package loader question

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

Re: [Pharo-dev] Package loader question

dario trussardi
Thanks Max,

> Hi Dario,
>
>> On 15 Jan 2016, at 16:58, Trussardi Dario Romano <[hidden email]> wrote:
>>
>> Ciao,
>>
>> i have some packages with some class definition.
>>
>> Now the package1 define Class1 and Class2 with some reference to classA and classB defined into pachageA.
>>
>> packageA other hand, have some reference to class1 and class2.
>>
>> Now my question is:
>>
>> i can load the package1 and packageA without other considerations,
>>
>> leaving the system to resolve references as classes are loaded?
>>
>
> No, I don’t think so. You will receive a warning and can then proceed. That will compile the methods but the class references will have been compiled as nil references. So you will need to recompile those methods afterwards.

But if i used the Metacello baseline or configuration definition i can load with #atomic load types?

With this load types i solve my problematic?

Now when i  load a baseline definition with :

        | pathToPackageDirectory |
        "edit to match the path to your chosen package directory"
        pathToPackageDirectory := '/DTRDevelopment'.
        Metacello new
          baseline: 'DtrBase';
  repository: 'filetree://', pathToPackageDirectory;
          load.

        how i can define the load types?

        Thanks,

                Dario

>
> If these classes need each other, then they probably belong into the same package.
>
> Just to be clear, what do you mean by “package”? If you are referring to something like “MY-Core” and “MY-View” but both are loaded when loading the Monticello package “MY” then it will work. If you load “MY-Core” and “My-View” as separate Monticello packages the above will happen.
>


> Cheers,
> Max
>
>>
>> Thanks for any considerations,
>>
>> Dario
>
>

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Package loader question

Dale Henrichs-3
Dario,

To use #atomic, add a method like the following to your BaselineOfDtrBase:

project
   ^ project
     ifNil: [
       super project
       project loadType: #'atomic'.    "use #atomic loadType"
       project ]

The #atomic loadType will arrange for all packages for the baseline to
be loaded at the same time and that should resolve the problem you
described ...

Dale

On 1/15/16 9:27 AM, Trussardi Dario Romano wrote:

> Thanks Max,
>
>> Hi Dario,
>>
>>> On 15 Jan 2016, at 16:58, Trussardi Dario Romano <[hidden email]> wrote:
>>>
>>> Ciao,
>>>
>>> i have some packages with some class definition.
>>>
>>> Now the package1 define Class1 and Class2 with some reference to classA and classB defined into pachageA.
>>>
>>> packageA other hand, have some reference to class1 and class2.
>>>
>>> Now my question is:
>>>
>>> i can load the package1 and packageA without other considerations,
>>>
>>> leaving the system to resolve references as classes are loaded?
>>>
>> No, I don’t think so. You will receive a warning and can then proceed. That will compile the methods but the class references will have been compiled as nil references. So you will need to recompile those methods afterwards.
> But if i used the Metacello baseline or configuration definition i can load with #atomic load types?
>
> With this load types i solve my problematic?
>
> Now when i  load a baseline definition with :
>
> | pathToPackageDirectory |
> "edit to match the path to your chosen package directory"
> pathToPackageDirectory := '/DTRDevelopment'.
> Metacello new
>  baseline: 'DtrBase';
>   repository: 'filetree://', pathToPackageDirectory;
>  load.
>
> how i can define the load types?
>
> Thanks,
>
> Dario
>
>> If these classes need each other, then they probably belong into the same package.
>>
>> Just to be clear, what do you mean by “package”? If you are referring to something like “MY-Core” and “MY-View” but both are loaded when loading the Monticello package “MY” then it will work. If you load “MY-Core” and “My-View” as separate Monticello packages the above will happen.
>>
>
>> Cheers,
>> Max
>>
>>> Thanks for any considerations,
>>>
>>> Dario
>>

--
You received this message because you are subscribed to the Google Groups "Metacello" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.