Skip to content
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

Cannot go get Telegraft 0.12.1, lots of "use of internal package not allowed" #1114

Closed
caiobegotti opened this issue Apr 28, 2016 · 7 comments

Comments

@caiobegotti
Copy link

Hi, I am trying to package Telegraf and I keep getting the errors below when calling go get. I am using Go 1.6.1 and pulling Telegraf 0.12.1 from git://github.com/influxdb/telegraf.git:

$ env GOPATH=/tmp/foobar go get -t -d ./telegraf.git/...

package telegraf/agent
    imports github.com/influxdata/telegraf/internal/config: use of internal package not allowed
package telegraf/agent
    imports github.com/influxdata/telegraf/internal/models: use of internal package not allowed
package telegraf/cmd/telegraf
    imports github.com/influxdata/telegraf/internal/config: use of internal package not allowed
package telegraf/internal/config
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/internal/config
    imports github.com/influxdata/telegraf/internal/models: use of internal package not allowed
package telegraf/plugins/inputs/cloudwatch
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/filestat
    imports github.com/influxdata/telegraf/internal/globpath: use of internal package not allowed
package telegraf/plugins/inputs/httpjson
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/lustre2
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/mqtt_consumer
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/system
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/tcp_listener
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/inputs/zfs
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/amon
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/amqp
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/datadog
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/influxdb
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/kafka
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/librato
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed
package telegraf/plugins/outputs/mqtt
    imports github.com/influxdata/telegraf/internal: use of internal package not allowed

Is there any branch with the whole s/influxdata/influxdb issue fixed for a test? I read in other bug reports that this is a known problem to be addressed?

@sparrc
Copy link
Contributor

sparrc commented Apr 28, 2016

that issue has long been fixed, your telegraf directory needs to be in the influxdata directory, not influxdb

@sparrc sparrc closed this as completed Apr 28, 2016
@caiobegotti
Copy link
Author

What do you mean? I just git cloned it, checked out f76739c and ran that go get command and it failed... also, cloning from influxdata instead from influxdb makes no difference for this problem. What should have been done differently?

@sparrc
Copy link
Contributor

sparrc commented Apr 28, 2016

Then something is wrong with your Go environment, I'm sorry but I don't have time to debug go environment problems for users

@caiobegotti
Copy link
Author

Sorry, but I wasn't asking for you to debug it but simply tell me where and what to look for as I can debug it myself :-) my point is that both on Go 1.5.3 and 1.6.1 only Telegraf shows this problem. I didn't have any issues with the same steps using other Go projects, so I assume it's Telegraf that is misbehaving.

@sparrc
Copy link
Contributor

sparrc commented Apr 28, 2016

There's nothing wrong with Telegraf builds, I can guarantee that 100%, this might be the only project you're building with internal packages.

BTW, why don't you just use go get github.com/influxdata/telegraf/...?

@caiobegotti
Copy link
Author

Because code cloning, deps download (the one failing) and actual building need to be executed in separate steps in the packaging I am doing for Snappy Ubuntu Core.

@sparrc
Copy link
Contributor

sparrc commented Apr 28, 2016

My recommendation would be that you should be cloning your repos into your GOPATH. I think if you try building a Go project with an internal directory you'll get the same results (such as https://github.com/shirou/gopsutil)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants