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

Allow removing files that changed #4891

Open
RalfJung opened this issue Nov 5, 2021 · 3 comments · Fixed by #4917
Open

Allow removing files that changed #4891

RalfJung opened this issue Nov 5, 2021 · 3 comments · Fixed by #4917

Comments

@RalfJung
Copy link

RalfJung commented Nov 5, 2021

If your issue concerns a package not building, please report to
https://github.com/ocaml/opam-repository/issues or to the package maintainer
unless you are confident it is an issue in the opam tool itself.

We just had CI fail with this error:

[WARNING] While removing coq-stdlib.dev: not removing files that changed since:
            - lib/coq/user-contrib/Ltac2/String.vo
            - lib/coq/user-contrib/Ltac2/Std.vo
            - lib/coq/user-contrib/Ltac2/Std.v
            - lib/coq/user-contrib/Ltac2/Printf.vo
            - lib/coq/user-contrib/Ltac2/Pattern.vo
            - lib/coq/user-contrib/Ltac2/Option.vo
            - lib/coq/user-contrib/Ltac2/Notations.vo
            - lib/coq/user-contrib/Ltac2/Notations.v
            - lib/coq/user-contrib/Ltac2/Message.vo
            - lib/coq/user-contrib/Ltac2/Ltac2.vo
            - lib/coq/user-contrib/Ltac2/Ltac1.vo

(and it goes on like this for a while)

These files were never touched outside of opam, so I am not sure why opam thinks that they were changed -- but even if they were changed, I am fine with opam removing them anyway. This is on CI, so I cannot just interactively delete them by hand. Deleting the CI cache means all caches for this project will be deleted, which wastes a lot of CI time on re-populating all the caches that were fine. What I wish I could do it tell opam to simply remove these files anyway, so that CI can proceed without manual intervention. So it would be great if there was some kind of flag that overruled this "files that changed since" check. :)

# opam config report
# opam-version      2.0.8 
# self-upgrade      no
# system            arch=x86_64 os=linux os-distribution=debian os-version=10
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              20
# repositories      4 (http), 1 (version-controlled) (default repo at c7b1bb0d)
# pinned            3 (git), 4 (rsync)
# current-switch    ocaml-base-compiler.4.08.1
@dra27
Copy link
Member

dra27 commented Nov 6, 2021

Are the CI jobs running inside containers or on a file system which doesn't store timestamps properly? You could try setting OPAMPRECISETRACKING to 1 which uses checksums instead of timestamps.

Probably relevant comment in #3997 (comment).

@RalfJung
Copy link
Author

RalfJung commented Nov 6, 2021

They run inside Docker, and we are setting OPAMPRECISETRACKING to 1 already.

# Prepare OPAM configuration.
export OPAMROOT="$(pwd)/_opam"
export OPAMJOBS="$((2*$CPU_CORES))"
export OPAMEDITOR="$(which false)"
export OPAMRETRIES=3
# Work around some OPAM bugs/quirks.
export OPAMDROPWORKINGDIR=1
export OPAMPRECISETRACKING=1

@kit-ty-kate
Copy link
Member

#4917 is only a help for this issue, not a fix

@dra27 dra27 removed this from the 2.2.0~alpha milestone Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants