-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add Starlark support for Symlink actions. #7514
Comments
@laurentlb I'm planning to investigate allowing symlinks to executables (it's unclear how dangling symlinks interact with them and I don't want to commit to an API yet), and to allow specifying a progress message for these actions (actually, it's not large change so I guess I'll just do it as part of #10695). That said, #10695 can be used by rule authors to create symlinks without any follow-ups. |
I think this is implemented and can be closed? |
Got here while reading some things about |
Thanks, closing. |
Description of the problem / feature request:
There are multiple benefits for using symlinks in certain actions, especially when creating directory structures or renaming artifacts' basenames. For example, rules_apple requires heavy usage of symlinks.
Given that symlinks are a core foundation of how Bazel works, Starlark should provide an API to register symlink actions, that work both on macOS, Linux and Windows. In native code this already exists, through the
SymlinkAction
class.This could be added to the
actions
interface, something likectx.actions.symlink(src, dest)
where bothsrc
anddest
areFile
instances created throughctx.actions.declare_file
, for example. Notice thatFile
instances can also represent tree artifacts.The text was updated successfully, but these errors were encountered: