@@ -2135,17 +2135,19 @@ isInLocal :: [PackageVersionConstraint] -> PackageSpecifier (SourcePackage (Pack
2135
2135
isInLocal _ NamedPackage {} = Nothing
2136
2136
isInLocal _extraPackages (SpecificSourcePackage pkg) = case srcpkgSource pkg of
2137
2137
LocalUnpackedPackage _ -> Just (packageId pkg)
2138
- -- LocalTarballPackage is matched here too, because otherwise ‘sdistize’
2139
- -- produces for ‘localPackages’ in the ‘ProjectBaseContext’ a
2140
- -- LocalTarballPackage, and ‘shouldBeLocal’ will make flags like
2141
- -- ‘--disable-library-vanilla’ have no effect for a typical
2138
+ -- Things like
2142
2139
-- ‘cabal install --lib --enable-shared enable-executable-dynamic --disable-library-vanilla’,
2143
- -- as these flags would apply to local packages, but the sdist would
2144
- -- erroneously not get categorized as a local package, so the flags would be
2145
- -- ignored and produce a package with an unchanged hash.
2146
- LocalTarballPackage _ -> Just (packageId pkg)
2147
- -- TODO: the docs say ‘extra-packages’ is implemented in cabal project
2148
- -- files. We can fix that here by checking that the version range matches.
2140
+ -- won't work as cabal install installs from sdist tarballs,
2141
+ -- and sdist tarballs are not local packages, so the flags won't apply.
2142
+ --
2143
+ -- And that is not incorrect behavior. Correct behavior would be
2144
+ -- to specify exactly which libraries should be compiled how.
2145
+ -- (maybe it's possible with `cabal.project`?)
2146
+ --
2147
+ -- OTOH, if we match on LocalTarballPackage where, then --enable-tests
2148
+ -- would force tests there, and that is not what we want to do.
2149
+ --
2150
+ -- LocalTarballPackage _ -> _
2149
2151
-- RemoteTarballPackage _ -> _
2150
2152
-- RepoTarballPackage _ -> _
2151
2153
-- RemoteSourceRepoPackage _ -> _
0 commit comments