How to include DeployUtils in a Configuration?

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

How to include DeployUtils in a Configuration?

hernanmd
I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
following instructions at:

https://github.com/fstephany/DeployUtils

If I include the dependency as suggested:

spec baseline: 'DeployUtils' with: [
    spec repository: 'github://fstephany/DeployUtils/repository'].

then when I load the configuration I get:

Error: Unable to resolve project package for 'DeployUtils'. It is
likely that that the configuration referencing this project will not
validate properly (see MetacelloToolBox
class>>validateConfiguration:).

If I include the dependency as:

        spec
            project: 'DeployUtils' with: [
                spec
                    className: #DeployUtils;
                    versionString: 'baseline';
                    repository: 'github://fstephany/DeployUtils/repository' ];

Then I get DU multiple missing dependencies:

This package depends on the following classes:
  StringStreamLogger
  Log
  StdoutStreamLogger
You must resolve these dependencies before you will be able to load
these definitions:
  DUFileLogger
  DUFileLogger>>#withFileLocator:
  DUFileLogger>>#addLogHook:
  DUFileLogger>>#defaultFormatter
  DUFileLogger>>#defaultStream
  DUFileLogger>>#fileLocator:
  DUStdoutStreamLogger
  DUStdoutStreamLogger>>#addLogHook:
  Log>>#debug:tag:
  Log>>#info:tag:
  Log>>#warning:tag:

And finally a MNU with

#loader: was sent to nil

