-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken external dependencies #16326
Comments
Beats has just adopted go modules as a dependency manager. Does this fix your problems? |
Hi @kvch I though this would fix it, but it seems that there are still some external dependencies which aren't being imported correctly, when using the libbeat library from a new project. Perhaps I am doing something wrong though.... This is the error message that I receive, when I try to build my project:
|
Could you share your We are using a forks of a few dependencies. You need to add those to the replace section of your Beats because the go version we are using is a bit limited in that regard. I think adding those directives will fix your issue. Also, I am working on moving Beat generators to go modules as well. It is in progress, but I expect it to be done soon. You might be interested in it: #16288 |
@kvch , so having tried quite a few things. I started over... in the end I was still receiving the following error:
But updating the version to the following:
Seemed to work a charm. So, now everything is indeed working as intended. Thank you so much for helping with addressing this 🙏 You are awesome !! 👏 |
Is it true that beats has adopted gomodules? |
I got it to work using instructions https://github.com/elastic/go-elasticsearch I think v7.8.0 is the latest released beats... Thanks eats team for getting go modules. |
I have this issue too. I receive:
My go.mod:
|
replace ( Adding the above mod file can solve this problem |
Describe the enhancement:
It is currently not possible to import
github.com/elastic/beats/cmd.GenRootWithSettings
using go modules. This will break (several things):github.com/dop251/goja
dependencies which are included (vendored) in the github repository, is completely broken. The functionRegisterSimpleMaptype()
does not exist anymore, and even worse, there are no releases and no branches for this library. The only way to fix this would be to fork the project and revert the changes back to before the deletion of said function.I therefore propose to fix these dependencies and include a
go.mod
, to make working with thelibbeat
library much easier.I am willing to help with this project and will happily contribute to fixing this.
Describe a specific use case for the enhancement or feature:
Make writing custom beats much easier (when using go modules).
The text was updated successfully, but these errors were encountered: