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 ripunzip installer accessible from outside this repo. #17291

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

criemen
Copy link
Collaborator

@criemen criemen commented Aug 23, 2024

  • The relative path to misc doesn't work when running from another repo
  • The buildifier dependency is not available from other repos, therefore we can't pull in //misc/bazel without further refactoring.

Therefore, inline the runfiles snippet here.

* The relative path to misc doesn't work when running from another repo
* The buildifier dependency is not available from other repos,
  therefore we can't pull in //misc/bazel without further refactoring.

Therefore, inline the runfiles snippet here.
Comment on lines 5 to 14
# --- begin runfiles.bash initialization v3 ---
# Copy-pasted from the Bazel Bash runfiles library v3.
set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
source "$0.runfiles/$f" 2>/dev/null || \
source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v3 ---
Copy link
Contributor

@redsun82 redsun82 Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bleurgh, I wanted to avoid this... couldn't we just list our two possibilities?

source misc/bazel/runfiles.sh || source ql~/misc/bazel/runfiles.sh  # or whatever

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, there's the buildfier thing. I would just remove the dev_dependency=True to that. In any case codeql is not meant to be used as a dependency for anything else than semmle-code. Also, the correct suggestion here is

source misc/bazel/runfiles.sh 2>/dev/null || source external/ql~/misc/bazel/runfiles.sh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I'd be ok if you insist 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you delivered the correct path, I'll fix the buildifier thing :D
It is another dependency on tilde versus plus we'll have to fix, but oh well.

@criemen criemen requested a review from a team as a code owner August 23, 2024 15:26
@criemen criemen requested a review from redsun82 August 23, 2024 15:27
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The buildifier refactoring is better!

@redsun82 redsun82 merged commit c4c8c9d into main Aug 23, 2024
18 checks passed
@redsun82 redsun82 deleted the criemen/ripunzip branch August 23, 2024 18:14
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

Successfully merging this pull request may close these issues.

2 participants