Closed l0b0 closed 9 months ago
Could you share the results of pip freeze
in the environment you've built? I wasn't able to reproduce this.
My test environment was Linux x86_64 with py 3.11 and
$ pip freeze
attrs==23.1.0
certifi==2023.11.17
charset-normalizer==3.3.2
check-jsonschema==0.27.3
click==8.1.7
idna==3.6
jsonschema==4.20.0
jsonschema-specifications==2023.11.2
referencing==0.31.1
regress==0.4.2
requests==2.31.0
rpds-py==0.13.2
ruamel.yaml==0.18.5
ruamel.yaml.clib==0.2.8
urllib3==2.1.0
So this seems to me like a case of some kind of unusual broken environment build.
I notice that the error report says 0.27.1 and 0.27.3, but the error text refers to 0.25.0 . Is that just a discrepancy between various tested versions, or is it a potential indicator that you aren't running the version you intend to run?
Could you share the results of pip freeze in the environment you've built?
No, because Nix doesn't use pip, building everything from source.
I notice that the error report says 0.27.1 and 0.27.3, but the error text refers to 0.25.0 . Is that just a discrepancy between various tested versions, or is it a potential indicator that you aren't running the version you intend to run?
:open_mouth: You're right! Turns out I had forgotten about direnv installing check-jsonschema
when cd
-ing into the project directory, and even if I was running /path/to/nixpkgs/result/bin/check-jsonschema
it used the site-packages from direnv in the emergency-management-tools repo.
Glad you worked it out!
Could you share the results of pip freeze in the environment you've built?
No, because Nix doesn't use pip, building everything from source.
Just for my own edification, is there some equivalent I should ask for when interacting with Nix users? In such cases, I really just want a list of installed packages and their versions. A listing on site-packages would probably work... Is there a site-packages dir?
Could you share the results of pip freeze in the environment you've built?
No, because Nix doesn't use pip, building everything from source.
Just for my own edification, is there some equivalent I should ask for when interacting with Nix users? In such cases, I really just want a list of installed packages and their versions. A listing on site-packages would probably work... Is there a site-packages dir?
Actually, I'm wrong. I just have to install pip in the environment (it's not necessary in Nix environments in general), then it does have insight into which packages have been built:
❯ pip freeze
aiodns @ file:///tmp/nix-build-python3.10-aiodns-3.0.0.drv-0/source/dist/aiodns-3.0.0-py3-none-any.whl
aiohttp @ file:///tmp/nix-build-python3.10-aiohttp-3.8.5.drv-0/aiohttp-3.8.5/dist/aiohttp-3.8.5-cp310-cp310-linux_x86_64.whl
[…]
To reproduce:
check-jsonschema --builtin-schema=vendor.github-workflows .github/workflows/*.yml
Expected result: Exit code 0, no output.
Actual result: