diff --git a/master_changes.md b/master_changes.md index 52cee7b5769..a0cd2983f97 100644 --- a/master_changes.md +++ b/master_changes.md @@ -163,6 +163,7 @@ users) * Update repository package filename display [#5068 @rjbou] * E67: check checksums only for vcs urls [#4960 @rjbou] * E57: Enforce synopsis to always be there, restoring behaviour from opam 2.1 [#5442 @kit-ty-kate] + * W56: detection removed, since `OPAM_LAST_ENV` allows reliable reverting [#5417 @dra27] ## Repository * When several checksums are specified, instead of adding in the cache only the archive by first checksum, name by best one and link others to this archive [#4696 rjbou] diff --git a/src/state/opamFileTools.ml b/src/state/opamFileTools.ml index 2dfbd6b4f7c..77ec09b0d63 100644 --- a/src/state/opamFileTools.ml +++ b/src/state/opamFileTools.ml @@ -650,9 +650,13 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t = used norm) bad_os_arch_values) (bad_os_arch_values <> [])); + (* Retired, since `OPAM_LAST_ENV` allows environment updates to be reliably + reverted. *) +(* cond 56 `Warning "It is discouraged for non-compiler packages to use 'setenv:'" (t.env <> [] && not (has_flag Pkgflag_Compiler t)); +*) cond 57 `Error "Synopsis must not be empty" (match t.descr with None -> true | Some d -> String.equal (OpamFile.Descr.synopsis d) ""); diff --git a/tests/reftests/lint.test b/tests/reftests/lint.test index d75caf09531..ebee8f18892 100644 --- a/tests/reftests/lint.test +++ b/tests/reftests/lint.test @@ -579,21 +579,6 @@ depexts: ["foo"] { arch = "i486" } ${BASEDIR}/lint.opam: Errors. error 55: Non-normalised OS or arch string being tested: "i486 (use x86_32 instead)" # Return code 1 # -### : W56: It is discouraged for non-compiler packages to use 'setenv:' -### -opam-version: "2.0" -synopsis: "A word" -description: "Two words." -authors: "the testing team" -homepage: "egapemoh" -maintainer: "maint@tain.er" -license: "ISC" -dev-repo: "hg+https://to@li.nt" -bug-reports: "https://nobug" -setenv: [ idoit="anyway" ] -### opam lint ./lint.opam -${BASEDIR}/lint.opam: Warnings. - warning 56: It is discouraged for non-compiler packages to use 'setenv:' ### : E57: Synopsis must not be empty ### opam-version: "2.0"