Glorp + P3 + SQLite

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

Glorp + P3 + SQLite

Pharo Smalltalk Users mailing list
I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

For P3 I used:

Metacello new
   baseline: 'P3';
   repository: '<a href="github://svenvc/P3" class="">github://svenvc/P3';
   load: 'glorp'.


For SQLite:

Metacello new 
	repository: '<a href="github://PierceNg/glorp-sqlite3:pharo7" class="">github://PierceNg/glorp-sqlite3:pharo7';
	baseline: 'GlorpSQLite';
	load.

but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.
Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Sven Van Caekenberghe-2
Hi Todd,

Both specify their dependency on Glorp almost the same way:

P3:

spec baseline: 'Glorp' with: [ spec repository: 'github://pharo-rdbms/glorp:master/'].

Sqlite3:

spec baseline: 'Glorp' with: [ spec repository: 'github://pharo-rdbms/glorp' ].

What exactly is the conflict ?

Sven

> On 19 Oct 2019, at 10:26, Todd Blanchard via Pharo-users <[hidden email]> wrote:
>
>
> From: Todd Blanchard <[hidden email]>
> Subject: Glorp + P3 + SQLite
> Date: 19 October 2019 at 10:26:10 GMT+2
> To: Any question about pharo is welcome <[hidden email]>
>
>
> I loaded GLORP+P3 without issue.
>
> Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.
>
> For P3 I used:
>
> Metacello new
>
>    
> baseline: 'P3'
> ;
>    
> repository: 'github://svenvc/P3'
> ;
>    
> load: 'glorp'.
>
>
> For SQLite:
>
> Metacello new
>  
>
> repository: 'github://PierceNg/glorp-sqlite3:pharo7'
> ;
>
> baseline: 'GlorpSQLite'
> ;
> load.
>
>
> but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.
>
> I would also like to have mysql driver at some point.
>
> Any tips for getting these to play nice together would be great.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pavel Krivanek-3
In reply to this post by Pharo Smalltalk Users mailing list
Btw. there exists an updated version of Glorp: 
github://pavel-krivanek/glorp:8.3.1-23-baseline
But the compatibility of it with SQLite was never tested

-- Pavel

so 19. 10. 2019 v 10:27 odesílatel Todd Blanchard via Pharo-users <[hidden email]> napsal:
I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

For P3 I used:

Metacello new
   baseline: 'P3';
   repository: 'github://svenvc/P3';
   load: 'glorp'.


For SQLite:

Metacello new 
	repository: 'github://PierceNg/glorp-sqlite3:pharo7';
	baseline: 'GlorpSQLite';
	load.

but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.
Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pharo Smalltalk Users mailing list
In reply to this post by Sven Van Caekenberghe-2
I don't get anything really intelligible out of the error.  I get a debugger.  No idea what to make of this.



On Oct 19, 2019, at 2:56 AM, Sven Van Caekenberghe <[hidden email]> wrote:

Hi Todd,

Both specify their dependency on Glorp almost the same way:

P3:

spec baseline: 'Glorp' with: [ spec repository: '<a href="github://pharo-rdbms/glorp:master/" class="">github://pharo-rdbms/glorp:master/'].

Sqlite3:

spec baseline: 'Glorp' with: [ spec repository: '<a href="github://pharo-rdbms/glorp" class="">github://pharo-rdbms/glorp' ].

What exactly is the conflict ?

Sven

On 19 Oct 2019, at 10:26, Todd Blanchard via Pharo-users <[hidden email]> wrote:


From: Todd Blanchard <[hidden email]>
Subject: Glorp + P3 + SQLite
Date: 19 October 2019 at 10:26:10 GMT+2
To: Any question about pharo is welcome <[hidden email]>


I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

For P3 I used:

Metacello new


baseline: 'P3'
;

repository: '<a href="github://svenvc/P3" class="">github://svenvc/P3'
;

load: 'glorp'.


For SQLite:

Metacello new


repository: '<a href="github://PierceNg/glorp-sqlite3:pharo7" class="">github://PierceNg/glorp-sqlite3:pharo7'
;

baseline: 'GlorpSQLite'
;
load.


but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.




Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pharo Smalltalk Users mailing list
I should probably mention that I do not really have a great handle on how package configurations work these days.

Coming back to Smalltalk after a long time away.

Pointer to an explanation of how package configurations work would be great.




Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pierce Ng-3
In reply to this post by Pharo Smalltalk Users mailing list
On Sat, Oct 19, 2019 at 01:26:10AM -0700, Todd Blanchard via Pharo-users wrote:
> I loaded GLORP+P3 without issue.
> Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

Todd, to load SQLite3 only:

  Metacello new
    repository: 'github://astares/Pharo-UDBC/src';
    baseline: 'UDBC';
    load: 'SQLite'

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

hernanmd
In reply to this post by Pharo Smalltalk Users mailing list
Hi Todd,

El sáb., 19 oct. 2019 a las 13:11, Todd Blanchard via Pharo-users (<[hidden email]>) escribió:
I should probably mention that I do not really have a great handle on how package configurations work these days.

Coming back to Smalltalk after a long time away.


Welcome back!
 
Pointer to an explanation of how package configurations work would be great.


 
Cheers,

Hernán
Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pharo Smalltalk Users mailing list
In reply to this post by Pierce Ng-3
Nice!  Thanks.

