Closed ykrevnyi closed 4 years ago
Hmm, seems fishy. Go claims to support Darwin for the plugin
package. Would you be able to try with the very latest Go?
Yup, tested with latest go as well.
go version:
go version go1.12.5 darwin/amd64
The same error appears: failed to load plugin 'github.com/vito/booklit/booklitdoc': plugin: not implemented
🤔 Guess using the plugin
package was riskier than I thought. Thanks for letting me know.
What version of OS X are you running? Maybe it has to be the latest? I just tried it on an up-to-date machine and it seemed fine (well, it failed for a different reason - scripts/build-docs
worked though).
Hey @vito,
Just hopping into this thread as I'm also experiencing the issue @ykrevnyi is talking about.
Details System: Catalina 10.15.1 Booklit Version: 0.10.0 Go Version: go1.13.5 darwin/amd64
I see the exact same error mentioned above when I run the command stated in the read.me
booklit \
-i docs/lit/index.lit \
-o docs \
--html-templates docs/lit/html \
--plugin github.com/vito/booklit/booklitdoc \
--plugin github.com/vito/booklit/chroma/plugin
however when I run the build-docs script locally everything works totally fine
go run cmd/booklit/*.go \
-i docs/lit/index.lit \
-o docs \
--html-templates docs/lit/html \
--plugin github.com/vito/booklit/booklitdoc \
--plugin github.com/vito/booklit/chroma/plugin \
I'm still trying to debug why the binary version I installed of booklit does not work, but running the go directly does.
PS: For context, I first experienced this issue trying to make a PR for the concourse docs, but hit the snag above. Apologies if this is just user error!
Even more suprisingly if I run the following locally to generate a new binary
go build \
--ldflags "-X github.com/vito/booklit.Version=0.10.0" \
-o booklit_test \
github.com/vito/booklit/cmd/booklit
and then use that booklit_test binary locally everything works totally fine.
I'm totally shooting in the dark here, but could it be because concourse is using a linux box to build the binary or something? Also if this helps the binary that is generated for me locally is 14.5MB whereas the binary I downloaded for the release of 0.10.0 from GitHub is 11.4MB. 🤷♂
@alexbarbato Yeah I think you might be right. Cross-compiling probably doesn't work for the plugin
package. Thanks for the sleuthing! I'll try to fix this up for the next release. Until then I suggest that folks just build booklit
themselves. I've ended up doing that in my own projects to make the dependency explicit, and just doing something like this:
https://github.com/concourse/docs/blob/58f9b6556a3d5d7ad5d6955405a6cbf6ba1d2b0b/scripts/build#L7-L9
I've "fixed" this by rolling back use of the plugin
package. I'm going to do a bit more work to make sure the old reexec-based method works properly with Go modules and then ship another release.
Getting error:
failed to load plugin 'github.com/vito/booklit/booklitdoc': plugin: not implemented
Reproduce with:
go env: