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
Providers often would like to access external dependencies (gems, or code from another module) to ease development. Using a unguarded require causes rather unhelpful exceptions when the dependency is not available, and even if augmented by a more helpful error message, can cause widespread disruption (see FM-8643 for an example).
Describe the Solution You Would Like
Allow the type to specify a (optional) list of ruby requires that are necessary for the provider to function:
The Resource API would then make sure that the gems in the correct version are available or provide a helpful error message of what is necessary to continue:
Error: `complex_thing` requires `net-connect` matching `~> 1.0`, but it is not installed.
Error: `complex_thing` requires `api-sdk` matching `~> 2.0`, but version `3.5.1` is installed.
Error: `complex_thing` requires ruby file `net/connect/mode`, but loading it failed with `cannot load such file -- net/connect/mode`
Describe Alternatives You've Considered
See FM-8643 for a in-depth discussion of alternatives.
The text was updated successfully, but these errors were encountered:
Use Case
Providers often would like to access external dependencies (gems, or code from another module) to ease development. Using a unguarded
require
causes rather unhelpful exceptions when the dependency is not available, and even if augmented by a more helpful error message, can cause widespread disruption (see FM-8643 for an example).Describe the Solution You Would Like
Allow the type to specify a (optional) list of ruby requires that are necessary for the provider to function:
The Resource API would then make sure that the gems in the correct version are available or provide a helpful error message of what is necessary to continue:
Describe Alternatives You've Considered
See FM-8643 for a in-depth discussion of alternatives.
The text was updated successfully, but these errors were encountered: