[Glass] Metacello support

Dario Trussardi via Glass glass at lists.gemtalksystems.com
Sat Nov 8 03:25:57 PST 2014


Note ad the end of this.

> 
>> 
>> 
>> On Fri, Nov 7, 2014 at 5:25 AM, Dario Trussardi via Glass <glass at lists.gemtalksystems.com> wrote:
>> Ciao Dale,
>> 
>> 	i work around this.
>> 
>>> Now after update the system returns the same error
>>> 
>>>>>> 	When i work on package istance from Gemtools Monticello ( browse or  load command ) 	the system erase the error:
>>>>>> 
>>>>>> 	a ArgumentError occurred (error 2718), string contents are ill-formed Utf8 at byte offset 38,  -  G/S[MonvisoGruppi3104 IP100 *******:3]
>>> 
>>> Now that you're using the latest version of FileTree on both sides and you are still getting the error, we can eliminate the known problems (but it is still possible that the package was produced by erroneous code) ...
>>>  
>>> The string decodeFromUTF8 begin with:
>>> 
>>> Ah you've got a handle on the utf8 bytes. Please send me the undecoded utf8 string so that I can figure out what might be going wrong.
>> 
>> 
>> 	The problem is because the system wrong the reference name of the file when it work on package save from Pharo fileTree.
>> 
>> 	Into GLASS Monticello,
>> 
>> 		in this case the methodEntry name begins with   < ._ > follow the name of the method,   and consequently the system don't found the specific file.
>> 
>> 	I change for testing:  see  *****  and all works fine
>> 
>> MCFileTreeStCypressReader
>> 
>> addMethodDefinitionsForClass: className methodProperties: methodProperties in: entries
>> 
>>   entries
>>     do: [ :entry | 
>>       | classIsMeta |
>>       classIsMeta := false.
>>       entry name = 'class'
>>         ifTrue: [ classIsMeta := true ].
>>       (entry name = 'instance' or: [ entry name = 'class' ])
>>         ifTrue: [ 
>>           ((self fileUtils directoryFromEntry: entry) entries
>>             select: [ :each | each name endsWith: '.st' ])
>>             do: [ :methodEntry | 
>> *******		( methodEntry name beginsWith: #($.) ) ifTrue:[ methodEntry name: ( methodEntry name copyFrom: 3 to: methodEntry name size) .  ].
>> 								
>>              methodEntry
>>                 readStreamDo: [ :fileStream | 
>>                   | category source timestamp self
>> 
>> 	
>> 
>> 	A don't  search where the system creates the error,
>> 
>> 	but i hope this considerations is enough for solving this problem.
>> 
>> Dario, I am glad that you found a solution to your problem, but frankly I don't think the utf8 problem was caused by the code that you "fixed". 
> 
> Of course, this is the problem but not the origin of the error.
>> 
>> I asked for the utf8 bytes and I would like to see the utf8 bytes as I suspect that the utf8 problem is still lurking there for someone else to trip across. If you give me the utf8 bytes I will have a chance to partially characterize the problem. Please?
>> 
>> As to the (presumably) new problem. Removing the first three characters from a DirectoryEntry will not do anything but ignore the file,
>  
> Removing the first two wrong characters from a DirectoryEntry name,  permit the system to found the relative file.
> 
> With not removing the system can't manage the file and after generate the error.
> 
>> so the real question is where did this .
> 
> Yes this is the real question.  But i hoped my informations was sufficient for you.
> 
>> file come from? If you send me the contents of the . file and the path to the . file, we should be able to figure that out ...
> 
> The size of the file is 4096  ( the size of a directory entry on linux )
> 
> The copy from the stack of the file is :	 'Mac OS X        	2°âTEXTR*chATTRˇRÊBâxThis resource fork intentionally left blank   ÿÿ'
> 
> The methodEntry, 	one   aDirectoryEntry  instance data is:
> 
> 	sourceDirectory  pathName 	'/DTRRepository/DtrFinanza.package/MATimedIvaModel.class/instance'
> 
> 	name 	'._aliquotaIva.st'
> 
>> 
>> I think that the real solution startes with getting my hands on the utf8 bytes and continuing that line of inquiry.
>> 
>> 
>> 	Two other consideration:
>> 
>> 		fileTree save from Pharo     is load into 	 GLASS Monticello 	without authorization problem.
>> 
>> 
>> 		fileTree save from GLASS Monticello   can not load into Pharo.
>> 
>> 			In th	is case the Pharo Monticello report for the package saved with GALSS Monticello : 	 fabricated from a Cypress format repository
>> 
>> 			In the server GLASS Monticello   create the fileTree structures   without group authorization  and Pharo can't load it.
>> 
>> 		 How i can solve this ?  ( i can't change it directly each time )
>> 
>> Ah okay, this is something new ... could you describe your setup again and/or in more detail? I want to know  know what os you are running for pharo and glass? Are they on the same machine? 
> 
> My configurations is based on local data network where i have two system:
> 
> 	a MacBook where run:	1) 	Pharo 1.4 for manage the code
> 							2)  	Pharo 1.1 with GemTools Launcher - >=1.0-beta.8.7  for manage the GLASS repository
> 
> 	a server based on Ubuntu system where run GLASS 3.1.0.4   and the samba support for sharing the DTRRepository directory  ( where i save the fileTree files )
> 
>> What user you are running as for GLASS and Pharo?
> 	
> The glass user is:		 dario
> 
> The MacBook link the server volume DTRRepository as:	  guest

When from the MacBook i link the volume DTRRepository on the server  as:	  guest	 all work.

After i login the volume DTRRepository on the server with specific  samba user  profile

	and in Monticello Pharo  i open the fileTree entry repository  the system generate the error:
	
	MessageNotUnderstood: receiver of "pairsDo:" is nil

--- The full stack ---
UndefinedObject(Object)>>doesNotUnderstand: #pairsDo:
MCFileTreeStCypressReader(MCMczReader)>>associate:
MCFileTreeStCypressReader(MCFileTreeAbstractReader)>>parseMember:
MCFileTreeStCypressReader>>loadVersionInfo
MCFileTreeRepository>>versionInfoForPackageDirectory:
MCFileTreeRepository>>packageDescriptionFromPackageDirectory:
[:packageDirectory | self packageDescriptionFromPackageDirectory: packageDirectory] in MCFileTreeRepository>>packageDescriptionsFromReadableFileNames
Array(SequenceableCollection)>>collect:
MCFileTreeRepository>>packageDescriptionsFromReadableFileNames
MCFileTreeRepository(MCFileBasedRepository)>>retrieveVersionsWithPackageNames:
MCFileRepositoryInspector>>refresh
MCFileRepositoryInspector>>setRepository:workingCopy:
MCFileRepositoryInspector class>>repository:workingCopy:
MCFileTreeRepository(MCFileBasedRepository)>>morphicOpen:
MCWorkingCopyBrowser>>openRepository
MCWorkingCopyBrowser(MCTool)>>performButtonAction:enabled:
PluggableButtonMorph>>performAction:	


Save the package into the fileTree entry repository instead work well also in this case

> 
>> Sample file permissions (ls -l) after a pharo write and after a GLASS write?
> 
> After Pharo write the relative ls -l is:
> 	drwxr-xr-x  9 nobody nogroup  4096 nov  7 14:05 DtrFinanza.package
> 
> 
> After GLASS write the relative ls -l is:
> 		drwxrwx--- 15 dario  dario    4096 nov  8 11:09 DtrCRP.package
>  
> Ciao, thanks,
> 
> 	Dario
> 
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20141108/58562380/attachment-0001.html>


More information about the Glass mailing list