Hi Patrick Welcome :)
> Hello everyone, > > This is my first time here so I hope this is the right place to ask > questions. Yes it is. > In an attempt to move lots of code from VA Smalltalk to Pharo, I need to > compile a lot of methods whose code may or may not work due to missing > classes in Pharo etc. > I want to be able to compile these methods programatically without > interruptions (using method source strings only) and gather all compiler > errors that occur. What would be the best way to go about this? The compiler insfrastructure should be improved to stop "logging" error by writing on the Transcript but instead produce tractable objects representing error (shadowing...). But this is not there yet. To support your task and other scenario we worked on UndefinedClasses The idea is to be able to load a class even if its superclass does not exist and without losing information. MCHttpRepository location: 'http://smalltalkhub.com/mc/StephaneDucasse/PetitsBazars/main' user: '' password: '' Package UndefinedClasses Let us know. We did several iterations but this may be still green. > Also: How do I control in which package a compiled method ends up if the > target class is in a different package (Method extension)? In pharo the importer is based on *AAA => method in package AAA > Any help would be greatly appreciated! Another pattern that I used to load several versions of squeak into VisualWorks a while ago was: Capturing exceptions Walking the stack to extract information Compile on the fly the superclas Resume Now if you have a lot of code to load, may be it is worth to extend/modify the parser/compiler to raise better exceptions. If you do so, please let us know because we can introduce your hook in Pharo. Marcus is on vacation until 21 of August. Any feedback to support better your scenario is precious to us. Now we did not get the incentive to push too much (besides the UndefinedClasses), but it is the occasion. Stef > > Kind regards, > Patrick Scherer