wukong-m2m / wukong-darjeeling

Darjeeling for WuKong
Other
20 stars 17 forks source link

Should look for implementation when creating a wuclass or wuobject instance in mapper or discovery #27

Open pencilcheck opened 11 years ago

pencilcheck commented 11 years ago

There is a bug in mapper where it will create wuobjects regardless the existence of the implementation in target language.

For example, if an application needs a LED component, and the target node does not have the wuobject nor wuclass, it will try to create a virtual Java LED wuobject, then the compilation will fail because it cannot find the corresponding java class for LED.

pencilcheck commented 10 years ago

Looking back to this, I wonder if this is really something that we should worry about in 0.2. Perhaps it should be promoted to 0.4 or later.

wycc commented 10 years ago

Is this related to the virtual flag? If the virtual is not available, the mapper should not try to find the Java implementation. If this is the case, I believe that we should address it in the 0.2 release since this looks like a bug. We tell users that the Java implementation do not exist in the XML and then the mapper ignore this flag and look for Java implementation.

This change is simple, we only need to check the virtual flag in the wuclass before we put the WuNode into candidtate list. This should be one line of code only.

However, we do not need to support Languages other than C and Java for now. Maybe forever.

2013/11/5 Penn Su notifications@github.com

Looking back to this, I wonder if this is really something that we should worry about in 0.2. Perhaps it should be promoted to 0.4 or later.

— Reply to this email directly or view it on GitHubhttps://github.com/wukong-m2m/wukong-darjeeling/issues/27#issuecomment-27775088 .

YC

Phone: 886-2-23516989 Mobile: 0919816155

pencilcheck commented 10 years ago

To me, I would prefer writing in language other than C or Java to implement WuClasses or write an extension/plugin for WuKong but I believe there are a lot more people who won't use our product if it does not supported their most productive languages on the market.

But indeed we can implement the basic warning if we can't find the corresponding implementation that the users or mapper indicates, however I think users won't be able to understand or take action when it happens.