Skip to content
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

labels: correct usage #16

Open
danwos opened this issue Apr 8, 2019 · 0 comments
Open

labels: correct usage #16

danwos opened this issue Apr 8, 2019 · 0 comments

Comments

@danwos
Copy link
Member

danwos commented Apr 8, 2019

I think the string to use to adress a package is wrong, e.g //main
Based on the Bazle concept page [1], this would address a target called main in the package main.
So //main is the same as //main:main

Using simply main would be the solution here, but Bazel seems to know only relative path.
So the exact location of main can be calculated only, if the current location (working dir / packages) is known. As far as I have understood, bazel as no character to indicate that a package-path starts on root.
It looks like bazel tests first, if it is a relative path, if not it must start on root level / workspace.

So here is a proposal to label the bazel objects correctly:

  • workspace: folder_path (keep as it is)
  • package: name (no //, always complete path, no relative paths allowed)
  • targets: //package:target (keep as it is, but should support also the shortcuts //name (->//name:name but then we may have problems with rules))
  • rules, macro, impl: //package:target:rule (keep as it is, shortcuts are a problem. Maybe do not allow)
  • attributes: //package:target:rule:attribute (keep as it is, not shortcuts)

[1] https://docs.bazel.build/versions/master/build-ref.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant