Hi guys, I see Werner just fixed a bug which was introduced / exposed
when I bumped the file format version to "2".

(The multi-line text reader was checking for fileformat_ver == 1 to
expose certain features, not fileformat_ver >= 1).

I did a quick grep, and came across this code in o_read_buffer():


if (fileformat_ver < current_fileformat_ver)
{
  s_log_message(_("Read an old format sym/sch file!\n"
                  "Please run g[sym|sch]update on:\n[%s]\n"), name);
}


This means, for anyone using the next version of gEDA on their current
(fileformat_ver = 1) schematics, they will get prompted to run
g[sym|sch]update on them.

This doesn't seem right, given version 1 of the format is forwards
compatible. Am I missing something here?

Since we don't error out in this case at the moment.. what would tend to
happen if the user _didn't_ run g[sym|sch]update? Would they get
auto-upgraded? What is / was the purpose of the above utilities?

Would it be more appropriate to do:

if (fileformat_ver == 0) {
  s_log_message(_("Read an old format sym/sch file!\n"
                  "Please run g[sym|sch]update on:\n[%s]\n"), name);
} else if (fileformat_ver < current_fileformat_ver) {
  s_log_message(_("Read an old format sym/sch file!\n"
                  "This file will be automatically updated when next saved\n"));
}  

We could add any future special case upgrade messages here as and when.


Bike-shedding on the log messages welcome.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to