Skip to content

Commit 111c698

Browse files
CI: simplify steps for using in-repo please_pex tool
The circular dependency between please_pex and its bootstrap archive was broken in please-build#266, allowing for the plugin to be configured to use `//tools_please_pex` as its own pex tool. This is simpler than building the please_pex binary in one step, copying it elsewhere in the file system for persistence, then configuring future steps to use that binary as the pex tool.
1 parent db0a777 commit 111c698

File tree

4 files changed

+2
-33
lines changed

4 files changed

+2
-33
lines changed

.github/workflows/plugin_test.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,10 @@ jobs:
3838
- name: Configure plugin's default Python interpreter
3939
run: |
4040
echo "PLZ_ARGS=-o plugin.python.defaultinterpreter:${{ steps.python.outputs.python-path }}" >> $GITHUB_ENV
41-
- name: Build please_pex
41+
- name: Configure plugin to use please_pex tool built from source
4242
if: inputs.please_pex_from_repo
43-
# This copies the please_pex binary into the runner user's home directory so it persists across steps.
4443
run: |
45-
./pleasew build //tools/please_pex
46-
cp $(./pleasew query outputs //tools/please_pex) $HOME/please_pex
47-
echo "PLZ_ARGS="$(grep ^PLZ_ARGS= $GITHUB_ENV | cut -d= -f2-)" -o plugin.python.pextool:$HOME/please_pex" >> $GITHUB_ENV
44+
echo "PLZ_ARGS="$(grep ^PLZ_ARGS= $GITHUB_ENV | cut -d= -f2-)" -o plugin.python.pextool://tools/please_pex" >> $GITHUB_ENV
4845
- name: Run tests
4946
run: ./pleasew test --keep_going --log_file plz-out/log/test.log ${{ inputs.test_targets }}
5047
- name: Archive logs

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
tools/please_pex_dev
2-
31
# Entries below this point are managed by Please (DO NOT EDIT)
42
plz-out
53
.plzconfig.local

.plzconfig.tool_dev

Lines changed: 0 additions & 13 deletions
This file was deleted.

tools/BUILD

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,3 @@ remote_file(
1313
binary = True,
1414
visibility = ["PUBLIC"],
1515
)
16-
17-
# This target is only intended for use during plugin development. Its only purpose is to break the
18-
# mutual dependency between please_pex and the python_wheels in the bootstrap pex, which prevents
19-
# PexTool from being set to //tools/please_pex in order to test changes to please_pex.
20-
#
21-
# See .plzconfig.tool_test for more details.
22-
filegroup(
23-
name = "please_pex_dev",
24-
srcs = ["please_pex_dev"],
25-
binary = True,
26-
labels = ["manual"],
27-
visibility = ["PUBLIC"],
28-
)

0 commit comments

Comments
 (0)