-
Notifications
You must be signed in to change notification settings - Fork 707
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
Regression: Cabal-3.14.1.0: v1-test, Setup.hs test: test suites of alex-3.4.0.1 and happy-1.20.1.1 unable to find data files #10717
Comments
3.14 seems to set I.e. 3.12 used absolute paths for Paths_ variables (which needed for using data-files when package is not installed), but 3.14 doesn't. I suspect this is another side-effect of #9702, the patch seems to change - dataDirPath = pwd </> PD.dataDir pkg_descr
+ rawDataDir = PD.dataDir pkg_descr
+ dataDirPath
+ | null $ getSymbolicPath rawDataDir =
+ interpretSymbolicPath mbWorkDir sameDirectory
+ | otherwise =
+ interpretSymbolicPath mbWorkDir rawDataDir
but as far as I can tell, in this case the For more context, IMO this is clear regression in 3.14 |
The test checks that if you change directory when running a test executable that you can still access datafiles.
The test checks that if you change directory when running a test executable that you can still access datafiles.
Fix is in #10830 |
The test checks that if you change directory when running a test executable that you can still access datafiles.
Ticket #10717 points out that the <pkgname>_datadir environment variable should be set to an absolute path since the test executables may change directory during their invocation. This is easily fixed by using the absoluteWorkingDirLBI function, which was introduced in 027bddf, However, in order to perform the fix in a PVP compliant manner, you have to write it in this horrible way of adding a new function and leaving the old broken function in it's place. Fixes #10717
Ticket #10717 points out that the <pkgname>_datadir environment variable should be set to an absolute path since the test executables may change directory during their invocation. This is easily fixed by using the absoluteWorkingDirLBI function, which was introduced in 027bddf, However, in order to perform the fix in a PVP compliant manner, you have to write it in this horrible way of adding a new function and leaving the old broken function in it's place. Fixes #10717
Describe the bug
When building the mentioned versions of alex and happy with
--enable-tests
viaSetup.hs
and Cabal 3.14,Setup.hs test
will yield a lot of errors like this and ultimately fail. This is a regression, as downgrading to Cabal 3.12 solves the issue.v1-test
is also affected, butv2-test
works as it should.This is pretty annoying since alex and happy are used to build Cabal, so it's best to be able to use the GHC bundled version.
To Reproduce
For
v1-test
:cabal get happy-1.20.1.1 && cd happy*
cabal v1-test
For
Setup.hs
:Setup.hs
to build the mentioned alex/happy versions and run their tests using GHC 9.12.1 and the version of Cabal it ships.Cabal_3_14.alex
,Cabal_3_14.happy
for the error andobserve that the same builds work in the
Cabal_3_12
set.Expected behavior
The tests succeed.
System information
Additional context
Since this happens in the test suite which is executed from a subdirectory of the main project, it seems to me that Cabal stopped setting the
happy_datadir
andalex_datadir
environment variables intest
. This is just a hunch though, I haven't tried to verify it yet since someone here probably knows whether this changed or not.The text was updated successfully, but these errors were encountered: