matt.fellows
2021-06-11 10:29
As for plugins, it doesn?t aim to solve that problem - it aims to create a generalised solution to extend functionality quickly.
If authors choose to create a plugin in JS that?s not compatible across OS or languages, that is not necessarily problem in my opinion, because it will be useful for some community. Of course, where possible cross-platform plugins should be created - so languages like Golang, Rust and other compiled languages that can easily produce cross-platform artifacts might be preferable, and from a Pact framework perspective we?ll certainly be aiming to create plugins that are robust in this fashion.
But if you work in a large enterprise and have a specific need to extend Pact for your specific case, you shouldn?t be bound by complicated constraints to create cross platform/OS artifacts, for example.
> Even if we have a plugin ecosystem, we still need to have some kind of language specific library to interact with the plugin, right? Sure things may be autogenerated if we apply communication protocols like gRPC but then all the DSL goodies would fade.
Not necessarily.
The best plugins may do that - that would be up to each language to add the thin DSL layer over any plugins (e.g. a type system, builder pattern etc.). But it should be thin, and it should be a separate extension. It also should be able to be used without it (language for these things is still something we?ll need to work through, but you could consider a no-DSL interface the ?raw? one). Otherwise, we end up with ?each language has to create the DSL from scratch? problem, which is why we?re doing this in the first place.
> . Another question I have is, since the plugins can be built in any language, to use the plugin we would need to launch the specific ecosystem for it right? JDK for Java, .Net for C#, Dartvm for Dart, etc.
The plugins should be executable in one way or another, independent of the language that is using it (e.g. JS). Ron has ideas on how to make this more reliable, but in the worst instance, each plugin may have its own process for configuring and starting it. Again, see the goals of the plugins to see how we might prioritise that sort of thing