Kompile executes post-processing command in modified environment
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, shell
- Domain
- build-system, cli, tooling
Research direction
Start at the kompile entry point handling --post-process and reproduce the behavior with script.sh in the Docker command shown. Compare the environment seen by script.sh when run directly and through kompile; done means post-processing preserves the caller's environment without unintended PATH changes.
Written by the indexing model from the issue text.
Description
When running kompile with --post-process <command>, one would expect that command is executed in the caller's environment (extended perhaps with a few variables that do not clash with existing ones).
This is not the case however. Consider e.g. script.sh:
env
false
Then
% docker run -it --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u):$(id -g) runtimeverificationinc/kframework-k:ubuntu-focal-5.4.26 sh script.sh
produces
HOSTNAME=11b5112cca9a
HOME=/
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=<working directory>
TZ=America/Chicago
whereas
% docker run -it --rm -v $(pwd):$(pwd) -w $(pwd) -u $(id -u):$(id -g) runtimeverificationinc/kframework-k:ubuntu-focal-5.4.26 kompile imp.k --post-process 'sh script.sh'
produces
[Error] Critical: Post-processing returned a non-zero exit code: 1
Stdout:
K_COLOR_SUPPORT=8
HOSTNAME=16538a1e94af
LD_LIBRARY_PATH=:/usr/lib/kframework/native/linux64
SHLVL=1
HOME=/
_=/usr/lib/kframework/../../bin/java
TERM=xterm
K_OPTS=-Xms64m -Xmx4096m -Xss32m -XX:+TieredCompilation
PATH=/usr/lib/kframework/native/linux64:/usr/lib/kframework/../../bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LC_ALL=C
PWD=<working directory>
TZ=America/Chicago
Stderr:
Notably, $PATH is extended with new directories, so command names might resolve to different files.
- Dominant language
- Python
- Stars
- 591
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from runtimeverification/k
-
runtimeverification/k#4939 · 1 assignee ·
-
Concolic Explorer Open
Difficulty 5/5 Over a week Newbie friendliness 32/100
runtimeverification/k#4937 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
runtimeverification/k#4936 ·
-
type:epic
runtimeverification/k#4934 · 4 comments · 1 assignee ·
-
runtimeverification/k#4924 · 1 assignee ·
All issues in runtimeverification/k
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100