-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feature request: do not rebuild packages when only unimportant constraint has been changed #4647
Comments
|
Having just discussed this some more, there's a chance that this is really simple! At this point when the switch state is loaded: opam/src/state/opamSwitchState.ml Lines 366 to 373 in a92a7ed
If we replace |
My 2 cents: if the src changes, or some patches have been added/modified/removed, a rebuild should be done. |
of course. See the proposal above |
Good grief, yes! The checks already in opam skip rebuilding if, say, you change the maintainer field of the opam package. This proposal is just about extending that to dependency fields, which are necessarily updated in existing packages in opam-repository. For example, you may have |
I don't think it's an issue in practice, but note that |
Currently opam uses
OpamFile.OPAM.effectively_equal
to detect whether or not a package should be rebuilt.However in most cases, rebuilding will not change anything but the installed opam file in
$OPAMROOT/<switch>/.opam-switch/packages
.My proposal is that if only
depends
,depopts
,conflicts
,conflict-class
,available
orremove
changes then:I'm not sure exactly how to implement this, my guess is that it will cost an extra run of the solver, but maybe there is a simpler way to do this by just changing how opam requests rebuilds.
The text was updated successfully, but these errors were encountered: