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

kontrol build --rekompile fails with UnboundLocalError #134

Closed
palinatolmach opened this issue Oct 26, 2023 · 0 comments · Fixed by #137
Closed

kontrol build --rekompile fails with UnboundLocalError #134

palinatolmach opened this issue Oct 26, 2023 · 0 comments · Fixed by #137
Assignees

Comments

@palinatolmach
Copy link
Collaborator

kontrol build --rekompile now fails with the following error:

❯ kontrol build --rekompile
WARNING 2023-10-26 23:46:47,176 kontrol.__main__ - Ignoring command-line option: -O0
WARNING 2023-10-26 23:46:47,176 kontrol.__main__ - Ignoring command-line option: -O1
WARNING 2023-10-26 23:46:47,176 kontrol.__main__ - Ignoring command-line option: -O2
WARNING 2023-10-26 23:46:47,176 kontrol.__main__ - Ignoring command-line option: -O3
Traceback (most recent call last):
  File "/nix/store/z1xa7anzsy9wrx9avy334zgv3p9xvaz8-python3.10-kontrol-0.1.37/bin/..kontrol-wrapped-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/z1xa7anzsy9wrx9avy334zgv3p9xvaz8-python3.10-kontrol-0.1.37/lib/python3.10/site-packages/kontrol/__main__.py", line 71, in main
    execute(**vars(args))
  File "/nix/store/z1xa7anzsy9wrx9avy334zgv3p9xvaz8-python3.10-kontrol-0.1.37/lib/python3.10/site-packages/kontrol/__main__.py", line 130, in exec_build
    foundry_kompile(
  File "/nix/store/z1xa7anzsy9wrx9avy334zgv3p9xvaz8-python3.10-kontrol-0.1.37/lib/python3.10/site-packages/kontrol/kompile.py", line 148, in foundry_kompile
    plugin_dir=plugin_dir,
UnboundLocalError: local variable 'plugin_dir' referenced before assignment

kontrol build --rekompile --regen doesn't fail — it seems to be a bug introduced in #119, with plugin_dir = kdist.get('plugin') being set in an if-statement branch that doesn't get executed if only --rekompile is provided.

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 a pull request may close this issue.

1 participant