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

Rules_pkg repo layout doesn't follow best practices from https://docs.bazel.build/versions/master/skylark/deploying.html #111

Closed
hlopko opened this issue Oct 29, 2019 · 2 comments
Assignees
Labels
internal cleanup P2 An issue that should be worked on when time is available
Milestone

Comments

@hlopko
Copy link
Member

hlopko commented Oct 29, 2019

Hello dear rules_pkg owners,

I see that this repository is not really following the best practices described at https://docs.bazel.build/versions/master/skylark/deploying.html (e.g. there is no @rules_pkg//pkg:defs.bzl). Since this repo will soon become a dependency of almost every Bazel project out there it would be great if we could get it into well-behaved state ASAP.

Are there reasons for not having a single top level WORKSPACE file (and having one in pkg directory)? Can we just change it?

Thanks!

nacl pushed a commit to nacl/rules_pkg that referenced this issue Mar 25, 2020
…/ tree

The release packages currently do not share the same file structure as the git
source tree, causing confusion when one switches from the git repository
structure to the archive structure.  Unfortunately, this doesn't really work
with rules_pkg right now due to bazelbuild/bazel#10062.

Further, the `experimental/` tree containing `pkgfilegroup` was missing from the
0.2.5 release archive.  It will be present in future releases (in
`pkg/experimental/`).

Additional changes in the future will involve changing the entire structure of
rules_pkg to match existing best practices (bazelbuild#111).  Given that this is somewhat
invasive change, this one is made for now to favor consistency with that
currently exists.

Testing was done by building the archive, extracting its contents, and
performing a diff (`//distro:rules_pkg-0.2.5`), further confirming that
`pkgfilegroup` was available with a custom project importing rules_pkg.

Fixes bazelbuild#104.
@aiuto aiuto added the p4 An idea that we are not considering working on at this time. label May 13, 2021
@aiuto aiuto self-assigned this Oct 21, 2021
@aiuto aiuto added P2 An issue that should be worked on when time is available and removed p4 An idea that we are not considering working on at this time. labels Oct 21, 2021
@aiuto aiuto added this to the 1.0 milestone Oct 21, 2021
@aiuto
Copy link
Collaborator

aiuto commented Oct 21, 2021

I can redo the structure. Some of the best practices need an update, so I am not aiming for strict agreement with that doc.

aiuto added a commit to aiuto/rules_pkg that referenced this issue Oct 21, 2021
- WORKSPACE moves up one level
  - this makes //:pkg.bzl effectively //pkg:pkg.bzl
  - put forwarders in place at top level to not break anyone
- tests moves up one level
- toolchains moves up one level
- examples/**/BUILD do not change to the new rule locations
  - this is explicitly to provide some proof that the forwarders work
  - new examples should use the proper paths to .bzl files
  - near the 1.x release we can clean the current ones up

Fixes: bazelbuild#111
aiuto added a commit to aiuto/rules_pkg that referenced this issue Oct 21, 2021
- WORKSPACE moves up one level
  - this makes //:pkg.bzl effectively //pkg:pkg.bzl
  - put forwarders in place at top level to not break anyone
- tests moves up one level
- toolchains moves up one level
- examples/**/BUILD do not change to the new rule locations
  - this is explicitly to provide some proof that the forwarders work
  - new examples should use the proper paths to .bzl files
  - near the 1.x release we can clean the current ones up

Fixes: bazelbuild#111
@aiuto
Copy link
Collaborator

aiuto commented Oct 27, 2021

Dup of #104

@aiuto aiuto closed this as completed Oct 27, 2021
aiuto added a commit that referenced this issue Nov 4, 2021
* Reorganize the source tree

- WORKSPACE moves up one level
  - this makes //:pkg.bzl effectively //pkg:pkg.bzl
  - put forwarders in place at top level to not break anyone
- tests moves up one level
- toolchains moves up one level
- examples/**/BUILD do not change to the new rule locations
  - this is explicitly to provide some proof that the forwarders work
  - new examples should use the proper paths to .bzl files
  - near the 1.x release we can clean the current ones up

Fixes: #111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal cleanup P2 An issue that should be worked on when time is available
Projects
None yet
Development

No branches or pull requests

2 participants