-
Notifications
You must be signed in to change notification settings - Fork 365
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
Sandbox: advise user to launch reinit if updated in opam side #4361
Comments
In order to update sandbox scripts, a Is the problem occurs even with a reinit? |
I can't tell immediately - it was an issue reported by a user of my opam based Coq meta build scripts. I will contact the user and try to clarify this. Is there a way to check which version of opam created or last updated the I can definitely check if the sandbox script is suitable and suggest the reinit in case it is not. |
It is possible if there is changes at opam root (cf. new field |
Note that there is a fix of |
Something that may help you for integration: in |
Thanks for all the hints! I am currently still on opam 2.0.7 (I am a bit limited here since I need Windows support). The way I will proceed for now is that I detect with grep if the sandbox file has certain features I need and if not suggest the opam reinit. I think this situation is anyway quite rare and this method should fix at least 99% of the rare cases. I think long term it would be best if opam would know on its own of the .opam folder is up to date or needs updating and suggest proper action on common opam commands. |
I can confirm that So please feel free to close this issue. I still would recommend to have opam check and report this automatically. |
Good to hear! Opam already have a detection of its internal format changes, but it doesn't applies to sandbox scripts. Another mechanism should be put in place for that, to suggest a reinit in case of obsolete sandbox script. |
Will you create an issue for this or should I or do we keep this issue for this? |
we can keep this one, and changing it's name |
As far as I can tell the macOS sandbox script (https://github.com/ocaml/opam/blob/master/src/state/shellscripts/sandbox_exec.sh) is copied to
.opam/opam-init/hooks
duringopam init
. If opam is updated, this file is not touched. This has the effect that people have recent versions of opam with a not working sandbox. This might depend on the way how opam is installed and/or updated.A notable effect of this is that any project build with
remake
does not build in case the sandbox file is too old. I meanwhile check besides the version of opam some properties of the sandbox script in my meta install scripts.The text was updated successfully, but these errors were encountered: