You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
OSX
What did you do?
I've been writing static code analyzer, so had to rely on go_tool_library (to avoid circular deps, which would occur if I've used go_library). Within that code analyzer, I wanted to use //go:embed directive, but it turns out that in #2806 support for that directive was added for go_library, go_binary, and go_test only.
What did you expect to see?
I expected that embedsrcs attribute is available for go_tool_library the same way it is available for go_library.
What did you see instead?
Instead I've seen that support for //go:embed was limited to go_library, go_binary, and go_test.
NB: I suppose go_embed_data might be used here, but since go 1.16 exposes native way of embedding, and rules_go do already implement new directive in go_library, it is probably worth implementing it in go_tool_library.
The text was updated successfully, but these errors were encountered:
This seems reasonable. go_tool_library and go_library have nearly the same implementation, so this might just be a matter of adding the embedsrcs attribute to the rule declaration.
Be advised though that go_tool_library should be deprecated in favor of go_library as soon as we stop needing go_tool_library for nogo, probably when Bazel 4.2 or 5.0 is the minimum supported version.
What version of rules_go are you using?
v0.26.0
What version of gazelle are you using?
v0.23.0
What version of Bazel are you using?
3.7.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
OSX
What did you do?
I've been writing static code analyzer, so had to rely on
go_tool_library
(to avoid circular deps, which would occur if I've usedgo_library
). Within that code analyzer, I wanted to use//go:embed
directive, but it turns out that in #2806 support for that directive was added forgo_library
,go_binary
, andgo_test
only.What did you expect to see?
I expected that
embedsrcs
attribute is available forgo_tool_library
the same way it is available forgo_library
.What did you see instead?
Instead I've seen that support for
//go:embed
was limited togo_library
,go_binary
, andgo_test
.NB: I suppose go_embed_data might be used here, but since go 1.16 exposes native way of embedding, and
rules_go
do already implement new directive ingo_library
, it is probably worth implementing it ingo_tool_library
.The text was updated successfully, but these errors were encountered: