On 02/10/2011 09:55 AM, Josef Reidinger wrote:
Klaus Kaempf write:
* Jiri Suchomel <jsuchome@suse.cz> [Feb 10. 2011 15:37]:
But it is there now. And the result is, webYaST brings huge amount of packages because of YaST.
Yes :-( Thats why we have to move away from static languages like YCP to dynamic ones like Python or Ruby. Then a failing 'import' can be handled gracefully and package dependencies are drastically reduced.
It looks like new mantra called "dynamic languages". I am not sure if you ever try to handle such situations. Of course it is possible, but then code become really messy and also horrible to maintain and test it.... consider module A which depends on module B,C,D,E ( e.g. storage, language, time, bootloader and software management)
then consider that A has if B,D is installed and C,E missing....and consider all combination. It is nice theory, but maintenance looks horrible for me.
Yes, it can be. But each maintainer/implementer of a module can decide how to handle this. Some module may have hard dependencies, i.e. I can either import what I depend on or I fail. Other modules might be more modular and might be able to handle a missing module by disabling some functionality. An example of this is a browser, if you don't have the flash plugin you just cannot see flash thingies on the web, but the browser still works. For configuration modules this could apply to things that are network related. I could imagine the ssh configuration module doing something like this: try: import yast3.firewall_config except: hasFirewall = false Now the following domain specific interface yast3.ssh.openFirewallPort checks whether the firewall modules was loaded, and if not it does nothing and returns an appropriate value. In this case I do not see it as a maintenance nightmare, but rather as a nice feature we can take advantage of by using a dynamic language. Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU Novell-IBM Software Integration Center LINUX Tech Lead rschweikert@novell.com rschweikert@ca.ibm.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org