So here is maybe a stupid question (and I'm gonna read the wiki stuff on packages next) but it seems to me that the package loader should notice that glorp is already loaded and not load it if glorp is specified as a prerequisite but instead it fails.

Is the package loader not smart enough to understand what is already loaded and skip load attempts?

Puzzling.

> On Oct 19, 2019, at 11:23 PM, Pierce Ng <[hidden email]> wrote:
>
> On Sat, Oct 19, 2019 at 01:26:10AM -0700, Todd Blanchard via Pharo-users wrote:
>> I loaded GLORP+P3 without issue.
>> Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.
>
> Todd, to load SQLite3 only:
>
>  Metacello new
>    repository: 'github://astares/Pharo-UDBC/src';
>    baseline: 'UDBC';
>    load: 'SQLite'
>
> Pierce


Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Paul DeBruicker
The error you hit was because the package loader was smart enough to notice
that there was a version conflict between the version of a subproject
already in the image and what the new load instructions were telling it to
load.  The title of the debugger you pasted in alludes to that fact.  

So what you need to do is decide what to do when there is a conflict as its
tricky for a package manager to figure out what it should do in every case.  


Metacello includes an instruction #onConflict: which accepts a block.  You
can write code in the block to decide wether to use the incoming version or
the extant version in the image or whatever.  e.g.

Metacello new
        repository: 'github://PierceNg/glorp-sqlite3:pharo7';
        baseline: 'GlorpSQLite';
        onConflict:[:ex | ex allow];
        load.

would likely get everything to load without issue.  Then you'd have to run
the tests to see if the version conflict caused problems.  
 



Pharo Smalltalk Users mailing list wrote

> Nice!  Thanks.
>
> So here is maybe a stupid question (and I'm gonna read the wiki stuff on
> packages next) but it seems to me that the package loader should notice
> that glorp is already loaded and not load it if glorp is specified as a
> prerequisite but instead it fails.
>
> Is the package loader not smart enough to understand what is already
> loaded and skip load attempts?
>
> Puzzling.
>
>> On Oct 19, 2019, at 11:23 PM, Pierce Ng &lt;

> pierce@

> &gt; wrote:
>>
>> On Sat, Oct 19, 2019 at 01:26:10AM -0700, Todd Blanchard via Pharo-users
>> wrote:
>>> I loaded GLORP+P3 without issue.
>>> Trying to load SQLite3 - it also wants to load GLORP which complains of
>>> conflict.
>>
>> Todd, to load SQLite3 only:
>>
>>  Metacello new
>>    repository: 'github://astares/Pharo-UDBC/src';
>>    baseline: 'UDBC';
>>    load: 'SQLite'
>>
>> Pierce





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pharo Smalltalk Users mailing list
In reply to this post by Pavel Krivanek-3
Hi Pavel,

I've just gotten around to figuring out BaslineOf and packages.  I see this work is in a branch on your own repository.

Do you plan to do a pull request back to the original repository?  I feel like we have database code all over the place and no clear "official" versions.

Stll trying to figure out what is current and what is obsolete (Garage?)

On Oct 19, 2019, at 5:18 AM, Pavel Krivanek <[hidden email]> wrote:

Btw. there exists an updated version of Glorp: 
<a href="github://pavel-krivanek/glorp:8.3.1-23-baseline" class="">github://pavel-krivanek/glorp:8.3.1-23-baseline
But the compatibility of it with SQLite was never tested

-- Pavel

so 19. 10. 2019 v 10:27 odesílatel Todd Blanchard via Pharo-users <[hidden email]> napsal:
I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

For P3 I used:

Metacello new
   baseline: 'P3';
   repository: 'github://svenvc/P3';
   load: 'glorp'.


For SQLite:

Metacello new 
	repository: 'github://PierceNg/glorp-sqlite3:pharo7';
	baseline: 'GlorpSQLite';
	load.

but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.

Reply | Threaded
Open this post in threaded view
|

Re: Glorp + P3 + SQLite

Pavel Krivanek-3
Hi Todd, 

we want to do some more testing before merging it into the upstream repository.

-- Pavel

čt 21. 11. 2019 v 14:34 odesílatel Todd Blanchard via Pharo-users <[hidden email]> napsal:
Hi Pavel,

I've just gotten around to figuring out BaslineOf and packages.  I see this work is in a branch on your own repository.

Do you plan to do a pull request back to the original repository?  I feel like we have database code all over the place and no clear "official" versions.

Stll trying to figure out what is current and what is obsolete (Garage?)

On Oct 19, 2019, at 5:18 AM, Pavel Krivanek <[hidden email]> wrote:

Btw. there exists an updated version of Glorp: 
github://pavel-krivanek/glorp:8.3.1-23-baseline
But the compatibility of it with SQLite was never tested

-- Pavel

so 19. 10. 2019 v 10:27 odesílatel Todd Blanchard via Pharo-users <[hidden email]> napsal:
I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of conflict.

For P3 I used:

Metacello new
   baseline: 'P3';
   repository: 'github://svenvc/P3';
   load: 'glorp'.


For SQLite:

Metacello new 
	repository: 'github://PierceNg/glorp-sqlite3:pharo7';
	baseline: 'GlorpSQLite';
	load.

but this fails with a conflict.  I suspect the conflict is it wants to load in glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.