Comments (10)
Thanks for reporting the issue. Is there a package or code snippet you can provide that illustrates the problem? I assume it's due to Issue #3, but can't be sure.
I don't have regular Internet access at home right now, so it might be a little while before I get to fix this.
from gocov.
Hi Andrew,
Sorry for the less than timely response. So it does not seem to be the same
issue as #3. In your bug there looks like there is a name conflict across
different packages causing the issue. However, I run the test command on a
single package and it scans the files and it logs them multiple times in
duplicate package records. I have attached the json output. Hope this
helps. Let me know if I can provide any other information.
Keep up the great work on this project. Thanks.
Regards,
John Calabrese
2012/11/5 Andrew Wilkins [email protected]
Thanks for reporting the issue. Is there a package or code snippet you can
provide that illustrates the problem? I assume it's due to Issue #3#3,
but can't be sure.I don't have regular Internet access at home right now, so it might be a
little while before I get to fix this.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-10095227.
from gocov.
Unfortunately Github doesn't do attachments on issues, so I guess it got eaten by the mail server. Could you please copy it into pastebin and copy the link here? Thanks.
from gocov.
Also, if you could run gocov test with the "-v" flag, that might provide some additional insight. i.e. gocov test -v
This lists the packages that gocov is instrumenting.
from gocov.
Hi Andrew,
I have included a link to the output in pastebin. Let me know if I can
provide any other information.
Regards,
John Calabrese
2012/11/15 Andrew Wilkins [email protected]
Also, if you could run gocov test with the "-v" flag, that might provide
some additional insight. i.e. gocov test -v
This lists the packages that gocov is instrumenting.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-10399350.
from gocov.
Thanks, John. I haven't gleaned much from that - it's not making much sense to me how this could happen.
Is the source for yahooDataModels something you can share? If I can reproduce the error then it'll be much easier to identify cause.
from gocov.
Hi Andrew,
I figured out what the issue was. In one of my test files I was,
incorrectly, importing the package I was testing, so basically the package
was importing a copy of itself. This bug in my code was somehow manifesting
as a duplicate package entry after running your gocov test on the package.
I'm not sure how this even compiled in the first place but, I removed the
incorrect import and gocov was outputting the proper test json.
Thanks for your support on this matter, especially since the issue was on
my end.
Regards,
John Calabrese
2012/11/19 Andrew Wilkins [email protected]
Thanks, John. I haven't gleaned much from that - it's not making much
sense to me how this could happen.
Is the source for yahooDataModels something you can share? If I can
reproduce the error then it'll be much easier to identify cause.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-10503074.
from gocov.
Hi John,
Thanks for the update. I'm glad you sorted it out; sorry I couldn't be of much assistance.
Do you mean you had a package P, and test file with package name P_test, which was importing P? Or the test file also had package name P? If the latter, that's odd; I don't see how it would even get past "go test", which should complain about a cyclic import. Which version of Go are you using?
Regards,
Andrew
from gocov.
Hi Andrew,
ex. file_test.go was in package P and also Importing package P. The package
was a local import using a relative reference. I've read about several
issues regarding local imports and relative references. the most relevant
mentioning 2 copies of a package being the result. I've included a link.
Also, I'm using go version go1.0.2.
https://codereview.appspot.com/5787055
-John
2012/11/27 Andrew Wilkins [email protected]
Hi John,
Thanks for the update. I'm glad you sorted it out; sorry I couldn't be of
much assistance.Do you mean you had a package P, and test file with package name P_test,
which was importing P? Or the test file also had package name P? If the
latter, that's odd; I don't see how it would even get past "go test", which
should complain about a cyclic import. Which version of Go are you using?Regards,
Andrew—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-10785713.
from gocov.
Ah! Thank you very much for investigating and explaining this.
I'll look into adding some additional checks in gocov, so others don't get
tripped up.
Regards,
Andrew
On Wed, Nov 28, 2012 at 9:54 AM, xchapter7x [email protected]:
Hi Andrew,
ex. file_test.go was in package P and also Importing package P. The
package
was a local import using a relative reference. I've read about several
issues regarding local imports and relative references. the most relevant
mentioning 2 copies of a package being the result. I've included a link.
Also, I'm using go version go1.0.2.https://codereview.appspot.com/5787055
-John
2012/11/27 Andrew Wilkins [email protected]
Hi John,
Thanks for the update. I'm glad you sorted it out; sorry I couldn't be
of
much assistance.Do you mean you had a package P, and test file with package name P_test,
which was importing P? Or the test file also had package name P? If the
latter, that's odd; I don't see how it would even get past "go test",
which
should complain about a cyclic import. Which version of Go are you
using?Regards,
Andrew—
Reply to this email directly or view it on GitHub<
https://github.com/axw/gocov/issues/13#issuecomment-10785713>.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-10786533.
Andrew Wilkins
http://awilkins.id.au
from gocov.
Related Issues (20)
- [Question] Can i use gocov to get code coverage report for a go application if my tests are written in another framework using python HOT 3
- Does gocov not support generics in Go version 1.20? HOT 1
- Output a coverage summary HOT 2
- flag provided but not defined: -coverprofile
- gocov output data format as standard go test does? HOT 8
- gocov's result is different from go test HOT 1
- If a package has no test files, the lines in that package are not added to the total line count. HOT 10
- Pass arguments to go list HOT 4
- please tag a version, to make go modules usage easier HOT 2
- gocov: gocov report print total coverage NaN% when totalReached and totalStatements are zero
- gocov does not pass -tags parameter HOT 1
- What is the difference to the go standard tools?
- gocov failed when trying on file that has a formatting directive
- 按照指示安装不了,有什么国内的镜像地址吗 HOT 1
- go get doesn't install HOT 2
- the code source default is $GOROOT. whether the code source path can be specified by the user when using gocov convert? HOT 3
- Unable to use go install HOT 2
- gocov with go1.18 generics HOT 3
- [question] Is it possible to exclude a method from code coverage? HOT 1
- gocov with coverprofile raise error, the file path contains duplicate parts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocov.