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

Resolve error checking does not account for environment markers. #851

Closed
jsirois opened this issue Jan 18, 2020 · 0 comments · Fixed by #861
Closed

Resolve error checking does not account for environment markers. #851

jsirois opened this issue Jan 18, 2020 · 0 comments · Fixed by #861
Assignees

Comments

@jsirois
Copy link
Member

jsirois commented Jan 18, 2020

#828 introduced build-time detection of resolution errors but this new facility can trip erroneously when environment markers are in-play. For example, as discovered upgrading Pants to Pex 2.1.0 in pantsbuild/pants#8881:

$ python2 -mpex --disable-cache --interpreter-constraint "CPython==3.6.*" pytest pytest-cov pytest-rerunfailures pytest-timeout setuptools==44.0.0
Failed to resolve compatible distributions:
1: importlib-metadata==1.4.0 requires configparser>=3.5; python_version < "3" but None was resolved
2: importlib-metadata==1.4.0 requires contextlib2; python_version < "3" but None was resolved
3: importlib-metadata==1.4.0 requires pathlib2; python_version < "3" but None was resolved
4: pytest==5.3.3 requires pathlib2>=2.2.0; python_version < "3.6" but None was resolved

Here it is correct to not resolve any of the 4 mentioned items since they all only apply for python <3.6 whereas the pex is being built for 3.6.

@jsirois jsirois self-assigned this Jan 18, 2020
This was referenced Jan 18, 2020
jsirois added a commit to jsirois/pex that referenced this issue Jan 23, 2020
Previously we failed to do this and would erroneously fail resolves as
a result.

Fixes pex-tool#851
jsirois added a commit to jsirois/pex that referenced this issue Jan 23, 2020
Previously we failed to do this and would erroneously fail resolves as
a result.

Fixes pex-tool#851
jsirois added a commit to jsirois/pex that referenced this issue Jan 25, 2020
Previously we failed to do this and would erroneously fail resolves as
a result.

Fixes pex-tool#851
jsirois added a commit that referenced this issue Jan 25, 2020
Respect env markers when checking resolves.

Previously we failed to do this and would erroneously fail resolves as
a result.

Fixes #851
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant