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

[optimization] Only check for changes on the filesystem when necessary #4422

Closed
2 tasks
kit-ty-kate opened this issue Nov 8, 2020 · 2 comments
Closed
2 tasks

Comments

@kit-ty-kate
Copy link
Member

kit-ty-kate commented Nov 8, 2020

Currently opam check for changes in the .opam after every single package installation. This produces a lot of IO.
However when the package being installed does not have any install field and sandbox is on this is totally unnecessary.

Two solution could a considered:

  1. If we decide that the sandbox must be enabled, here is what is required to get this working internally:
  • a way for opam to know if the sandbox is enabled (currently the sandbox is simply a wrap-*-command)
  • a way for opam to ensure the sandbox script is unmodified

Since this requires the sandbox to be there, only Linux and MacOS would be eligible to this.

  1. Another solution would be to disregard whether or not the sandbox is enabled and do this anyway as a package trying to cross the sandbox is a packaging issue and would fail anyway on systems with sandbox enabled.

Original idea by @Armael

@kit-ty-kate
Copy link
Member Author

The first solution already goes out of the window when considering parallel builds. Parallel installs would detect things installed during the build phase of the potential faulty package and mess things up anyway.

The second solution of simply disabling scanning of opamroot when a package has no install field is still possible

@dra27
Copy link
Member

dra27 commented Jul 8, 2021

Fixed by #4494

@dra27 dra27 closed this as completed Jul 8, 2021
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

No branches or pull requests

2 participants