-
Notifications
You must be signed in to change notification settings - Fork 402
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
rust_doc: strip directory prefix from archive names #474
Merged
dfreese
merged 9 commits into
bazelbuild:master
from
wchargin:wchargin-rustdoc-strip-prefix
Dec 12, 2020
Merged
rust_doc: strip directory prefix from archive names #474
dfreese
merged 9 commits into
bazelbuild:master
from
wchargin:wchargin-rustdoc-strip-prefix
Dec 12, 2020
Commits on Nov 4, 2020
-
rust_doc: strip directory prefix from archive names
The Zip archives emitted by `rust_doc` rules used to contain a long `/bazel-bin/k8-fastbuild/path/to/target` prefix before each archive entry name. This made it hard to work with the generated archive. This patch adds a transformation to This could be written in Starlark using the `DirectoryExapnder` API, but that was only introduced in Bazel 3.4.0. Since we have a minimum Bazel version of 0.17.1, we instead write the helper as a small Python script. Fixes bazelbuild#471. Test Plan: Unit tests included. As an end-to-end test, run ``` cd examples/ && bazel build //hello_world:hello_world_doc && unzip -l bazel-bin/hello_world/hello_world_doc.zip ``` to list the contents of the built `hello_world_doc.zip` archive. Before this patch, the result was like: ``` Archive: bazel-bin/hello_world/hello_world_doc.zip Length Date Time Name --------- ---------- ----- ---- 0 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/.lock 1792 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/COPYRIGHT.txt 4421 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/FiraSans-LICENSE.txt ... 2132 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/storage.js 1180 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/theme.js 3764 2010-01-01 00:00 bazel-out/k8-fastbuild/bin/hello_world/hello_world_doc/wheel.svg --------- ------- 890555 38 files ``` After this patch: ``` Archive: bazel-bin/hello_world/hello_world_doc.zip Length Date Time Name --------- ---------- ----- ---- 0 2010-01-01 00:00 .lock 1792 2010-01-01 00:00 COPYRIGHT.txt 4421 2010-01-01 00:00 FiraSans-LICENSE.txt ... 2132 2010-01-01 00:00 storage.js 1180 2010-01-01 00:00 theme.js 3764 2010-01-01 00:00 wheel.svg --------- ------- 890555 38 files ``` wchargin-branch: rustdoc-strip-prefix wchargin-source: 29978cf3bdb7de6cee154f8c11d0251574c2b104
Configuration menu - View commit details
-
Copy full SHA for 51b1ba8 - Browse repository at this point
Copy the full SHA 51b1ba8View commit details -
wchargin-branch: rustdoc-strip-prefix wchargin-source: 69b2e78f1f52c88609aff631c908471c7521c5f7
Configuration menu - View commit details
-
Copy full SHA for 0bd884c - Browse repository at this point
Copy the full SHA 0bd884cView commit details
Commits on Nov 6, 2020
-
wchargin-branch: rustdoc-strip-prefix wchargin-source: 40227180c7f910d9f76716cf42621e08e5f808a1
Configuration menu - View commit details
-
Copy full SHA for 24d6478 - Browse repository at this point
Copy the full SHA 24d6478View commit details -
wchargin-branch: rustdoc-strip-prefix wchargin-source: 8c46290195fc0668f3126589fd07ee863df8749f
Configuration menu - View commit details
-
Copy full SHA for 5ab7c6e - Browse repository at this point
Copy the full SHA 5ab7c6eView commit details -
wchargin-branch: rustdoc-strip-prefix wchargin-source: 838287ca34eb69c27f62e4a0900dbb7ac6a3ebd0
Configuration menu - View commit details
-
Copy full SHA for 2674343 - Browse repository at this point
Copy the full SHA 2674343View commit details
Commits on Nov 19, 2020
-
wchargin-branch: rustdoc-strip-prefix wchargin-source: ea88a0484df0608cb08521fb4cde2d4dc7904553
Configuration menu - View commit details
-
Copy full SHA for 1c405e0 - Browse repository at this point
Copy the full SHA 1c405e0View commit details -
wchargin-branch: rustdoc-strip-prefix wchargin-source: ea88a0484df0608cb08521fb4cde2d4dc7904553
Configuration menu - View commit details
-
Copy full SHA for a2f58a8 - Browse repository at this point
Copy the full SHA a2f58a8View commit details
Commits on Dec 3, 2020
-
[rustdoc-strip-prefix: update diffbase]
wchargin-branch: rustdoc-strip-prefix wchargin-source: aba05e35e129db74d032bcbfdb7764233a2d94ce
Configuration menu - View commit details
-
Copy full SHA for 9cacb6e - Browse repository at this point
Copy the full SHA 9cacb6eView commit details
Commits on Dec 12, 2020
-
Merge branch 'master' into wchargin-rustdoc-strip-prefix
David Freese committedDec 12, 2020 Configuration menu - View commit details
-
Copy full SHA for 569c738 - Browse repository at this point
Copy the full SHA 569c738View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.