bah... I would just go for maintaining a fork of OSProcess with simple rewriters for these methods and backporting fixes from the main repository.
I think all-in-one solutions only result in bad code.. On 2013-09-03, at 08:48, Goubier Thierry <[email protected]> wrote: > Le 03/09/2013 13:36, David T. Lewis a écrit : >> On Tue, Sep 03, 2013 at 01:15:01PM +0200, Goubier Thierry wrote: >>> >>> >>> Le 03/09/2013 12:56, David T. Lewis a ?crit : >>>> On Tue, Sep 03, 2013 at 10:58:07AM +0200, Goubier Thierry wrote: >>>>> >>>>> At the same time, parts of OSProcess seems to not be working under >>>>> Pharo2 anyway :( I don't even think I'm able to run the tests (locked up >>>>> my 3.0 image it did). >>>>> >>>> >>>> My last set of updates to OSProcess for Pharo were done in January 2013, >>>> and it worked at that time. Has something stopped working since then? >>> >>> I've been using OSProcess sucessfully on Pharo1.4 and 2.0 for quite a >>> long time now; however, when trying to test if I did everything right on >>> a 3.0 adaptation, running the tests ended up >>> 1- uncovering more deprecated warnings with things that do not exist >>> under Pharo2 (so that the Pharo2 solution is deprecated on Pharo3, and >>> the Pharo3 solution does not exist in Pharo2... yuck. ensureDelete it is). >>> 2- test failures due to missing Xcontrol plugin? (and permanent process >>> error afterwards) so I scrapped that image and my implementation, will >>> rewrite everything with a fresh new image. >>> >>> Can I give up on trying to run OSProcess tests? >> >> The tests require XDisplayControlPlugin in the VM in order to do many of >> the multi-process tests, because #forkSqueak is used to create cooperating >> VM processes for the tests. In addition, some OSProcess function will not >> work on Cog. >> >> If you can run the tests on an interpreter VM they should pass. If you >> can get XDisplayControlPlugin included in the VM, then I expect that most >> of the tests would pass (we would have to try it to be sure). > > Ok. > >> Otherwise, yes, you can give up on running the tests. You may still find >> them useful as a source of examples and for running specific tests that >> do not require #forkSqueak. > > Thanks. > > Thierry > >> Dave >> >> >>> >>>>> Looks like a version / implementation test would be the way to go. I'll >>>>> write something which should work on 2.0 / 3.0, and failure protection >>>>> to fallback for anything else. >>>>> >>>>> Is there a standard way to test for implementation/version on all Squeak >>>>> and Pharo versions ? >>>>> >>>> >>>> No. And as you can see from the examples in OSProcess, it is becoming >>>> increasingly difficult to cobble up a solution that works for an externally >>>> maintained package. If you can find a better solution, that would be great >>>> :) >>> >>> I'm attempting something. Is is OK if I save in the OSProcess >>> squeaksource repository? >>> >>> Thierry >> >> Can you post the method here first? I'd like to check it on some Squeak >> images >> before it goes into the repository. > > Here it is (at least an example): > > in OSProcess class > > isPharo3AndLater > "Test if we are on Pharo 3.0" > > ^ (Smalltalk classNamed: 'SystemVersion') > ifNil: [ false ] > ifNotNil: [ :v | v current type = 'Pharo' and: [ v current > major >= 3 ] ] > > platformName > "After Squeak version 3.6, #platformName was moved to SmalltalkImage > Some > versions of Pharo move this to OSPlatform and issue deprecation warnings > about the other usages. Then Pharo moved away from OSPlatform and > deprecated > its use." > > "self platformName" > > self isPharo3AndLater > ifTrue: [ ^ Smalltalk os name ]. > ^ (((Smalltalk hasClassNamed: #OSPlatform) > and: [(Smalltalk at: #OSPlatform) > respondsTo: #platformName]) > ifTrue: [Smalltalk at: #OSPlatform] > ifFalse: [((Smalltalk classNamed: 'SmalltalkImage') > ifNil: [^ Smalltalk osVersion]) current]) > platformName > >> Thanks! >> Dave >> >>> >>>> Dave >>>> >>>> >>>> >>>> >>> >>> -- >>> Thierry Goubier >>> CEA list >>> Laboratoire des Fondations des Syst?mes Temps R?el Embarqu?s >>> 91191 Gif sur Yvette Cedex >>> France >>> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 >> >> >> > > -- > Thierry Goubier > CEA list > Laboratoire des Fondations des Systèmes Temps Réel Embarqués > 91191 Gif sur Yvette Cedex > France > Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 >
signature.asc
Description: Message signed with OpenPGP using GPGMail
