rules_pkg icon indicating copy to clipboard operation
rules_pkg copied to clipboard

PackageSymlinkInfo provider has confusing terminology

Open nacl opened this issue 3 years ago • 2 comments

#496 updated pkg_mklink and PackageSymlinkInfo to refer to target and link_name instead of src and dest, or similar.

It looks like PackageSymlinkInfo still says destination instead of link_name:

https://github.com/bazelbuild/rules_pkg/blob/cce90a09cef0acc4e5e224631caf73dff77bd382/pkg/providers.bzl#L63-L73

Fix this and all provider uses.

nacl avatar Feb 10 '22 21:02 nacl

It's a tough call. We use destination internally in most code to mean the file that gets created. The key of the dest_src_map.

aiuto avatar Feb 11 '22 01:02 aiuto

But isn't that terminology used only internally? We don't have to care about this WRT the externally-facing provider interface.

Regardless, I'm more concerned that there's a terminology mixup here. We say "destination" and "target" instead of either:

  • "link_name" and "target"
  • "destination and "source"

We should pick one. I vote for "link_name" and "target" to match the pkg_mklink interface. More intuitive that way IMO.

nacl avatar Feb 15 '22 18:02 nacl