-
Notifications
You must be signed in to change notification settings - Fork 176
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
Release assets don't match repo structure #104
Comments
This also seems to have the effect that new rules don't get included in releases. For example,
#128 added that rule to
However, there is no
|
Bah. Let me take a look. |
…/ 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.
The release does not match because we have two different projects inside this repo.
The later set is essentially a separate release set from the first (which actually has no releases). If we ever drop the debian package using rules, we could then lift the WORKSPACE from pkg up a level and make release and source identical. Getting the tar, deb, rpm, & zip rules to a better state is a far higher priority right now. |
This really needs to be documented on your front page. Ended up here after much confusion. |
I want to understand user expectations and actual needs.
I am used to the world of C software, where source trees exist, but people don't use the source in-situ. They build the source, install it somewhere, and use the result. Things get packaged. To me, having the source tree and the distribution package match structure is a strange constraint. In this case, I packaged the package rules so that the at user run time, the BUILD files should not depend on anything the user does not need. With explicit intent, we strip out the need to bring in stardoc or anything needed to build the distribution. In a more extreme case, imagine that we needed a code generator written in Kotlin. I can structure the distribution build so we bring in Kotlin only to generate something, then we use that in the final distro. It would be wrong to distribute files that could require a user to depend on kotlin, because they did something like bazel test //external/rules_pkg/.... Let's take the case of a casual user wanting to go right against git commits. I'm going to declare that is just unsupported. I want the right to keep head at an intermediate, unsupported state. The releases are what we publish. The more interesting case is @whilp's of using your own fork. That is reasonable, because you take on the risk that you are using/making unsupported code, but the contract is explicit. For that, it seems like you could have the rules_pkg repo alongside your main workspace (or in the same SCM) with a local_repository rule that points into rules_pkg/pkg. The question is what doc changes are needed.
|
@aiuto the reason I needed to run a fork is because of bugfixes like #97 not being merged. My typical workflow for a fork is to fix an issue, get some real-world usage, and run on the fork while working with upstream to get the problem fixed. Pointing to a github commit of my own fork containing bugfixes so that the artifacts produced are usable while waiting for upstream to respond is not abandoning code provenance. Please do add the warning against pointing to git commits, it would have saved some headaches, as I would have realized that it was necessary to publish my own releases rather than pointing to a commit. I do not consider importing the rules_pkg repo into each consuming projects source tree and using |
It's really simple: all the other projects work like that, and the way that this one doesn't manifests in a cryptic error message which, if you're not that familiar with Bazel, makes the user waste a lot of time in figuring out what's going on. Two possible ways out of this: (a) will avoid people wasting their time (but still cannot use from HEAD). |
The release assets helpfully produce tarballs that make recent releases look like old releases. This has avoided breaking users that update from release to release.
rules_pkg-0.2.4.tar.gz
Unfortunately, that creates a divergence with the structure of the repo. Users that either follow commits on master or switch from releases to commits (to, say, get a particular fix before the next release) will observe strange-seeming issues like:
That's because
:deps.bzl
is actuallypkg:deps.bzl
in the repo.This divergence seems unusual given my experience with other
rules_*
projects (go, nodejs, etc). With those projects, I am mostly able to flip between releases, commits, and my own forks. I can imagine that the history of rules_pkg makes that different or harder.Is this expected? Do you intend to close the gap between release assets and the repo structure in the future?
Thanks!
The text was updated successfully, but these errors were encountered: