On 5/12/19 16:53, Ladislav Slezak wrote: > Hi all, > > Dne 05. 12. 19 v 13:08 David Díaz napsal(a): >> - How much time has been this broken without nobody >> noticing/reporting it? >> >> The change was introduced exactly a year ago[3], do it means that the >> yast2-ftp-server is no longer relevant? > > It's one of those rarely used modules. This quite surely proves that > the module > is not used and could be possibly dropped. > >> - Do we have this problem in more places? I.e. Yast::FileUtils taking >> the place >> of Object::FileUtils. > > We had the same problem already several times at different modules. > > >> I don't have the answer for any of them ;) but I have a proposal[4] >> for the last one: to implement the `method_missing` in the >> Yast::FileUtils and fallback to Object::FileUtils. That way, we could >> avoid similar crashes. > > Um, I do not like that. I'd rather prefer a visible crash than doing > some magic in > the background which might silently fail or do something slightly > different. > > As Josef pointed out fixing one case won't help much and the meaning > is a bit > different so it could cause some nasty surprise. > > We should rather fix the original bugs than adding fragile workarounds... > > > I did a quick grep over the YaST sources to find the potentially > dangerous places > using this regexp: > > [^:]FileUtils\.[[:lower:]] > > This finds all FileUtils (from the Ruby stdlib) calls which do not use > the :: prefix. > (Fortunately all Yast::FileUtils methods start with an upper case letter, > that makes the search easier.) > > So to avoid the problems in the future we could fix all places and use > the global > :: name space prefix at these places. > > What do you think about that? There are just 29 places in 9 packages > which would need > to be fixed (see the attachment, I have filtered out the unit tests > and some > repositories like the AY integration tests).
Thanks a lot Ladislav! > > That should not be that difficult. Volunteers? ;-) I can do it... after vacations ;) > > > > -- > > Best Regards > > Ladislav Slezák > Yast Developer > ------------------------------------------------------------------------ > SUSE LINUX, s.r.o. e-mail: lsle...@suse.cz > Lihovarská 1060/12 tel: +420 284 028 960 > 190 00 Prague 9 fax: +420 284 028 951 > Czech Republic http://www.suse.cz/ -- David Díaz González YaST Team at SUSE Linux GmbH
signature.asc
Description: OpenPGP digital signature