[squeak-dev] OSVM Update Reminder (was: [ANN] OpenSmalltalk VM 2022 released (tag 202205110711))
Marcel Taeumel
marcel.taeumel at hpi.de
Tue Oct 11 09:12:09 UTC 2022
Looks good. Except for that little "." UI glitch in the text, which also introduces a inconsistent line gap :-)
Best,
Marcel
Am 22.09.2022 13:29:12 schrieb christoph.thiede at student.hpi.uni-potsdam.de <christoph.thiede at student.hpi.uni-potsdam.de>:
Hi all,
please find the attached changeset which implements a small VM update reminder as proposed. :-)
Best,
Christoph
=============== Summary ===============
Change Set: vm-update-reminder
Date: 22 September 2022
Author: Christoph Thiede
Tot the 'update completed' dialog, adds a short reminder if a newer OSVM release is available. For different VMs, the reminder will not appear. The latest release number is stored in SystemVersion>>#recommendedVMBuildNumber and should be updated after each VM release. See http://lists.squeakfoundation.org/pipermail/vm-dev/2022-September/038412.html.
=============== Diff ===============
MCMcmUpdater>>updateMessageFor: {private} · ct 9/22/2022 13:15 (changed)
updateMessageFor: previousUpdateLevel
- ^ ('Update completed.<br><br>Version: {1}<br>Update: {3}<b>{2}</b><br><br>Url: <a href="{4}">{4}</{10}><br>Map: ''{5}''<br>CI status: <a href="{8}"><img src="{7}" /> {9}</{10}>{6}' translated format: {
+ ^ ('Update completed.<br><br>Version: {1}<br>Update: {3}<b>{2}</b><br><br>Url: <a href="{4}">{4}</{10}><br>Map: ''{5}''<br>CI status: <a href="{8}"><img src="{7}" /> {9}</{10}>{6}.{11}' translated format: {
SystemVersion current version.
SystemVersion current highestUpdate.
previousUpdateLevel = SystemVersion current highestUpdate
ifTrue: ['']
ifFalse: [previousUpdateLevel asString, ' -> '].
self repository.
MCMcmUpdater updateMapName.
SystemVersion current description ifEmpty: [''] ifNotEmpty: [:d |
'<br><br><font face="{2}" size="{3}">{1}</font>'
format: {
d.
Preferences standardButtonFont familyName.
Preferences standardButtonFont pointSize.
}].
SystemVersion current ciStatusBadgeUrl.
SystemVersion current ciStatusPageUrl.
SystemVersion current ciStatusTimestamp ifNil: ['(build inaccessible!)' translated].
"mt: Avoid triggering the Windows Defender. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346.html"
'a'.
+ SystemVersion current recommendedVMUpdateInfo ifNil: [''] ifNotNil: [:info |
+ '<br><br><font face="{5}" size="{6}">A newer VM is recommended ({1} -> {2})! Visit the <a href="{3}">project page</{4}> to download it.</font>' translated
+ format: {
+ info key.
+ info value.
+ SystemVersion current vmUpdateURL.
+ 'a'. "avoid Windows Defender again"
+ Preferences standardButtonFont familyName.
+ Preferences standardButtonFont pointSize
+ }]
}) asTextFromHtml
SmalltalkImage>>isRunningOpenSmalltalkVM {system attributes} · ct 9/22/2022 13:18
+ isRunningOpenSmalltalkVM
+
+ ^ [#('CoInterpreter' 'StackInterpreter') includes: (self interpreterClass copyUpTo: Character space)]
+ on: Error "unsupported primitives"
+ do: [:ex | false]
SmalltalkImage>>openSmalltalkVMBuildNumber {system attributes} · ct 9/22/2022 12:58
+ openSmalltalkVMBuildNumber
+
+ | matcher |
+ self isRunningOpenSmalltalkVM ifFalse: [^ nil].
+
+ matcher := 'VM\: (\d+).*' asRegex.
+ (matcher matches: self platformSourceVersion) ifFalse: [^ nil].
+ ^ (matcher subexpression: 2) asNumber
SystemReporter>>reportVM: {reporting} · ct 9/22/2022 12:52 (changed)
reportVM: aStream
| howToBuild |
self header: 'Virtual Machine' on: aStream.
aStream
nextPutAll: Smalltalk vm vmFileName; cr;
nextPutAll: Smalltalk vm vmVersion; cr.
Smalltalk vm buildDate
ifNotNil: [:string | aStream nextPutAll: string; cr].
[Smalltalk vm platformSourceVersion
ifNotNil: [:v | aStream nextPutAll: 'platform sources revision ', v; cr]]
on: Warning do: ["unsupported primitive"].
[Smalltalk vm interpreterSourceVersion
ifNotNil: [:v | aStream nextPutAll: 'VMMaker versionString ', v; cr]]
on: Warning do: ["unsupported primitive"].
[Smalltalk vm interpreterClass
ifNotNil: [:string | aStream nextPutAll: string; cr].
Smalltalk vm cogitClass
ifNotNil: [:string | aStream nextPutAll: string; cr]
] on: Error do: ["unsupported primitives"].
- self vmIsOpenSmalltalkVM ifTrue:
+ Smalltalk vm isRunningOpenSmalltalkVM ifTrue:
[howToBuild := 'Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the\"Clone or download" instructions, then read the top-level README.md\and HowToBuild files in the top-level build directory for your\platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc.' withCRs].
howToBuild ifNil: [^self].
aStream cr.
self header: 'To Build A Similar Virtual Machine' on: aStream.
aStream nextPutAll: howToBuild; cr
SystemVersion>>recommendedVMBuildNumber {accessing} · ct 9/22/2022 13:05
+ recommendedVMBuildNumber
+
+ ^ 202206021410
SystemVersion>>recommendedVMUpdateInfo {accessing} · ct 9/22/2022 13:11
+ recommendedVMUpdateInfo
+
+ | currentNumber |
+ currentNumber := Smalltalk openSmalltalkVMBuildNumber ifNil: [^ nil].
+ currentNumber >= self recommendedVMBuildNumber ifTrue: [^ nil].
+ ^ currentNumber -> self recommendedVMBuildNumber
SystemVersion>>vmUpdateURL {accessing} · ct 9/22/2022 13:12
+ vmUpdateURL
+
+ ^ 'https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/202206021410'
---
Sent from Squeak Inbox Talk [https://github.com/hpi-swa-lab/squeak-inbox-talk]
On 2022-09-18T16:46:29-07:00, eliot.miranda at gmail.com wrote:
> On Fri, Sep 16, 2022 at 7:20 AM Thiede, Christoph <
> Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>
> > Hi all,
> >
> >
> > > If you are mostly interested in making sure that people are aware of a
> > new vm, a message that says a new vm is available with release notes and a
> > method to update the vm would serve the same purpose. A well placed red
> > (!) exclamation point is really all you need. The method to update the vm
> > could be as simple as taking the user to the download page (just like your
> > original email message in this thread).
> >
> > This is what I meant. Don't restrict compatibility, don't enforce users to
> > install a new VM, but give them a short unobtrusive note if an update is
> > available. We could place this in the "Update complete" dialog, for
> > instance. We could also read the latest build number of the VM
> > somewhere from squeak.org if we don't want to store this information in
> > the image. Could this maybe help VM developers receive earlier feedback on
> > new VM releases?
> >
>
> +1
>
> >
> > Best,
> > Christoph
> >
> > ------------------------------
> > *Von:* Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im
> > Auftrag von Ron Teitelbaum <ron at usmedrec.com>
> > *Gesendet:* Freitag, 16. September 2022 14:56:01
> > *An:* The general-purpose Squeak developers list
> > *Betreff:* Re: [squeak-dev] [ANN] OpenSmalltalk VM 2022 released (tag
> > 202205110711)
> >
> > Hi All,
> >
> > If you are mostly interested in making sure that people are aware of a new
> > vm, a message that says a new vm is available with release notes and a
> > method to update the vm would serve the same purpose. A well placed red
> > (!) exclamation point is really all you need. The method to update the vm
> > could be as simple as taking the user to the download page (just like your
> > original email message in this thread).
> >
> > All the best,
> >
> > Ron Teitelbaum
> >
> > On Thu, Sep 15, 2022 at 8:56 PM David T. Lewis <lewis at mail.msen.com>
> > wrote:
> >
> >> On Thu, Sep 15, 2022 at 01:10:00PM +0000, Thiede, Christoph wrote:
> >> > Hi all,
> >> >
> >> >
> >> > just a quick idea: Could we maintain the build number of the
> >> *recommended*
> >> > (i.e., stable) OSVM version in the Trunk and remind users about a newer
> >> > VM in the Transcript after processing the update stream?
> >> >
> >>
> >> -1
> >>
> >> Images and VMs are loosely coupled and we all work hard to minimize
> >> unnecessary dependencies between them. One VM can run many different
> >> images, and an image can run on more than one kind of VM. That is
> >> a good thing.
> >>
> >> Remember that we have SqueakJS and other kinds of VM also.
> >>
> >> Dave
> >>
> >
> _,,,^..^,,,_
> best, Eliot
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220918/e91140f5/attachment.html>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20221011/4777d1d0/attachment.html>
More information about the Squeak-dev
mailing list
|