On a related note, perhaps it would be a good idea to change the name of
the file extensions to be something like .fuel1dot8 to denote the version of the format.
We can add it, but maybe it is redundant. Each Moose model exported with
Fuel encodes the version and signature at the beginning of the stream. The signature is "FLMoose" and the version is the current version of FuelMooseExtension (right now it is 1.4 and I am proposing the new version 1.5). So if you try to import with a different version/signature, then an error is thrown.
Is that enough?
It is. But, I was just saying that by adding the version in the naming scheme we would essentially provide documentation. This can be particularly useful given that it is likely that each version of Fuel will change the format.
Ok, we can add that. But as far as I can see, the USER of Moose chooses the filename/extension when exporting a mode. Am right? look:
exportToFLOpeningFileDialog <menuItem: 'Export model to FL' category: 'Import / Export'> | stream | stream := UITheme builder fileSave: 'Your title here' extensions: #('fl') path: nil. stream isNil ifFalse: [ self exportToFLStream: stream. stream close. Notification signal: 'Save successful!' ]
so...how can I force a file extension if the user actually put it? On the other hand, the method fileSave: 'Your title here' extensions: #('fl') path: nil.
shows files with extension 'fl'. So when you are importing with Fuel XXX, which fuel files should you search? only the ones of your version? all fuel files?
Another thing would be to somehow document the requirements for loading the file. For example, in the case of FuelMooseExtension, it is required that Fame and potentially FAMIX are loaded.
Yes.
Do we get any support from Fuel in this regard?
Not really. If you have serialized something in an image XXX and you have serialized instances of that image, and you try to import in an image YYY where you DON'T have those classes, then you will have a clear error saying "FAMIXXXX not found in Smalltalk globals".
Cheers, Doru
Cheers, Doru
On 29 May 2012, at 21:42, Mariano Martinez Peck wrote:
Hi Doru. I have updated FuelMooseExtension to work with the latest
stable version of Fuel 1.8. I think this is worth it because:
- Right now you are using an old version of Fuel (1.6) which is like
an year ago. The older it is the more difficult it will be in the future to update.
- If you don't take into account the time to compute attributes we
can have improvement up to 30% in export time.
- Fuel 1.8 is integrated by default in Pharo 2.0 now, meaning that
you will have problems when moving Moose to Pharo 2.0 (because you would need 1.6).
Of course the bad news is that if you have already exported files you
won't be able to import them with this new version.
If you agree, let me know. I will create a new version 1.5 in
ConfigurationOfFuelMooseExtension but I don't know how the Moose image is built (it seems it is not using ConfigurationOfFuel).
Cheers
-- Mariano http://marianopeck.wordpress.com
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Speaking louder won't make the point worthier."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Mariano http://marianopeck.wordpress.com
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"The coherence of a trip is given by the clearness of the goal."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev