File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Cabal/src/Distribution/PackageDescription/Check Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,9 @@ checkBuildInfo cet ams ads bi = do
338
338
let ick = const (PackageDistInexcusable BaseNoUpperBounds )
339
339
rck = PackageDistSuspiciousWarn . MissingUpperBounds cet
340
340
checkPVP ick ids
341
- checkPVPs rck rds
341
+ unless
342
+ (isInternalTarget cet)
343
+ (checkPVPs rck rds)
342
344
343
345
-- Custom fields well-formedness (ASCII).
344
346
mapM_ checkCustomField (customFieldsBI bi)
@@ -728,6 +730,16 @@ mergeDependencies l@(d : _) =
728
730
depName :: Dependency -> String
729
731
depName wd = unPackageName . depPkgName $ wd
730
732
733
+ -- Is this an internal target? We do not perform PVP checks on those,
734
+ -- see https://github.com/haskell/cabal/pull/8361#issuecomment-1577547091
735
+ isInternalTarget :: CEType -> Bool
736
+ isInternalTarget (CETLibrary {}) = False
737
+ isInternalTarget (CETForeignLibrary {}) = False
738
+ isInternalTarget (CETExecutable {}) = False
739
+ isInternalTarget (CETTest {}) = True
740
+ isInternalTarget (CETBenchmark {}) = True
741
+ isInternalTarget (CETSetup {}) = False
742
+
731
743
-- ------------------------------------------------------------
732
744
-- Options
733
745
-- ------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -1166,7 +1166,7 @@ A list of all warnings with their constructor:
1166
1166
- UnknownArch: unknown architecture in condition.
1167
1167
- UnknownCompiler: unknown compiler in condition.
1168
1168
- BaseNoUpperBounds: missing upper bounds for important dependencies (``base ``, and for ``custom-setup `` ``Cabal `` too).
1169
- - MissingUpperBounds: missing upper bound in dependency.
1169
+ - MissingUpperBounds: missing upper bound in dependency (excluding test-suites and benchmarks) .
1170
1170
- SuspiciousFlagName: troublesome flag name (e.g. starting with a dash).
1171
1171
- DeclaredUsedFlags: unused user flags.
1172
1172
- NonASCIICustomField: non-ASCII characters in custom field.
You can’t perform that action at this time.
0 commit comments