Comments (4)
Could you share a reproducer that we could turn into an integration test?
Cc @JamyDev
from rules_go.
Basically this is the issue:
If I use the same package name that the package Im testing everything works perfectly.
But If I wanna separate the package name of the test files the GOPACKAGESDRIVER starts to emit a false positive about the imported packages like it was imported outside of the parent internal package.
from rules_go.
It is like the GOPACKAGESDRIVER is forcing to implement only white-box tests (having access to everything in the internal package not only exported definitions) it is ok, but most of the time we wanna implement black-box tests (only the exported API of the package not all the internal things).
Thanks in advance for supporting.
from rules_go.
Hmm odd, based on the definition of where it's allowable to use internal packages this should not mark this as an issue. We did recently fix it not allowing you to even have the black box tests like this, so this is more akin to a warning, but I'll have a look to see how we can fix this.
from rules_go.
Related Issues (20)
- How to test an analysis.Analyzer?
- Differentiate compile actions under go_test
- `GoLink` for Gazelle fails on Go 1.20 or greater HOT 2
- goleak broken by recent timeout changes
- How do I depend on the "bazel" package of rules_go when using MODULE.bazel HOT 3
- [BAZEL CI] rules_go cgo:opts_test is failing with Bazel@HEAD HOT 1
- go_tool_binary / GoToolchainBinaryBuild actions don't always run on the correct platform
- GoStdlib, GoCompilePkg, etc. don't respect exec_compatible_with of the underlying C/C++ toolchain HOT 1
- Calls to https://go.dev/dl/?mode=json are breaking airgapped builds - provide way to avoid these HOT 6
- rules_go + protobufs + experimental_sibling_repository_layout fails to build HOT 2
- How do you use protoc with 0.48.0? HOT 4
- Proposal: Fail protoc code gen on missing expected output files
- Embedding native buildinfo in Bazel binaries
- go_proto_library: Issue/New Feature for output path generation. HOT 1
- How to create go_proto_library automatically HOT 3
- rules_go 0.48.0 inconsistent strict deps behavior between bzlmod enabled and disabled HOT 2
- Cross-compilation to Linux on MacOS sets CGO_ENABLED=0 even though cgo=True in go_library and platform set to linux_amd64_cgo HOT 7
- link: package conflict error HOT 2
- Allow pure without purego HOT 4
- Rework gopackagedriver to use driver protocol from x/tools
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 rules_go.