Conversation
|
What problems does the executable config solves which current config and plugins can not solve? YAML config is nice and readable and I can get what is going on with just glance on it which is not the case, for example, enb and Karma config. |
7968d56 to
df71596
Compare
|
@SevInf It allows the communication between plugins. For example we can pass function as an option to some plugin. |
|
@j0tunn I assume it is for gemini-testing/gemini-tunnel#9. |
|
The problem is we should start server first (thats a not a vanilla http server). And we have a plugin for that. Both plugins should know about that free port. |
|
Why the plugin thats start the server can't just set the port for a tunnel once it started the server? |
|
The order of plugin execution is not guaranteed. And free port allocation is an async operation |
|
Async is not a problem,
|
|
Async in fact is a problem, because |
|
Why are you against the |
|
Config file should be declarative and easy to read. Any JS config I've ever seen is a horrible mess that requires you to gaze into it for a long time to get what is going on there ( |
All this stuff will help to make config easy and readable |
|
No, it will not, because why would you go through publishing a plugin when you can just write all the stuff you need inside a config? Why would you configure environment on your CI if just can do |
to localise specific functionality. Yes, I'll do it
Don't you think that it would be convenient to make such configuration in gemini config file instead of some top level script, that will generate
Thats totally up to the users. If they want to have simple config - they will have simple config, gemini provides ability for that. If they don't - they will have totally messy crap around gemini anyway. Such restriction just moves complexity from gemini config to some additional stuff. |
I don't think either approach is good. In the end, if the plugins are so dependent on each other why are they separate? All need for for executable config will go away if you just merge them into one. Before you say "We want to keep public tunnel plugin": plugin is just a function and nothing prevents your private plugin from depending on it and doing |
|
We want to use tunnel plugin with or without server plugin. One project - only tunnel plugin, other project - tunnel with server. They are about different stuff, they can work separately. They will work separately. Why should we join them? Just to keep our config simple? Just to keep somebody's config simple? Your point is "Do any spikes you need, but don't make config executable". But we want a simple straightforward way to do some configuration stuff. Config file is the best place for that stuff. Again, this PR adds ABILITY to do more complicated things in config. Still anyone can use simple |
lib/config/index.js
Outdated
|
|
||
| /** | ||
| * @param {Object|String} configData data of the config or path to file | ||
| * @param {Object|String} config config or path to config file |
There was a problem hiding this comment.
ну да, сначала имя параметра - config, а затем описание - config or path to config file
df71596 to
d00517a
Compare
No description provided.