summaryrefslogtreecommitdiff
path: root/testsuite/tests/cabal
Commit message (Collapse)AuthorAgeFilesLines
* Drop prefix from package keys.Edward Z. Yang2015-06-242-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Contains Cabal submodule update, as Cabal is responsible generating package keys. We also have to update some output. Also comes with a documentation update for ghc-pkg in the user manual for --package-key. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1011 GHC Trac Issues: #10550
* Revert "Support for multiple signature files in scope."Edward Z. Yang2015-06-1116-146/+0
| | | | This reverts commit a7524eaed33324e2155c47d4a705bef1d70a2b5b.
* Bump base version to 4.8.2.0Herbert Valerio Riedel2015-04-251-1/+1
| | | | | | This is needed because GHC 7.10.2 requires a minor version bump to base-4.8.1.0 Several test outputs needed base-4.8.1.0 replaced by base-4.8.2.0
* Support for multiple signature files in scope.Edward Z. Yang2015-04-0716-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A common pattern when programming with signatures is to combine multiple signatures together (signature linking). We achieve this by making it not-an-error to have multiple, distinct interface files for the same module name, as long as they have the same backing implementation. When a user imports a module name, they get ALL matching signatures dumped into their scope. On the way, I refactored the module finder code, which now distinguishes between exact finds (when you had a 'Module') and regular finds (when you had a 'ModuleName'). I also refactored the package finder code to use a Monoid instance on LookupResult to collect together various results. ToDo: At the moment, if a signature is declared in the local package, it completely overrides any remote signatures. Eventually, we'll want to also pull in the remote signatures (or even override the local signature, if the full implementation is available.) There are bunch of ToDos in the code for what to do once this is done. ToDo: At the moment, whenever a module name lookup occurs in GHCi and we would have seen a signature, we instead continue and return the Module for the backing implementation. This is correct for most cases, but there might be some situations where we want something a little more fine-grained (e.g. :browse should only list identifiers which are available through the in-scope signatures, and not ALL of them.) Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, hvr, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D790 GHC Trac Issues: #9252
* Minor bump `base` version to 4.8.1.0Herbert Valerio Riedel2015-03-231-1/+1
| | | | | We've accumulated enough to justify a minor version bump to 4.8.1.0, but not enough to justify a major version bump yet as far as I can see.
* Portability: wc -l sometimes has leading spaces, trim them off.Edward Z. Yang2014-12-051-2/+2
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D557
* Cabal submodule update: hole support and tests.Edward Z. Yang2014-11-2620-4/+165
| | | | | | | | | | | | | | Depends on D485 Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D487
* Generalize exposed-modules field in installed package databaseEdward Z. Yang2014-11-154-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of recording exposed-modules and reexported-modules as seperate fields in the installed package database, this commit merges them into a single field (exposed-modules). The motivation for this change is in preparation for the inclusion of *signatures* into the installed package database, which may also be reexported. Merging the representation means that we can treat reexports uniformly, no matter if they're a normal module or a signature. This commit adds a stub for signatures, but that code isn't wired up to anything yet. Contains Cabal submodule update to accommodate these changes. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, duncan, austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D421
* Updated stale ghcpkg05.stderr-mingw32.Gintautas Miliauskas2014-10-291-1/+1
| | | | | | | | | | | | | Looks like the mingw32-specific test was accidentally forgotten after changing the code and the expected outputs for non OS-specific tests. Reviewers: austin Reviewed By: austin Subscribers: #ghc_windows_task_force, thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D383
* testlib: Get rid of two_normalisersJoachim Breitner2014-10-281-2/+1
| | | | | And make normalise_fun polyvariadic. After all, this is untyped code, so lets make use of it :-)
* Update Cabal submodule & ghc-pkg to use new module re-export typesEdward Z. Yang2014-09-243-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main change is that Cabal changed the representation of module re-exports to distinguish reexports in source .cabal files versus re-exports in installed package registraion files. Cabal now also does the resolution of re-exports to specific installed packages itself, so ghc-pkg no longer has to do this. This is a cleaner design overall because re-export resolution can fail so it is better to do it during package configuration rather than package registration. It also simplifies the re-export representation that ghc-pkg has to use. Add extra ghc-pkg sanity check for module re-exports and duplicates For re-exports, check that the defining package exists and that it exposes the defining module (or for self-rexport exposed or hidden modules). Also check that the defining package is actually a direct or indirect dependency of the package doing the re-exporting. Also add a check for duplicate modules in a package, including re-exported modules. Test Plan: So far the sanity checks are totally untested. Should add some test case to make sure the sanity checks do catch things correctly, and don't ban legal things. Reviewers: austin, duncan Subscribers: angerman, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D183 GHC Trac Issues:
* Bump `base` version to 4.8.0.0 for realHerbert Valerio Riedel2014-09-091-1/+1
| | | | | | | | | | | | | | | | This commit updates several submodules in order to bump the upper bounds on `base` of most boot packages Moreover, this updates some of the test-suite cases which have version numbers hardcoded within. However, I'm not sure if this commit didn't introduce the following two test-failures ghc-api T8628 [bad stdout] (normal) ghc-api T8639_api [bad stdout] (normal) This needs investigation
* Revert "Fix a couple test failures encountered when building on Windows"Austin Seipp2014-09-011-1/+1
| | | | | This reverts commit 9711f78f790d10d914e08851544c6fc96f9a030a, as it's causing build phailures in phabricator.
* Fix a couple test failures encountered when building on WindowsAustin Seipp2014-09-011-1/+1
| | | | | | | | | | | | | | Summary: * Adjusts performance tests * Change ghcpkg05.stderr-mingw32 to match ghcpkg05.stderr Test Plan: Ran 'sh validate' and observed fewer test failures afterwards Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D191
* Refactor package state, also fixing a module reexport bug.Edward Z. Yang2014-08-057-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of building a multiply indirected data structure and querying it on every import, we now have two data structures moduleToPkgConf and moduleToPkgConfAll. moduleToPkgConf is a single-level UniqFM that is intended to be used for most valid imports; however, it does not contain any information useful for error reporting. If an error is occurred, we then query moduleToPkgConfAll, which contains a more comprehensive view of the package database. This field is lazily initialized (so this means we're retaining the package database list, but this should be fine because we're already maintaining the entries of the list.) Additionally, the full view doesn't keep track of a boolean toggle for visibility/exposure anymore, but instead tracks the *provenance* of how the module binding came to be (the ModuleOrigin data type). Additionally, we move the logic for determining if a module is exposed or not from Finder.lhs and put it in Packages.lhs; this information is communicated via the LookupResult data type. Unfortunately, we can't directly return a FindResult, because this data type is defined in HscTypes which depends on Packages. This is going to change some more in the near future when I add thinning/renaming to package flags; the error messages will need to be more flexible. I've also slightly changed the semantics of error messages for package qualified imports. Previously, if we didn't find any package qualified imports, but there were hidden modules in a *different* package, the error message would prefer mentioning those as opposed to providing suggestions. Now, if a module is hidden but in the wrong package, we won't mention it; instead, it will get mentioned with the other module suggestions. I was too lazy to write a test, but I can add one if people would like. The module reexport bug was, package q reexported p:P as Conflict, and package r reexported p:P2 as Conflict, this was *not* reported as a conflict, because the old logic incorrectly decided that P and P2 were the same module on account of being from the same package. The logic here has been corrected. Contains haddock submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-0532-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set makes us no longer assume that a package key is a human readable string, leaving Cabal free to "do whatever it wants" to allocate keys; we'll look up the PackageId in the database to display to the user. This also means we have a new level of qualifier decisions to make at the package level, and rewriting some Safe Haskell error reporting code to DTRT. Additionally, we adjust the build system to use a new ghc-cabal output Make variable PACKAGE_KEY to determine library names and other things, rather than concatenating PACKAGE/VERSION as before. Adds a new `-this-package-key` flag to subsume the old, erroneously named `-package-name` flag, and `-package-key` to select packages by package key. RFC: The md5 hashes are pretty tough on the eye, as far as the file system is concerned :( ToDo: safePkg01 test had its output updated, but the fix is not really right: the rest of the dependencies are truncated due to the fact the we're only grepping a single line, but ghc-pkg is wrapping its output. ToDo: In a later commit, update all submodules to stop using -package-name and use -this-package-key. For now, we don't do it to avoid submodule explosion. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D80
* Support ghc-pkg --ipid to query package ID.Edward Z. Yang2014-07-283-3/+3
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: hvr, simonmar, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D98
* Module reexports, fixing #8407.Edward Z. Yang2014-07-2526-0/+291
| | | | | | | | | | | | | | | | | | | | | | | | | The general approach is to add a new field to the package database, reexported-modules, which considered by the module finder as possible module declarations. Unlike declaring stub module files, multiple reexports of the same physical package at the same name do not result in an ambiguous import. Has submodule updates for Cabal and haddock. NB: When a reexport renames a module, that renaming is *not* accessible from inside the package. This is not so much a deliberate design choice as for implementation expediency (reexport resolution happens only when a package is in the package database.) TODO: Error handling when there are duplicate reexports/etc is not very well tested. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: compiler/main/HscTypes.lhs testsuite/.gitignore utils/haddock
* [ghc-pkg] Fix #5442 by using the flag db stack to modify packages.Edward Z. Yang2014-07-219-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the full database stack was used for ghc-pkg to modify packages, which meant that commands like 'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'. Since package modification is a "read and write" operation, we should use the flag db stack (which is currently used for reads) to determine which database to update. There is also a new flag --user-package-db, which lets you explicitly set the user database (as seen by --user). This was mostly added to aid in testing, but could be useful for end users as well. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, hvr, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D84
* Update Cabal submodule to latest tip of 1.20 branchHerbert Valerio Riedel2014-04-171-84/+24
| | | | | | The testsuite reference output for ghcpkg01 needs to be adapted since a "More diff friendly pretty printing of cabal files" is now performed.
* Make cabal01 pass with Cabal 1.18 (#8738).Mikhail Glushenkov2014-03-221-2/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Use normalise_errmsg_fun rather than normalise_fun where appropriateIan Lynagh2013-02-051-3/+3
|
* Fix cabal01 on WindowsIan Lynagh2013-02-051-1/+4
| | | | | | | We were getting a Creating library file: dist\build\libHStest-1.0-ghc7.7.20130205.dll.a message on stderr. We can't turn it off, so now the test just normalises it away.
* Rename some numeric tests: nnnn -> TnnnnIan Lynagh2013-01-2510-33/+33
|
* Fix ghcpkg03, ghcpkg05 (we need to normalise the dynlib names)Ian Lynagh2012-10-315-25/+30
|
* Testsuite fixes for when we only have dynamic librariesIan Lynagh2012-10-257-29/+44
|
* Update ghcpkg01 outputIan Lynagh2012-10-121-2/+2
|
* Fix a couple of tests when dynlibs-by-default is onIan Lynagh2012-10-041-1/+5
|
* avoid the new -rtsopts/-shared warningSimon Marlow2012-08-231-1/+4
|
* Rename package-conf flags to package-db.Paolo Capriotti2012-05-151-17/+17
|
* Fix cabal tests on Win64Ian Lynagh2012-05-013-0/+0
|
* Remove cabal02Ian Lynagh2011-10-2610-74/+0
| | | | It tested cabal-setup, which no longer exists.
* More updates to Safe Haskell testsDavid Terei2011-10-251-6/+6
|
* Tweak the shadow testIan Lynagh2011-09-041-3/+3
| | | | Also stops it creating files it doesn't clean
* Update ghcpkg01 for changes to safe haskellDavid Terei2011-08-101-6/+6
|
* Move tests from tests/ghc-regress/* to just tests/*David Terei2011-07-2071-0/+1086