(also when I try to inspect I got a #gtInspectorProjectsIn: was sent to nil)
Any ideas?
Cheers,

Hernán

Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

Stephane Ducasse-3
Hi hernan

Are you creating a configurationOf or a baselineOf?
Do you have the Log and StringStreamLogger in your image? Because I
have the impression that they are not in
the DeployUtils package.
Are the classes coming from the SystemLogger we wrote with Norbert?
Because if this is the case you should add this dependency.

Stef


On Mon, Sep 25, 2017 at 8:19 PM, Hernán Morales Durand
<[hidden email]> wrote:

> I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
> following instructions at:
>
> https://github.com/fstephany/DeployUtils
>
> If I include the dependency as suggested:
>
> spec baseline: 'DeployUtils' with: [
>     spec repository: 'github://fstephany/DeployUtils/repository'].
>
> then when I load the configuration I get:
>
> Error: Unable to resolve project package for 'DeployUtils'. It is
> likely that that the configuration referencing this project will not
> validate properly (see MetacelloToolBox
> class>>validateConfiguration:).
>
> If I include the dependency as:
>
>         spec
>             project: 'DeployUtils' with: [
>                 spec
>                     className: #DeployUtils;
>                     versionString: 'baseline';
>                     repository: 'github://fstephany/DeployUtils/repository' ];
>
> Then I get DU multiple missing dependencies:
>
> This package depends on the following classes:
>   StringStreamLogger
>   Log
>   StdoutStreamLogger
> You must resolve these dependencies before you will be able to load
> these definitions:
>   DUFileLogger
>   DUFileLogger>>#withFileLocator:
>   DUFileLogger>>#addLogHook:
>   DUFileLogger>>#defaultFormatter
>   DUFileLogger>>#defaultStream
>   DUFileLogger>>#fileLocator:
>   DUStdoutStreamLogger
>   DUStdoutStreamLogger>>#addLogHook:
>   Log>>#debug:tag:
>   Log>>#info:tag:
>   Log>>#warning:tag:
>
> And finally a MNU with
>
> #loader: was sent to nil
>
> (also when I try to inspect I got a #gtInspectorProjectsIn: was sent to nil)
> Any ideas?
> Cheers,
>
> Hernán
>

Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

Thierry Goubier
In reply to this post by hernanmd
Hi Hernán,

I think what is happening is you're not including completely the DeployUtils baseline. You need to write something like:

spec baseline: 'DeployUtils' with: [
    spec repository: 'github://fstephany/DeployUtils/repository'];
    import: 'DeployUtils'.

And have one of the packages (or groups?) of DeployUtils listed as dependency of one of your packages.

Regards,

Thierry

2017-09-25 20:19 GMT+02:00 Hernán Morales Durand <[hidden email]>:
I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
following instructions at:

https://github.com/fstephany/DeployUtils

If I include the dependency as suggested:

spec baseline: 'DeployUtils' with: [
    spec repository: 'github://fstephany/DeployUtils/repository'].

then when I load the configuration I get:

Error: Unable to resolve project package for 'DeployUtils'. It is
likely that that the configuration referencing this project will not
validate properly (see MetacelloToolBox
class>>validateConfiguration:).

If I include the dependency as:

        spec
            project: 'DeployUtils' with: [
                spec
                    className: #DeployUtils;
                    versionString: 'baseline';
                    repository: 'github://fstephany/DeployUtils/repository' ];

Then I get DU multiple missing dependencies:

This package depends on the following classes:
  StringStreamLogger
  Log
  StdoutStreamLogger
You must resolve these dependencies before you will be able to load
these definitions:
  DUFileLogger
  DUFileLogger>>#withFileLocator:
  DUFileLogger>>#addLogHook:
  DUFileLogger>>#defaultFormatter
  DUFileLogger>>#defaultStream
  DUFileLogger>>#fileLocator:
  DUStdoutStreamLogger
  DUStdoutStreamLogger>>#addLogHook:
  Log>>#debug:tag:
  Log>>#info:tag:
  Log>>#warning:tag:

And finally a MNU with

#loader: was sent to nil

(also when I try to inspect I got a #gtInspectorProjectsIn: was sent to nil)
Any ideas?
Cheers,

Hernán


Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

Stephane Ducasse-3
Thierry what is import:
and why should it be recursive?

On Wed, Sep 27, 2017 at 9:41 AM, Thierry Goubier
<[hidden email]> wrote:

> Hi Hernán,
>
> I think what is happening is you're not including completely the DeployUtils
> baseline. You need to write something like:
>
> spec baseline: 'DeployUtils' with: [
>     spec repository: 'github://fstephany/DeployUtils/repository'];
>     import: 'DeployUtils'.
>
> And have one of the packages (or groups?) of DeployUtils listed as
> dependency of one of your packages.
>
> Regards,
>
> Thierry
>
> 2017-09-25 20:19 GMT+02:00 Hernán Morales Durand <[hidden email]>:
>>
>> I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
>> following instructions at:
>>
>> https://github.com/fstephany/DeployUtils
>>
>> If I include the dependency as suggested:
>>
>> spec baseline: 'DeployUtils' with: [
>>     spec repository: 'github://fstephany/DeployUtils/repository'].
>>
>> then when I load the configuration I get:
>>
>> Error: Unable to resolve project package for 'DeployUtils'. It is
>> likely that that the configuration referencing this project will not
>> validate properly (see MetacelloToolBox
>> class>>validateConfiguration:).
>>
>> If I include the dependency as:
>>
>>         spec
>>             project: 'DeployUtils' with: [
>>                 spec
>>                     className: #DeployUtils;
>>                     versionString: 'baseline';
>>                     repository:
>> 'github://fstephany/DeployUtils/repository' ];
>>
>> Then I get DU multiple missing dependencies:
>>
>> This package depends on the following classes:
>>   StringStreamLogger
>>   Log
>>   StdoutStreamLogger
>> You must resolve these dependencies before you will be able to load
>> these definitions:
>>   DUFileLogger
>>   DUFileLogger>>#withFileLocator:
>>   DUFileLogger>>#addLogHook:
>>   DUFileLogger>>#defaultFormatter
>>   DUFileLogger>>#defaultStream
>>   DUFileLogger>>#fileLocator:
>>   DUStdoutStreamLogger
>>   DUStdoutStreamLogger>>#addLogHook:
>>   Log>>#debug:tag:
>>   Log>>#info:tag:
>>   Log>>#warning:tag:
>>
>> And finally a MNU with
>>
>> #loader: was sent to nil
>>
>> (also when I try to inspect I got a #gtInspectorProjectsIn: was sent to
>> nil)
>> Any ideas?
>> Cheers,
>>
>> Hernán
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

Dale Henrichs-3
Hernán.

Well I tried to look at this, but the first problem I ran into is that the package name is a Symbol (#ConfigurationOfSystemLogger) and the package name is supposed to be a String --- I'm trying to look at this from GemStone --- the package name is also a Symbol (#DeployUtils), so I cannot actually try to execute the Metacello record code to see what might be going wrong ... since the Metacello error is that the package is that it cannot resolve the project package name #DeployUtils, this might be the root cause of the problem ... the error also says that the there are likely to be invalid configurations involved as well ...

Your second error gives me a bit more of a clue as to what might be going on ... again this points to a problem with the DeployUtils baseline: there are no dependencies declared between the DeployUtils package and the SystemLogger project, so Metacello is "free to load the two in any order" ... from your second error message it seems that in the absence of dependencies, Metacello loaded the package before loading SystemLogger ...

Dale


On 09/27/2017 12:53 PM, Stephane Ducasse wrote:

> Thierry what is import:
> and why should it be recursive?
>
> On Wed, Sep 27, 2017 at 9:41 AM, Thierry Goubier
> <[hidden email]> wrote:
>> Hi Hernán,
>>
>> I think what is happening is you're not including completely the DeployUtils
>> baseline. You need to write something like:
>>
>> spec baseline: 'DeployUtils' with: [
>>      spec repository: 'github://fstephany/DeployUtils/repository'];
>>      import: 'DeployUtils'.
>>
>> And have one of the packages (or groups?) of DeployUtils listed as
>> dependency of one of your packages.
>>
>> Regards,
>>
>> Thierry
>>
>> 2017-09-25 20:19 GMT+02:00 Hernán Morales Durand <[hidden email]>:
>>> I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
>>> following instructions at:
>>>
>>> https://github.com/fstephany/DeployUtils
>>>
>>> If I include the dependency as suggested:
>>>
>>> spec baseline: 'DeployUtils' with: [
>>>      spec repository: 'github://fstephany/DeployUtils/repository'].
>>>
>>> then when I load the configuration I get:
>>>
>>> Error: Unable to resolve project package for 'DeployUtils'. It is
>>> likely that that the configuration referencing this project will not
>>> validate properly (see MetacelloToolBox
>>> class>>validateConfiguration:).
>>>
>>> If I include the dependency as:
>>>
>>>          spec
>>>              project: 'DeployUtils' with: [
>>>                  spec
>>>                      className: #DeployUtils;
>>>                      versionString: 'baseline';
>>>                      repository:
>>> 'github://fstephany/DeployUtils/repository' ];
>>>
>>> Then I get DU multiple missing dependencies:
>>>
>>> This package depends on the following classes:
>>>    StringStreamLogger
>>>    Log
>>>    StdoutStreamLogger
>>> You must resolve these dependencies before you will be able to load
>>> these definitions:
>>>    DUFileLogger
>>>    DUFileLogger>>#withFileLocator:
>>>    DUFileLogger>>#addLogHook:
>>>    DUFileLogger>>#defaultFormatter
>>>    DUFileLogger>>#defaultStream
>>>    DUFileLogger>>#fileLocator:
>>>    DUStdoutStreamLogger
>>>    DUStdoutStreamLogger>>#addLogHook:
>>>    Log>>#debug:tag:
>>>    Log>>#info:tag:
>>>    Log>>#warning:tag:
>>>
>>> And finally a MNU with
>>>
>>> #loader: was sent to nil
>>>
>>> (also when I try to inspect I got a #gtInspectorProjectsIn: was sent to
>>> nil)
>>> Any ideas?
>>> Cheers,
>>>
>>> Hernán
>>>


Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

hernanmd
In reply to this post by Stephane Ducasse-3
Hi Stef

2017-09-27 4:32 GMT-03:00 Stephane Ducasse <[hidden email]>:
> Hi hernan
>
> Are you creating a configurationOf or a baselineOf?

ConfigurationOf

> Do you have the Log and StringStreamLogger in your image? Because I
> have the impression that they are not in
> the DeployUtils package.

If I install DeployUtils using the Metacello script in the page, Log
and StringStreamLogger are included. So the problem only arises when
trying to include DeployUtils as dependency in a Configuration.

> Are the classes coming from the SystemLogger we wrote with Norbert?

Yes but from MetaRepoForPharo30. The dependency is actually in
ConfigurationOfDeployUtils in the #baseline: method

        spec project: 'SystemLogger' with: [
                spec
                    className: #ConfigurationOfSystemLogger;
                    versionString: '1.5';
                    repository:
'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main/' ].

Hernán

> Because if this is the case you should add this dependency.
>
> Stef
>
>
> On Mon, Sep 25, 2017 at 8:19 PM, Hernán Morales Durand
> <[hidden email]> wrote:
>> I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
>> following instructions at:
>>
>> https://github.com/fstephany/DeployUtils
>>
>> If I include the dependency as suggested:
>>
>> spec baseline: 'DeployUtils' with: [
>>     spec repository: 'github://fstephany/DeployUtils/repository'].
>>
>> then when I load the configuration I get:
>>
>> Error: Unable to resolve project package for 'DeployUtils'. It is
>> likely that that the configuration referencing this project will not
>> validate properly (see MetacelloToolBox
>> class>>validateConfiguration:).
>>
>> If I include the dependency as:
>>
>>         spec
>>             project: 'DeployUtils' with: [
>>                 spec
>>                     className: #DeployUtils;
>>                     versionString: 'baseline';
>>                     repository: 'github://fstephany/DeployUtils/repository' ];
>>
>> Then I get DU multiple missing dependencies:
>>
>> This package depends on the following classes:
>>   StringStreamLogger
>>   Log
>>   StdoutStreamLogger
>> You must resolve these dependencies before you will be able to load
>> these definitions:
>>   DUFileLogger
>>   DUFileLogger>>#withFileLocator:
>>   DUFileLogger>>#addLogHook:
>>   DUFileLogger>>#defaultFormatter
>>   DUFileLogger>>#defaultStream
>>   DUFileLogger>>#fileLocator:
>>   DUStdoutStreamLogger
>>   DUStdoutStreamLogger>>#addLogHook:
>>   Log>>#debug:tag:
>>   Log>>#info:tag:
>>   Log>>#warning:tag:
>>
>> And finally a MNU with
>>
>> #loader: was sent to nil
>>
>> (also when I try to inspect I got a #gtInspectorProjectsIn: was sent to nil)
>> Any ideas?
>> Cheers,
>>
>> Hernán
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to include DeployUtils in a Configuration?

hernanmd
In reply to this post by Thierry Goubier
Hi Thierry,

Big thanks, with your suggestions I could install my package with the
DeployUtils depdendency resolved, and all its dependencies
(SystemLogger) also were loaded. I have to modify manually the
baseline: method in my config because the Versionner expected a
ConfigurationOf to be added as dependency.

The ConfigurationOf is in the repository
http://www.smalltalkhub.com/#!/~SergeStinckwich/CORMAS

Cheers,

Hernán


2017-09-27 4:41 GMT-03:00 Thierry Goubier <[hidden email]>:

> Hi Hernán,
>
> I think what is happening is you're not including completely the DeployUtils
> baseline. You need to write something like:
>
> spec baseline: 'DeployUtils' with: [
>     spec repository: 'github://fstephany/DeployUtils/repository'];
>     import: 'DeployUtils'.
>
> And have one of the packages (or groups?) of DeployUtils listed as
> dependency of one of your packages.
>
> Regards,
>
> Thierry
>
> 2017-09-25 20:19 GMT+02:00 Hernán Morales Durand <[hidden email]>:
>>
>> I am trying to include DeployUtils in a ConfigurationOf (Pharo 6.1)
>> following instructions at:
>>
>> https://github.com/fstephany/DeployUtils
>>
>> If I include the dependency as suggested:
>>
>> spec baseline: 'DeployUtils' with: [
>>     spec repository: 'github://fstephany/DeployUtils/repository'].
>>
>> then when I load the configuration I get:
>>
>> Error: Unable to resolve project package for 'DeployUtils'. It is
>> likely that that the configuration referencing this project will not
>> validate properly (see MetacelloToolBox
>> class>>validateConfiguration:).
>>
>> If I include the dependency as:
>>
>>         spec
>>             project: 'DeployUtils' with: [
>>                 spec
>>                     className: #DeployUtils;
>>                     versionString: 'baseline';
>>                     repository:
>> 'github://fstephany/DeployUtils/repository' ];
>>
>> Then I get DU multiple missing dependencies:
>>
>> This package depends on the following classes:
>>   StringStreamLogger
>>   Log
>>   StdoutStreamLogger
>> You must resolve these dependencies before you will be able to load
>> these definitions:
>>   DUFileLogger
>>   DUFileLogger>>#withFileLocator:
>>   DUFileLogger>>#addLogHook:
>>   DUFileLogger>>#defaultFormatter
>>   DUFileLogger>>#defaultStream
>>   DUFileLogger>>#fileLocator:
>>   DUStdoutStreamLogger
>>   DUStdoutStreamLogger>>#addLogHook:
>>   Log>>#debug:tag:
>>   Log>>#info:tag:
>>   Log>>#warning:tag:
>>
>> And finally a MNU with
>>
>> #loader: was sent to nil
>>
>> (also when I try to inspect I got a #gtInspectorProjectsIn: was sent to
>> nil)
>> Any ideas?
>> Cheers,
>>
>> Hernán
>>
>