-
Notifications
You must be signed in to change notification settings - Fork 46
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
Exclude fake components from build process #224
Comments
Another idea, other than build tag conditionals, we could suffix files with _test, not sure about any possible downsides. |
@fabriciojs build tags won't work at all, because the fake structs and interface are under the same package of the real ones, so the compiler understand that they must be available to entire package, so you cannot ignore them on building process. But we could use build tags if we put all tests and fakers in separated packages, keeping in the original packages only the code that will be built. |
I'm not sure, but I guess that unnecessary code will be executed on our tests, if golang executes any function inside |
The functions executed should be only t ones prefixed with test.
Now about the build tags - you are saying we cannot ignore only one file
from one package? I didn’t get that but will follow up on research about it.
…On Tue, 12 Jan 2021 at 17:20 Daniel Jun Suguimoto ***@***.***> wrote:
Another idea, other than build tag conditionals, we could suffix files
with _test, not sure about any possible downsides.
I'm not sure, but I guess that unnecessary code will be executed on our
tests, if golang executes any function inside *_test.go files as test
cases...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#224 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIQRWJ4K2CRKJSAJMTRGYTSZSVJTANCNFSM4U424KHQ>
.
|
This is not something pressing, nor causing any noticeable downsides. Can we close this? |
@fabriciojs yep, for me it's ok closing it... |
As discussed with the team, we don't need to compile the fake components, which are used only for testing, into the final binary files
The text was updated successfully, but these errors were encountered: