-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for the scie modifying itself on 1st run. #9
Labels
idea
Ideas that may or may not be good.
Comments
jsirois
added a commit
to jsirois/jump
that referenced
this issue
Nov 9, 2022
Now commands can depend on `{boot.bindings.<binding name>}` placeholders which are satisfied by boot bindings commands that are run exactly once. This is used in the Python example to produce a scie-pants Pants binary that prepares a fully pre-compiled Pants venv that runs at the full speed of a native Pants venv. The boot binding command that creates the venv also uses a private PEX_ROOT and cleans this up in addition to the Pants PEX used to build the venv. The result is an ~/.nce with just the CPython interpreter and a venv that symlinks to it. There is no wasted speed or space as compared to a traditional Pants Python venv (save for the size of the scie binary itself which may be addressed by a-scie#9 or a-scie#19). Closes a-scie#7 Closes a-scie#20
jsirois
added a commit
that referenced
this issue
Nov 11, 2022
Now commands can depend on `{boot.bindings.<binding name>}` placeholders which are satisfied by boot bindings commands that are run exactly once. This is used in the Python example to produce a scie-pants Pants binary that prepares a fully pre-compiled Pants venv that runs at the full speed of a native Pants venv. The boot binding command that creates the venv also uses a private PEX_ROOT and cleans this up in addition to the Pants PEX used to build the venv. The result is an ~/.nce with just the CPython interpreter and a venv that symlinks to it. There is no wasted speed or space as compared to a traditional Pants Python venv (save for the size of the scie binary itself which may be addressed by #9 or #19). Closes #7 Closes #20
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The basic idea is to have the scie do all its prep work - extract all files, run all prep commands (see #7) - and then re-write itself to be just the scie-boot, an empty zip and the lift manifest trailer, which is currently a ~2MB sandwich. If the
~/.nce
were something like/usr/local/nce
and the scie itself was housed in/usr/bin/<scie>
you could imagine a very simple way to make a Unix self installing executable. It could be installed viasudo sh -c 'export scie="<scie>" && cp $scie /usr/bin/$(basename $scie) && SCIE=install /usr/bin/$(basename $scie) --strip
.There are tricky bits for this to be semi-robust. Although all the scies in
/usr/bin
would have their manifests still, for uninstall you'd want copies of these manifests somewhere in/usr/local/nce
to be able to check dependents of the various CAS objects before deleting them. Further, this operation would need a global lock, although the atomic directory support slated for #2 could probably be leveraged for that.The text was updated successfully, but these errors were encountered: