Porting Pharo8 code to Pharo10
Hi Guys,I can't port my Pharo 8 code to Pharo 10. I'm filing out my packages to a .cs file, but when I install it on Pharo 10 it shows an error that one of my class is missing, even if it is in the .cs file. Any hints? TIADavide
hi, some questions :) 1. why you are importing from cs? In pharo 8 there was already other formats available, including tonel. 1. Are you sure your missing class is not in another .cs you should install before? 2. In that sense, it would help to know which class is missing, we don't know if this is yours, ours or from an imported dependency. Â Esteban On 25/11/2023 07:15, Davide Varvello via Pharo-users wrote:
Hi Guys, I can't port my Pharo 8 code to Pharo 10.
I'm filing out my packages to a .cs file, but when I install it on Pharo 10 it shows an error that one of my class is missing, even if it is in the .cs file.
Any hints?
TIA Davide
 Hi Esteban
On Saturday, November 25, 2023 at 08:29:14 AM GMT+1, Esteban Lorenzano <estebanlm@netc.eu> wrote:
hi,
some questions :)
     1. why you are importing from cs? In pharo 8 there was already other formats available, including tonel.
Yep, but I never used it
         1. Are you sure your missing class is not in another .cs you should install before?
The class is in the same .cs
  2. In that sense, it would help to know which class is missing, we don't know if this is yours, ours or from an imported dependency. The class is mine and it is a subclass of Object
Cheers Davide
Esteban
On 25/11/2023 07:15, Davide Varvello via Pharo-users wrote:
 Â
Hi Guys, I can't port my Pharo 8 code to Pharo 10. I'm filing out my packages to a .cs file, but when I install it on Pharo 10 it shows an error that one of my class is missing, even if it is in the .cs file. Any hints? TIA Davide
what a good moment to start using it, isn't? :) Esteban ps: if the cs exported the classes in different order than needed, there is not much the importer can do. You can always pre-create manually the class (a simple stub will suffice) and then expect the import process will fix the rest.
 Hi Esteban On Saturday, November 25, 2023 at 08:29:14 AM GMT+1, Esteban Lorenzano <estebanlm@netc.eu> wrote:
hi,
some questions :)
     1. why you are importing from cs? In pharo 8 there was already other formats available, including tonel. Yep, but I never used it
         1. Are you sure your missing class is not in another .cs you should install before? The class is in the same .cs
  2. In that sense, it would help to know which class is missing, we don't know if this is yours, ours or from an imported dependency. The class is mine and it is a subclass of Object
Cheers Davide
Esteban
On 25/11/2023 07:15, Davide Varvello via Pharo-users wrote:
Hi Guys,
I can't port my Pharo 8 code to Pharo 10.
I'm filing out my packages to a .cs file, but when I install it on Pharo 10 it shows an error that one of my class is missing, even if it is in the .cs file.
Any hints?
TIA
Davide
Hi Esteban, I gave Tonel a chance, It worked. The documentation about Tonel is 0, I'm going to write an email to the mlist with a couple of basic tonal commands for future help. Cheers Davide On Saturday, November 25, 2023 at 11:57:51 AM GMT+1, Esteban Lorenzano <estebanlm@netc.eu> wrote: what a good moment to start using it, isn't? :) Esteban ps: if the cs exported the classes in different order than needed, there is not much the importer can do. You can always pre-create manually the class (a simple stub will suffice) and then expect the import process will fix the rest.
  Hi Esteban On Saturday, November 25, 2023 at 08:29:14 AM GMT+1, Esteban Lorenzano <estebanlm@netc.eu> wrote:
hi,
some questions :)
      1. why you are importing from cs? In pharo 8 there was already other formats available, including tonel. Yep, but I never used it
          1. Are you sure your missing class is not in another .cs you should install before? The class is in the same .cs
   2. In that sense, it would help to know which class is missing, we don't know if this is yours, ours or from an imported dependency. The class is mine and it is a subclass of Object
Cheers Davide
Esteban
On 25/11/2023 07:15, Davide Varvello via Pharo-users wrote:
  Hi Guys,
I can't port my Pharo 8 code to Pharo 10.
I'm filing out my packages to a .cs file, but when I install it on Pharo 10 it shows an error that one of my class is missing, even if it is in the .cs file.
Any hints?
TIA
Davide
Hello Davide! I used TonelWriter functionality in one of projects, following worked for me. `|tonelWriter|` `tonelWriter := TonelWriterV2 on: FileLocator home asFileReference. âor any other directoryâ` `tonelWriter writeSnapshot: ((RPackage named: 'YourPackageName') snapshot )` Note: TonelWriterV2 is replacement and valid from P11, it is slightly different than V1 (I donât know the details). In P10 is still just TonelWriter. Cheers, David
Hi David,Thank you for your reply, it is slightly different from my solution (see https://lists.pharo.org/empathy/thread/FKBM3BI7COOB4SMJKDHQVADBN6RQKPPN) but as same as effective. Cheers Davide On Monday, November 27, 2023 at 10:33:24 AM GMT+1, <bajger@gmail.com> wrote: Hello Davide! I used TonelWriter functionality in one of projects, following worked for me. |tonelWriter| tonelWriter := TonelWriterV2 on: FileLocator home asFileReference. âor any other directoryâ tonelWriter writeSnapshot: ((RPackage named: 'YourPackageName') snapshot ) Note: TonelWriterV2 is replacement and valid from P11, it is slightly different than V1 (I donât know the details). In P10 is still just TonelWriter. Cheers, David
participants (3)
-
bajger@gmail.com -
Davide Varvello -
Esteban Lorenzano