-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: Unclear guidelines on what files/directories are ignored #20337
Comments
--https://golang.org/cmd/go/#hdr-Description_of_package_lists |
Ok, so is it a bug that my example code compiles? |
I guess the underlying question is "is there a difference between things that are ignored by the |
yes, there is a difference. Those paths will (probably) not show up in |
Ok, so we can close this issue, and I should change Thanks! |
@sectioneight I think you should do the opposite
|
Sorry, what exactly do you mean by "the opposite"? Change |
You should _not_ change dep to recruse into paths starting with a period or
an underscore.
…On Fri, May 12, 2017 at 1:51 PM, Aiden Scandella ***@***.***> wrote:
Sorry, what exactly do you mean by "the opposite"? Change dep or change go
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20337 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA91TBk-2k4RS5Fr8-odE5vpkN4Ygks5r49dIgaJpZM4NYyyU>
.
|
Ok. In that case Suggestions? Or am I missing something really obvious. |
You can import that package in another package, but it will not match the
globbing rules of the go tool.
It sounds like dep is conflating two different operations
- for a tree of directories; figure out which contain valid Go packages
- for a directory of source files; figure out which ones are are in scope
according to build rules.
…On Fri, May 12, 2017 at 1:55 PM, Aiden Scandella ***@***.***> wrote:
Ok. In that case dep will fail if a dependency has a package named ".foo"
since it doesn't see the source code... We have a real world example of
this today with uber/cherami-client-go/.generated.
Suggestions? Or am I missing something really obvious.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20337 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA2-GXNFtBRQs6sZ0MdQg9R7xf1qYks5r49gzgaJpZM4NYyyU>
.
|
(we can probably close this and discuss over in the dep issue) |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8.1
What operating system and processor architecture are you using (
go env
)?darwin x86_64
What did you do?
What did you expect to see?
I expected a compilation error, given that documentation states that "." and "_" prefixed files will be ignored, however this rule does not seem to apply to directories. I ran into this yesterday with @davecheney, who suggested that I modify golang/dep to skip scanning directories which start with
_
or.
. Currently we're in a weird situation where files are ignored but directories are not, and I can't find any documentation stating what the source of truth should be. Doesgolang/dep
have the correct behavior, or broken behavior? Will the golang toolchain eventually stop compiling directories that start with.
or_
?What did you see instead?
It worked:
The text was updated successfully, but these errors were encountered: