[Glass] Bootstrap package update warning with ConfigurationOfGLASS1

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Feb 12 11:56:40 PST 2015


Mariano,

Just a note about your load expression.

I can imagine that depending upon which version of Metacello you are 
using, one or more of the handlers that you are using would have been 
necessary, but if you can depend upon using the latest version of 
Metacello, then you can streamline things a bit:):

[
   [
   [
   Metacello image
     configuration: 'IAM';
     version: '1.5';
     onLock: [ :ex | ex honor ];
     load: #('Core' 'DPOFX') ]
     on: MetacelloAllowConflictingProjectUpgrade
     do: [ :ex | ex defaultAction ] ]
     on: MetacelloAllowLockedProjectChange
     do: [ :ex | ex disallow ] ]
     on: MetacelloNameNotDefinedError
     do: [ :ex | ex resume ]

The onLock: block is already handling the 
MetacelloAllowLockedProjectChange exception.

You can use an onConflict: method in the load expression to handle the 
MetacelloAllowConflictingProjectUpgrade exception, but in your case 
since you explicitly invoking the defaultAction, you probably don't need 
one.

In fact, you probably no longer the need the onLock, because the default 
behavior is to honor locks.

There also an onWarning: or onWarningLog method that you can use ...



Dale

On 02/11/2015 10:21 AM, Mariano Martinez Peck via Glass wrote:
> Hi Dale,
>
> Every in a while (i cannot yet understand exactly when), I try to 
> update the code of my app via the webinterface (we have a button for 
> that) and I get an exception saying:
>
> "
>
>
>     Warning: You are about to load new versions of the following
>     packages that have unsaved changes in the image. If you continue,
>     you will lose these changes. Bootstrap
>
> "
>
> The code I use to update my app is:
>
>
> [ [ [
>
> Metacello image
> configuration: 'IAM';
> version: '1.5';
> onLock: [:ex | ex honor];
> load: #('Core' 'DPOFX').
>
> ]
>    on: MetacelloAllowConflictingProjectUpgrade
>    do: [ :ex | ex defaultAction ] ]
>    on: MetacelloAllowLockedProjectChange
>    do: [ :ex | ex disallow ] ]
>    on: MetacelloNameNotDefinedError
>    do: [ :ex | ex resume ].
>
>
>
> As far as I know, I have already migrated to latest GLASS, Seaside, 
> Metacello and Magritte some months ago.
>
> Any idea what could be going on? I also attach the full stack in case 
> this helps.
>
> In addition, let me tell you something even stranger. My app 
> (ConfigurationOfIAM) loads a package called Bootstrap-Core (which is 
> Twitter Framework) this way:
>
> spec package: 'Bootstrap-Core' with: [
> spec
> requires: #('Seaside');
> repository: 
> 'http://smalltalkhub.com/mc/TorstenBergmann/Bootstrap/main/' ].
> (note I am referencing directly the package rather than a project 
> ref..but that's another discussion).
>
> I have also noted that sometimes, if I click proceed in the above 
> warning, the twitter bootstrap package (Bootstrap-Core) is a bit 
> corrupted...classes no longer exists and the extension methods (over 
> WAHtmlCanvas etc...) disappear as well...
>
> Considering all the Monticello thingies of packages and subpackages 
> and the fact that Bootrstrap-Core is a substring of Bootstrap, that 
> make me doubt.
>
> Any thoughts?
>
> Thanks in advance,
>
> -- 
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150212/e220a1cd/attachment-0001.html>


More information about the Glass mailing list