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

Bytecode compile using the correct interpreter. #126

Closed
wants to merge 15 commits into from

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jun 12, 2015

Previously a PEXBuilder with a custom interpeter would not use it to
bytecode compile sources when building a pex. This could lead to errors
when the current interpreter and the target interpreter spanned breaking
language changes.

Kill the CodeMarshaller which has only its marshalling half used in
favor of using py_compile from the stdlib in the new
interpreter-sensitive Compiler class.

Additionally, actually compile all PEXBuilder source including any
generated __init__.pys, the generated __main__.py and everything in the
_pex/ bootstrap.

https://rbcommons.com/s/twitter/r/2350/

jsirois added 6 commits June 10, 2015 15:37
Before the fix the `_ResolvableSet` was blind to any packages built and
cached in earlier loops of a complex resolve.  This change makes the
resolvable set aware by tracking built packages and replacing unbuilt
packages with them in the resolvable set.

Failing tests were added pass with the fixes.
Also kill an unused import caught by twitterstyle.
Previously a PEXBuilder with a custom interpeter would not use it to
bytecode compile sources when building a pex.  This could lead to errors
when the current interpreter and the target interpreter spanned breaking
language changes.

Kill the CodeMarshaller which has only its marshalling half used in
favor of using py_compile from the stdlib in the new
interpreter-sensitive Compiler class.

Additionally, actually compile all PEXBuilder source including any
generated __init__.pys, the generated __main__.py and everything in the
_pex/ bootstrap.
@jsirois
Copy link
Member Author

jsirois commented Jun 12, 2015

This is part of addressing pantsbuild/pants#1658

@jsirois
Copy link
Member Author

jsirois commented Jun 12, 2015

This addresses #127

@jsirois
Copy link
Member Author

jsirois commented Jun 30, 2015

Submitted @ ac3c7f1

@jsirois jsirois closed this Jun 30, 2015
@jsirois jsirois deleted the jsirois/cross_compile/fix branch July 3, 2015 19:01
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 this pull request may close these issues.

1 participant