You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system and kernel: (cat /etc/os-release, uname -r preferred) Linux isisdell 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
NodeJS version (node -v):
v12.14.0
npm version (npm -v):
6.14.7
Description:
Cannot create a python plugin with lower case python.
Steps to Reproduce:
$ webgme new plugin createSystems --language=Python # (Works)
$ webgme new plugin createSystems --language=python # Fails
Results:
TypeError: self.currentConfig.language.toLowerCase is not a function
at PluginGenerator.main (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/node_modules/webgme-engine/src/plugin/coreplugins/PluginGenerator/PluginGenerator.js:92:48)
at PluginGenerator.main (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/src/shim/PluginGenerator.js:30:42)
at PluginManager.new (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/src/PluginManager.js:70:21)
at PluginManager.ComponentManager._preprocess (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/src/ComponentManager.js:50:5)
at Command.<anonymous> (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/bin/webgme-new-plugin:17:20)
at Command.listener (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/node_modules/commander/index.js:302:8)
at Command.emit (events.js:210:5)
at Command.parseArgs (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/node_modules/commander/index.js:625:12)
at Command.parse (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/node_modules/commander/index.js:459:21)
at Object.<anonymous> (/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/bin/webgme-new-plugin:41:9)
The text was updated successfully, but these errors were encountered:
I am reluctant to make the option validation case insensitive. This would make it so python could be passed to the cli but could cause issues if the plugin isn't converting the provided value to lower case (as it is in the stack trace). It's worth noting that this isn't an esoteric or overly cautious stance as it appears that even making the option passed to --language case insensitive would break the detection of "JavaScript".
That said, I would be happy to make this case insensitive if tests were added to test suites of the core plugins in webgme-engine.
While I agree that this will not be a major issue, a better warning/error message would certainly be helpful. Regardless, the option --language is set to true if any other language is passed and passed to the webgme-engine's PluginGenerator, which I think should not be the case.
$ webgme new plugin myPlugin --language Java
/home/umesh/.nvm/versions/node/v12.14.0/lib/node_modules/webgme-cli/node_modules/webgme-engine/src/plugin/coreplugins/PluginGenerator/PluginGenerator.js:92
TypeError: self.currentConfig.language.toLowerCase is not a function
Environment:
webgme-cli version (
webgme -v
):v2.8.4
Operating system and kernel: (
cat /etc/os-release
,uname -r
preferred)Linux isisdell 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
NodeJS version (
node -v
):v12.14.0
npm version (
npm -v
):6.14.7
Description:
Cannot create a python plugin with lower case python.
Steps to Reproduce:
Results:
The text was updated successfully, but these errors were encountered: