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

compile flag to disable 'use of internal package not allowed' #19144

Closed
JavierZunzunegui opened this issue Feb 17, 2017 · 2 comments
Closed

compile flag to disable 'use of internal package not allowed' #19144

JavierZunzunegui opened this issue Feb 17, 2017 · 2 comments

Comments

@JavierZunzunegui
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.7.1

What operating system and processor architecture are you using (go env)?

linux
amd64

What did you do?

I have a code generating tool which creates a main that imports (almost) all pkgs it inspects.
This generated code is deliberately ignoring all "internal" boundaries otherwise respected in normal code, running into imports XXX/internal/XXX: use of internal package not allowed error when compiling.

I would like to add a flag to the go compile command to disable the "internal" check.

Disabling the use of disallowInternal is enough to stop the issue.

I currently run a modified go build with this disabled but I imagine others would benefit from having this option - even if normally discouraged.

What did you expect to see?

What did you see instead?

@bradfitz
Copy link
Contributor

Sorry, we're not keen on adding flags to begin with, much less to support behavior that we don't want to encourage.

You clearly need something, but I don't understand your problem enough to suggest what it might be. This feature request sounds like it might be an XY problem (http://xyproblem.info/) Let's understand the problem before we jump to solutions.

The mailing list or slack (see https://golang.org/wiki/Questions) would be a better forum.

@JavierZunzunegui
Copy link
Author

Thank you - presented my issue in further detail in the Go Forum

@golang golang locked and limited conversation to collaborators Feb 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants