Closed josmad closed 4 years ago
Hm, I'm looking at this again and is there no better way to get these file paths than assuming they're relative to the library
's directory in the GOPATH?
I wanted to add an explicit dependency on a file within a go_library
rule (or just the whole rule) to re-run mock generation if a listed aux_files
changes. However, I was unsure how to do it (if it is even possible).
If we can get the file paths of files
in go_library
rules it may be an option to change the attribute to reference go_library
rules.
Assuming that is possible I had two ideas:
label_list
and eagerly add all files in the referenced go_library
.label_keyed_string_dict
mapping from go_library
rule to a file name listed in that rule.
Given files
other.go
andsample.go
other.gosample.go
The gomock stanza below fails with
unknown embedded interface Y
:With this PR and modifying the stanza as below succeeds in generating the mock: