Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Alias target not installed. Expected to be symbolic link or copy depending on platform #28

@hzeller

Description

@hzeller

An alias rule
https://docs.bazel.build/versions/3.2.0/be/general.html#alias
gives a different name to an existing thing.

I'd like to use this in verible to phase out legacy binary names and move them to new names (to implement chipsalliance/verible#169 ).

But simply declaring this in bazel:

alias(
   name = "old_binary_name",
   actual = ":new_binary_name"
)

and then using the old_binary_name alias name in an bazel_rules_install installer() target will not install anything (but will also not complain); I suppose because the alias is actually just an internal name within bazel, but actually never shows up as tangible object.

For installation: My proposal would be to interpret the alias information and create either a symbolic link or a copy, depending on the installation platform.

(Of course, I could implement the legacy-names with a little shell-script which then exec's the new location etc., but it would be less platform agnostic. Using 'alias' is the exact abstraction that conveys the intent much better and the install target can use the additional context to do the right thing on the target platform - symbolic link or copy)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions