-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
Upstream github.com/phst/runfiles
as @io_bazel_rules_go//go/runfiles
#3036
Comments
Reading through the linked Bazel Runfiles Libraries doc I think I would like a little bit more authoritative of a citation around the expected structure of the runfiles library. "Deploying Rules" is an authoritative source for me and has me convinced that As a proposed fix for this, could we send a PR to update What do you think? |
I agree that the runfiles libraries are currently severely underdocumented. I have derived my knowledge mostly from the actual implementations in mainline Bazel (e.g., https://github.com/bazelbuild/bazel/blob/master/tools/java/runfiles/Runfiles.java and https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles_src.h). Which of these (or both) would you like me to do prior to upstreaming the runfiles library?
|
rules_go currently doesn't offer a way to discover runfiles following the standard procedures for runfiles discovery. There is https://pkg.go.dev/github.com/bazelbuild/rules_go/go/tools/bazel, but due to it predating the coordinated efforts to provide consistent runfiles libraries for all languages, it uses a non-standard procedure and doesn't interoperate well with the other libraries. It also invokes a bit too much magic that makes it prone to unexpected issues (e.g. it searches the working directory first before looking up the runfiles variables).
A proper replacement has been available as https://pkg.go.dev/github.com/phst/runfiles for quite some time now, so I would propose to upstream it (and would offer to do the work). According to the "Deploying rules" guide, this runfiles library should be available under
@io_bazel_rules_go//go/runfiles
(Gazelle could probably be taught to pick it up automatically).The text was updated successfully, but these errors were encountered: