postgres-go icon indicating copy to clipboard operation
postgres-go copied to clipboard

Shipping the `plugin` executable generates unintuitive error messages

Open bearbin opened this issue 5 years ago • 0 comments

Currently, the plugin directory contains an executable file plugin (the compiled form of plugin.go). If a user attempts to use this code without recompiling plugin, a rather unintuitive error message is provided, of the form:

Error: generating file for table TableName: failed to run contents template: template: gnorm_templates/table.gotmpl:188:19: executing "gnorm_templates/table.gotmpl" at <plugin "plugin" "insertCols" .Table.Columns>: error calling plugin: error running plugin "": : fork/exec gnorm_templates/plugin/plugin: exec format error

If only the source is shipped instead of the binary then a more sane no such file or directory error will be generated. If the README contained instructions about having to build the plugins before using the code it would be even better.

bearbin avatar Aug 20 '19 19:08 bearbin