DavHau / mach-nix

Create highly reproducible python environments
MIT License
861 stars 106 forks source link

master ~3.5.0 # Exception: couldn't parse: 'urllib3[secure, socks]~=1.26' #455

Open InLaw opened 2 years ago

InLaw commented 2 years ago

What is the easiest way to get the package (containing the condition) into the error message as well

building '/nix/store/p3h7vq3q26nh4bynq0jdljvqdbrqh70g-mach_nix_file.drv'...
Traceback (most recent call last):
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 110, in <module>
    main()
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 103, in main
    do()
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generate.py", line 66, in do
    expr = generator.generate(reqs)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/generators/overides_generator.py", line 36, in generate
    pkgs = self.resolver.resolve(reqs)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 55, in resolve
    result = resolvelib.Resolver(Provider(self.nixpkgs, self.deps_provider), reporter).resolve(reqs, max_rounds=1000)
  File "/nix/store/dqycz72idf1h36121gnkrf40q0m3nqpq-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 413, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/nix/store/dqycz72idf1h36121gnkrf40q0m3nqpq-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 310, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/nix/store/dqycz72idf1h36121gnkrf40q0m3nqpq-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 223, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/nix/store/dqycz72idf1h36121gnkrf40q0m3nqpq-python3-3.9.12-env/lib/python3.9/site-packages/resolvelib/resolvers.py", line 214, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/resolver/resolvelib_resolver.py", line 39, in get_dependencies
    install_requires, setup_requires = self.provider.get_pkg_reqs(candidate)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 195, in get_pkg_reqs
    return provider.get_pkg_reqs(c)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/data/providers.py", line 353, in get_pkg_reqs
    install_reqs = list(filter_reqs_by_eval_marker(parse_reqs(reqs_raw), self.context_wheel, c.selected_extras))
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/cache.py", line 14, in cache_wrapper
    result = tuple(result)
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 77, in parse_reqs
    yield Requirement(*parse_reqs_line(line))
  File "/nix/store/6dr20pzvf1k8y6804dw8q31nj4d7aamz-h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/requirements.py", line 143, in parse_reqs_line
    raise Exception(f"couldn't parse: '{line}'")
Exception: couldn't parse: 'urllib3[secure, socks]~=1.26'
builder for '/nix/store/p3h7vq3q26nh4bynq0jdljvqdbrqh70g-mach_nix_file.drv' failed with exit code 1
error: while evaluating the attribute 'buildInputs' of the derivation 'nix-shell' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating the attribute 'passAsFile' of the derivation 'python3-3.9.12-env' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/stdenv/generic/make-derivation.nix:205:7:
while evaluating the attribute 'passAsFile' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/build-support/buildenv/default.nix:77:5:
while evaluating 'callPackageWith' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:117:35, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/development/interpreters/python/default.nix:24:24:
while evaluating 'makeOverridable' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:67:24, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:121:8:
while evaluating anonymous function at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/development/interpreters/python/default.nix:25:10, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:69:16:
while evaluating 'makeScopeWithSplicing' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:222:80, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/pkgs/development/interpreters/python/default.nix:79:12:
while evaluating 'extends' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:69:24, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/customisation.nix:233:14:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:69:67:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:78:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating 'composeExtensions' at /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:75:18, called from /nix/store/fx5cnr6jkp6jmv3n8hy7hl5fc86rnjlj-nixos-21.11.337514.4c560cc7ee5/nixos/lib/fixed-points.nix:76:22:
while evaluating the attribute 'overrides' at /nix/store/h88mkfsmnchwn89a3mbgh7d6ixy1di5l-source/mach_nix/nix/lib.nix:187:7:
build of '/nix/store/p3h7vq3q26nh4bynq0jdljvqdbrqh70g-mach_nix_file.drv' failed
ajc161 commented 2 years ago

This is not an answer to your question but after having the same issue I tracked down the package to https://github.com/SeleniumHQ/selenium/tree/trunk/py.

c0decafe commented 2 years ago

the offending line has been removed https://github.com/SeleniumHQ/selenium/commit/95f0cba280d76d3119c84575aab07270828f0f38, but wasn't pushed in a release yet:

quick (and wrong) fix here: https://github.com/c0decafe/mach-nix/commit/159add8596476d3ad4a252e9e9063437f5c5858b

that being said I'm not sure if that's a specs issue from selenium or from the mach-nix parser.