zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2k stars 592 forks source link

Should we remove most of these properties from JS, and not add new ones? #2326

Open pepone opened 1 week ago

pepone commented 1 week ago
          Should we remove most of these properties from JS, and not add new ones?

_Originally posted by @bernardnormier in https://github.com/zeroc-ice/ice/pull/2320#discussion_r1646545267_

bernardnormier commented 1 week ago

A related question is: do we want to allow (or keep allowing) sharing configuration files between Ice applications written in different languages?

If the answer is yes, then it makes sense for Ice-JS to accept but ignore various properties that are not relevant to JS.

If the answer is no, then Ice-JS should only accept properties that are relevant to Ice-JS, and reject all other properties. And furthermore, we should remove "config sharing" support like: https://doc.zeroc.com/ice/3.7/property-reference/ice-plugin#id-.Ice.Plugin.*v3.7-Ice.Plugin.name.cpp (fortunately I believe it's limited to this Ice.Plugin property)

We could also improve makeProps/PropertiesNames.xml to include/exclude language mappings for some properties, e.g.

<property name="AcceptClassCycles" default="0" language="cpp"/>
<property name="Package.[any]" language="java" />
<property name="Plugin.[any]" language="cpp,csharp,java" />

There are only 4 languages for which we generate this property-checking code: cpp, java, csharp and js. The default would remain "all".