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

Hidden dependency #12

Closed
phodina opened this issue Jul 27, 2023 · 1 comment
Closed

Hidden dependency #12

phodina opened this issue Jul 27, 2023 · 1 comment
Labels

Comments

@phodina
Copy link

phodina commented Jul 27, 2023

Hi,

would it be possible to refactor the code in such a way that running the module A would not import another module B that imports from A?

In this case Guix/Nix modifies/replaces the original lglaf file and replaces it with a shell script that has paths to all the needed python modules and as last step executes the Python interpreter.

Fix would be to point/import to the real file/module .lglaf.py-real but IMHO the function that's imported should be part of some utils module.

A: lglaf.py
B: laf_crypto

pethod@CZPRGL-B18SYD3 ~/expanse/expanse/packages$ /gnu/store/qj9xjlrci45shbms6kkklmyck0pgflpx-lglaf-0.1/bin/lglaf.py
Traceback (most recent call last):
  File "/gnu/store/qj9xjlrci45shbms6kkklmyck0pgflpx-lglaf-0.1/bin/.lglaf.py-real", line 41, in <module>
    import laf_crypto
  File "/gnu/store/qj9xjlrci45shbms6kkklmyck0pgflpx-lglaf-0.1/lib/python3.10/site-packages/laf_crypto.py", line 4, in <module>
    from lglaf import int_as_byte
  File "/gnu/store/qj9xjlrci45shbms6kkklmyck0pgflpx-lglaf-0.1/bin/lglaf.py", line 2
    jr-python-packaging-bootstrap-21.3/lib/python3.10/site-packages:/gnu/store/k7svck56hhagdg3q4nqlk5z1j57w9sli-python-pycparser-2.21/lib/python3.10/site-packages:/gnu/store/ij3wk9likzyv9jbwx60rmi0vyjhdi2dw-python-six-bootstrap-1.16.0/lib/python3.10/site-packages:/gnu/store/wlmf5spfdmsjiw6cx30h0rpydfpz3gil-python-pyparsing-3.0.6/lib/python3.10/site-packages${GUIX_PYTHONPATH:+:}$GUIX_PYTHONPATH"
           ^^^^^^^^^^^^^^^
SyntaxError: invalid syntax
@phodina phodina changed the title Cyclic dependency Hidden dependency Jul 27, 2023
@steadfasterX
Copy link
Owner

everything is possible - but this ain't gonna happen sorry. not that I don't like the idea but there is no time on my site - especially as it is more a conceptual issue then a problem preventing (regular) things to work. as said: it would be better implemented in a utils or sim module though but this requires first of all the time doing it and ofc even more for testing all known scenarios

@steadfasterX steadfasterX closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants