[squeak-dev] The Trunk: System-dtl.1233.mcz

David T. Lewis lewis at mail.msen.com
Tue May 18 02:39:21 UTC 2021


On Mon, May 17, 2021 at 04:13:09PM -0500, Chris Muller wrote:
> Does this mean that installation of software can now fail silently in
> the 100% normal case, e.g., with no Error signaled?  (sorry, a line
> that scrolled out of the Transcript after 100ms is not an adequate
> warning at all).
> 

No, that is not what it means. It means that the installation should
succeed gracefully, rather than failing unnecessarily.


> Installing Cuis code is typically a "one time thing" for a port of
> some app, here or there, and someone would simply hack your change in
> temporarily.  I don't understand why you feel this should be a regular
> part of trunk.  Making things less-strict willy-nilly invites future
> issues...
> 

No, it does not invite future issues. See the PositionableStream>>shouldIgnore:
method comment:

  Fileouts created on another Smalltalk may contain chunks that are
  not meaningful for Squeak. Answer true if chunk should be ignored.

And as explained in the commit comment:

  Skip chunks that begin with known extensions that are not meaningful
  for Squeak, logging to Transcript to show chunks that have been ignored.

With respect to the Cuis reference, my use case was installing
VectorEnginePlugin in Squeak. The upstream repository for this plugin
is on GitHub, which stores the portable Smalltalk code in chunk format
with some Cuis extensions:

  https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Packages/Features/VectorEnginePlugin.pck.st

The plugin code is well-written and portable for at least Squeak and Cuis.
The Cuis-specific chunks are not relevant to Squeak, so they can and
should be ignored when filing in to Squeak.
 
Dave


> 
> On Sat, May 15, 2021 at 12:25 PM <commits at source.squeak.org> wrote:
> >
> > David T. Lewis uploaded a new version of System to project The Trunk:
> > http://source.squeak.org/trunk/System-dtl.1233.mcz
> >
> > ==================== Summary ====================
> >
> > Name: System-dtl.1233
> > Author: dtl
> > Time: 15 May 2021, 1:25:37.809444 pm
> > UUID: 660215fe-f151-4184-8a31-8775202baa81
> > Ancestors: System-nice.1232
> >
> > Be permissive when filing in Cuis packages. Skip chunks that begin with known extensions that are not meaningful for Squeak, logging to Transcript to show chunks that have been ignored.
> >
> > =============== Diff against System-nice.1232 ===============
> >
> > Item was changed:
> >   ----- Method: PositionableStream>>fileInAnnouncing: (in category '*System-Changes-fileIn/Out') -----
> >   fileInAnnouncing: announcement
> >         "This is special for reading expressions from text that has been formatted
> >         with exclamation delimitors. The expressions are read and passed to the
> >         Compiler. Answer the result of compilation.  Put up a progress report with
> >        the given announcement as the title."
> >
> >         | val |
> >         announcement
> >                 displayProgressFrom: 0
> >                 to: self size
> >                 during:
> >                         [:bar |
> >                         [self atEnd] whileFalse:
> >                                         [bar value: self position.
> >                                         self skipSeparators.
> >
> >                                         [ | chunk |
> >                                         val := (self peekFor: $!!)
> > +                                                               ifTrue: [ | ch |
> > +                                                                       ch := self nextChunk.
> > +                                                                       (self shouldIgnore: ch)
> > +                                                                               ifTrue: [Transcript showln: 'Ignoring chunk: ', ch]
> > +                                                                               ifFalse: [(Compiler evaluate: ch logged: true) scanFrom: self]]
> > -                                                               ifTrue: [(Compiler evaluate: self nextChunk logged: true) scanFrom: self]
> >                                                                 ifFalse:
> >                                                                         [chunk := self nextChunk.
> >                                                                         self checkForPreamble: chunk.
> >                                                                         Compiler evaluate: chunk logged: true]]
> >                                                         on: InMidstOfFileinNotification
> >                                                         do: [:ex | ex resume: true].
> >                                         self skipStyleChunk].
> >                         self close].
> >         "Note:  The main purpose of this banner is to flush the changes file."
> >         Smalltalk logChange: '----End fileIn of ' , self name , '----'.
> >         self flag: #ThisMethodShouldNotBeThere. "sd"
> >         ^val!
> >
> > + ----- Method: PositionableStream>>shouldIgnore: (in category '*System-Changes-fileIn/Out') -----
> > + shouldIgnore: chunk
> > +       "Fileouts created on another Smalltalk may contain chunks that are
> > +       not meaningful for Squeak. Answer true if chunk should be ignored."
> > +
> > +       ^ ((chunk beginsWith: 'provides:') "Cuis Smalltalk extensions"
> > +               or: [chunk beginsWith: 'requires:'])
> > +                       or: [chunk beginsWith: 'classDefinition:']
> > + !
> >
> >
> 
> > Item was added:


More information about the Squeak-dev mailing list