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

Make :outdated work with --nolegacy_external_runfiles #595

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Sep 8, 2021

With --nolegacy_external_runfiles, the working directory relative path
to outdated.jar should start with ../ rather than external/.

Fixes #538.

With --nolegacy_external_runfiles, the working directory relative path
to outdated.jar should start with ../ rather than external/.

Fixes bazelbuild#538.
@cheister
Copy link
Collaborator

Thanks for the fix. Mind adding the following test in this PR as well?

diff --git a/tests/bazel_run_tests.sh b/tests/bazel_run_tests.sh
index a1ad9d9..b5af874 100755
--- a/tests/bazel_run_tests.sh
+++ b/tests/bazel_run_tests.sh
@@ -20,7 +20,14 @@ function test_outdated() {
   expect_log "junit:junit \[4.12"
 }
 
-TESTS=("test_duplicate_version_warning" "test_outdated")
+function test_outdated_no_external_runfiles() {
+  bazel run @regression_testing//:outdated --nolegacy_external_runfiles >> "$TEST_LOG" 2>&1
+
+  expect_log "Checking for updates of .* artifacts against the following repositories"
+  expect_log "junit:junit \[4.12"
+}
+
+TESTS=("test_duplicate_version_warning" "test_outdated" "test_outdated_no_external_runfiles")
 
 function run_tests() {
   printf "Running bazel run tests:\n"

@fmeum
Copy link
Contributor Author

fmeum commented Sep 24, 2021

Thanks for the suggestion, done. Not sure about the test failures:

Analysis of target '//:my_app' failed; build aborted: Bazel requires Android build tools version 30.0.0 or newer, 28.0.2 was provided

@fmeum
Copy link
Contributor Author

fmeum commented Sep 29, 2021

The CI failures were resolved by merging master. Everything is ready to be merged now.

@jin
Copy link
Member

jin commented Sep 29, 2021

@cheister feel free to merge if it looks good to you!

@cheister cheister merged commit a1eaa5b into bazelbuild:master Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bazel run @maven//:outdated fails with error: Unable to access jarfile
3 participants