-
Notifications
You must be signed in to change notification settings - Fork 98
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
Copy over runfiles library from Bazel #263
Conversation
@comius We could do this in time for Bazel 8, sorry for noticing so late. |
The runfiles library can be maintained independently of Bazel releases and bazel_tools can refer to it via an alias.
CI failure looks unrelated. |
cc/runfiles/BUILD
Outdated
actual = "@bazel_tools//tools/cpp/runfiles", | ||
srcs = ["runfiles.cc"], | ||
hdrs = ["runfiles.h"], | ||
# Ensure that this header can be included from the same directory as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could force users to use a new include path for the header when switching to this target and reexport it under the old path in bazel_tools
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be a bit better. Single migration instead of 2 and it's hard to motivate the second migration.
Also setup is much simpler without include_prefixes
, C++ rules don't need to create any symlinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The natural prefix would be cc/runfiles
, which I think may be too short. Making it rules_cc/cc/runfiles
would require a symlink. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I also change the namespace to something like rules_cc::runfiles
?
cc/runfiles/BUILD
Outdated
actual = "@bazel_tools//tools/cpp/runfiles", | ||
srcs = ["runfiles.cc"], | ||
hdrs = ["runfiles.h"], | ||
# Ensure that this header can be included from the same directory as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be a bit better. Single migration instead of 2 and it's hard to motivate the second migration.
Also setup is much simpler without include_prefixes
, C++ rules don't need to create any symlinks.
51ce5f4
to
babc8cf
Compare
@comius CI is green |
Hey, this PR needs a very sophisticated import. It will take some time. I'll do a 0.0.14 release before importing it. |
BEGIN_PUBLIC Copybara import of the project: -- 82e44f3 by Fabian Meumertzheim <fabian@meumertzhe.im>: Copy over runfiles library from Bazel The runfiles library can be maintained independently of Bazel releases and bazel_tools can refer to it via an alias. -- 885d333 by Fabian Meumertzheim <fabian@meumertzhe.im>: Switch to new include path and namespace -- b8cd815 by Fabian Meumertzheim <fabian@meumertzhe.im>: Fix CI -- 41b7d48 by Fabian Meumertzheim <fabian@meumertzhe.im>: Silence warnings -- b97a30e by Fabian Meumertzheim <fabian@meumertzhe.im>: Remove per_file_copt END_PUBLIC PiperOrigin-RevId: 697942902 Change-Id: I10a6c9baf0464722fca026db99cf572acfd159f1
Merged |
@comius Thanks for making the import work! Could you cut a release? Then I can finalize the removal of runfiles libraries from Bazel. |
Done. 0.0.17 |
The runfiles library can be maintained independently of Bazel releases and bazel_tools can refer to it via an alias.