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

Find a bug and can not build the prometheus code. #2239

Closed
barnettZQG opened this Issue Dec 1, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@barnettZQG
Copy link

barnettZQG commented Dec 1, 2016

error message:

github.com/prometheus/prometheus/storage/local/mapper.go:70: m.mappingsCounter.Set undefined (type prometheus.Counter has no field or method Set)

error code:

m.mappingsCounter.Set(float64(len(m.mappings)))

reasons:

prometheus/client_golang@2fee50b

This commit delete the Set method.may be the correct code is:

m.mappingsCounter.Add(float64(len(m.mappings)))
@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Dec 1, 2016

You are building Prometheus against the head of https://github.com/prometheus/client_golang . However, Prometheus is supposed to be built against the vendored dependencies.

It's on my TODO list to adjust the current code to the head of https://github.com/prometheus/client_golang , but this will also go along with an update of the vendoring. So always build with the vendored dependencies (which is automatic with Go 1.7, you really have to delete the vendor directory to avoid it.

@beorn7 beorn7 closed this Dec 1, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.