Ticket #333: fix333-alt.dpatch

File fix333-alt.dpatch, 44.9 KB (added by duncan, 5 years ago)

alternative fix

Line 
1
2New patches:
3
4[Fix for #333, "Setup sdist --snapshot fails"
5Duncan Coutts <duncan@haskell.org>**20080821154913
6 Credit to Spencer Janssen. This is just a slight alternative
7 to the fix he proposed. It simplifies prepareSnapshotTree.
8] {
9hunk ./Distribution/Simple/SrcDist.hs 64
10+  snapshotPackage,
11hunk ./Distribution/Simple/SrcDist.hs 74
12-         ( PackageIdentifier(pkgVersion), Package(..) )
13+         ( PackageIdentifier(pkgVersion), Package(..), packageVersion )
14hunk ./Distribution/Simple/SrcDist.hs 130
15+    date <- toCalendarTime =<< getClockTime
16+    let pkg' | snapshot  = snapshotPackage date pkg
17+             | otherwise = pkg
18hunk ./Distribution/Simple/SrcDist.hs 134
19-      then getClockTime >>= toCalendarTime
20-       >>= prepareSnapshotTree verbosity pkg mb_lbi distPref tmpDir pps
21-      else prepareTree         verbosity pkg mb_lbi distPref tmpDir pps
22-    targzFile <- createArchive verbosity pkg mb_lbi tmpDir targetPref
23+      then prepareSnapshotTree verbosity pkg' mb_lbi distPref tmpDir pps
24+      else prepareTree         verbosity pkg' mb_lbi distPref tmpDir pps
25+    targzFile <- createArchive verbosity pkg' mb_lbi tmpDir targetPref
26hunk ./Distribution/Simple/SrcDist.hs 221
27--- | Prepare a directory tree of source files for a snapshot version with the
28--- given date.
29+-- | Prepare a directory tree of source files for a snapshot version.
30+-- It is expected that the appropriate snapshot version has already been set
31+-- in the package description, eg using 'snapshotPackage' or 'snapshotVersion'.
32hunk ./Distribution/Simple/SrcDist.hs 231
33-                    -> CalendarTime       -- ^snapshot date
34hunk ./Distribution/Simple/SrcDist.hs 232
35-prepareSnapshotTree verbosity pkg mb_lbi distPref tmpDir pps date = do
36-  let pkgid   = packageId pkg
37-      pkgver' = snapshotVersion date (pkgVersion pkgid)
38-      pkg'    = pkg { package = pkgid { pkgVersion = pkgver' } }
39-  targetDir <- prepareTree verbosity pkg' mb_lbi distPref tmpDir pps
40-  overwriteSnapshotPackageDesc pkgver' targetDir
41+prepareSnapshotTree verbosity pkg mb_lbi distPref tmpDir pps = do
42+  targetDir <- prepareTree verbosity pkg mb_lbi distPref tmpDir pps
43+  overwriteSnapshotPackageDesc (packageVersion pkg) targetDir
44hunk ./Distribution/Simple/SrcDist.hs 252
45+-- | Modifies a 'PackageDescription' by appending a snapshot number
46+-- corresponding to the given date.
47+--
48+snapshotPackage :: CalendarTime -> PackageDescription -> PackageDescription
49+snapshotPackage date pkg =
50+  pkg {
51+    package = pkgid { pkgVersion = snapshotVersion date (pkgVersion pkgid) }
52+  }
53+  where pkgid = packageId pkg
54+
55}
56
57Context:
58
59[Move Paths_pkgname and cabal_macros.h generation into their own modules
60Duncan Coutts <duncan@haskell.org>**20080813193245]
61[fix imports for nhc98
62Malcolm.Wallace@cs.york.ac.uk**20080813132112]
63[Add util rewriteFile :: FilePath -> String -> IO ()
64Duncan Coutts <duncan@haskell.org>**20080813192017
65 Write a file but only if it would have new content.
66 If we would be writing the same as the existing content
67 then leave the file as is so that we do not update the
68 file's modification time.
69]
70[Don't warn about missing strip.exe on Windows
71Duncan Coutts <duncan@haskell.org>**20080812220415
72 We don't expect Windows systems to have the strip program anyway.
73]
74[Flush stdout when printing debugging messages
75Duncan Coutts <duncan@haskell.org>**20080812212236]
76[Add auto-generated CPP macros for package version testing
77Simon Marlow <marlowsd@gmail.com>**20080811173016
78 
79 Now when using CPP you get
80 
81    MIN_VERSION_<package>(A,B,C)
82 
83 for each <package> in build-depends, which is true if the version of
84 <package> in use is >= A.B.C, using the normal ordering on version
85 numbers.
86 
87 This is done by auto-generating a header file
88 dist/build/autogen/cabal_macros.h, and passing a -include flag when
89 running CPP.
90]
91[allow Cabal to use base-4
92Simon Marlow <marlowsd@gmail.com>**20080806130512]
93[Fix warnings in Windows Paths_pkgname module
94Duncan Coutts <duncan@haskell.org>**20080812211349]
95[Fix the config-file field name of the install command's packagedb option
96Duncan Coutts <duncan@haskell.org>**20080812171207]
97[Add alias type PackageId = PackageIdentifier
98Duncan Coutts <duncan@haskell.org>**20080812171006]
99[Add data Platform = Platform Arch OS
100Duncan Coutts <duncan@haskell.org>**20080812160941
101 Since we tend to pass them around together rather a lot.
102 Also add a Text instance with a format like "i386-linux"
103]
104[Don't use tab characters in the generated Paths module
105Duncan Coutts <duncan@haskell.org>**20080812160731]
106[Make binary-dist do nothing in doc/Makefile, for now
107Ian Lynagh <igloo@earth.li>**20080810005135]
108[When running "Setup makefile", put "default: all" at the top of the Makefile
109Ian Lynagh <igloo@earth.li>**20080809211148
110 This make "make" work even if Makefile.local contains any targets.
111]
112[Use 'ghc-pkg dump' instead of 'ghc-pkg describe *'
113David Waern**20080807190307
114 
115 Does not implement lazy parsing of the output of ghc-pkg dump, so this
116 is only a partial fix of #311.
117   
118 For more information about why we want to use ghc-pkg dump, see GHC
119 ticket #2201.
120]
121[Simplify InstalledPackageInfo parser and pretty printer
122Duncan Coutts <duncan@haskell.org>**20080806122807
123 Using the new utils in ParseUtils.
124]
125[Add parsse utils for simple flat formats.
126Duncan Coutts <duncan@haskell.org>**20080806122613
127 Should help to simplify the InstalledPackageInfo parser
128 and also for similar formats in cabal-install.
129]
130[Tidy up the ppFields function and uses
131Duncan Coutts <duncan@haskell.org>**20080806121315
132 Put the arguments in a more sensible order:
133 ppFields :: [FieldDescr a] -> a -> Doc
134 and make the implementation clearer.
135 clean up the use of it in the PackageDescription.Parse module
136]
137[Windows fixes
138Ian Lynagh <igloo@earth.li>**20080803201253]
139[setup makefile: put the source-dir suffix rules after the distdir suffix rules
140Simon Marlow <marlowsd@gmail.com>**20080806130309
141 This matches the behaviour of 'setup build' works, and is robust to
142 people accidentally having old preprocessed sources lying around in the
143 source dir.
144]
145[Generalise checkPackageFiles to any monad, not just IO
146Duncan Coutts <duncan@haskell.org>**20080806001547
147 This is to let us use the same checks for virtual or
148 in-memory file systems, like tarball contents.
149]
150[Move parseFreeText into ParseUtils and use it more widely
151Duncan Coutts <duncan@haskell.org>**20080806001352]
152[Document and refactor 'parsePackageDescription'.
153Thomas Schilling <nominolo@googlemail.com>**20080804190324
154 
155 Hopefully this makes this function more understandable and easier to
156 modify.
157]
158[Adjust registration to allow packages with no modules or objects
159Duncan Coutts <duncan@haskell.org>**20080804155826
160 So ghc-pkg does not complain about missing files and dirs.
161]
162[Don't try to install libHSfoo.a if the lib had no object files
163Duncan Coutts <duncan@haskell.org>**20080804143817
164 To allow meta-packages.
165]
166[Fix instance Monoid ConfigFlags for configStripExes
167Duncan Coutts <duncan@haskell.org>**20080802002045]
168[Fix the Windows build
169Ian Lynagh <igloo@earth.li>**20080731194841]
170[Remove unused imports
171Ian Lynagh <igloo@earth.li>**20080730194526]
172[Make Cabal compatible with extensible exceptions
173Ian Lynagh <igloo@earth.li>**20080730183910
174 The code is now also more correct, e.g. when we are ignoring IO exceptions
175 while trying to delete something, we don't also ignore timeout exceptions.
176]
177[Document the "exposed" .cabal file field
178Duncan Coutts <duncan@haskell.org>**20080731162807]
179[Remove unused imports
180Duncan Coutts <duncan@haskell.org>**20080730182957]
181[Remove unused inDir util function
182Duncan Coutts <duncan@haskell.org>**20080730165031]
183[Add an "exposed" field to the .cabal file library section
184Duncan Coutts <duncan@haskell.org>**20080730164516
185 It's a bool flag that says if by default the library should
186 be registered with the compiler as exposed/unhidden (for
187 compilers which have such a concept, ie ghc). You might want
188 to do this for packages which would otherwise pollute the
189 module namespace or clash with other common packages.
190 It should be very rarely used. The only current examples we
191 know of are the ghc api package and the dph packages.
192]
193[Rearrange the Monoid instances for Library, Executable, BuildInfo
194Duncan Coutts <duncan@haskell.org>**20080730163432
195 No functional change, just moving code about.
196 We now define the Monoid methods directly rather than in
197 terms of emptyLibrary, unionLibrary etc.
198]
199[Do the ghc rts ldOptions hack in a slightly more hygenic way
200Duncan Coutts <duncan@haskell.org>**20080729195714]
201[Pass the right -F and --framework flags when running hsc2hs on OS X
202Ian Lynagh <igloo@earth.li>**20080729172757]
203[Tweak a test to not go via the pretty printer
204Ian Lynagh <igloo@earth.li>**20080729172750]
205[Fix linking with hsc2hs on OS X
206Ian Lynagh <igloo@earth.li>**20080729170215
207 We don't tell hsc2hs to link the actual Haskell packages, so with GHC's
208 rts package we need to also filter out the -u flags.
209]
210[Tweak whitespace
211Ian Lynagh <igloo@earth.li>**20080729163729]
212[Fix uses of verbosity > deafening to use >=
213Duncan Coutts <duncan@haskell.org>**20080729191855
214 The maximum verbosity value is deafening so >= the correct test.
215 This primarily affected haddock.
216]
217[Do not use ',' as a list separator for the cpp/cc/ld-options fields
218Duncan Coutts <duncan@haskell.org>**20080729170556
219 It breaks for some options like "ld-options: -Wl,-z,now"
220 No existing .cabal files on hackage were using ',' as a
221 list separator so this should not break anything.
222]
223[Move docs for build-depends into the build information section
224Duncan Coutts <duncan@haskell.org>**20080729162024
225 Since it is shared between libs and exes. Extend the documentation
226 to describe the syntax of version constraints, including the new
227 version range syntax "build-depends: foo ==1.2.*".
228]
229[Remove references to cabal-setup from the documentation
230Duncan Coutts <duncan@haskell.org>**20080729160950
231 Change to runhaskell Setup or cabal-install as appropriate.
232]
233[Move the docs for the buildable field to a better place.
234Duncan Coutts <duncan@haskell.org>**20080729160808
235 It doesn't need to be right up near the top.
236]
237[Document more clearly that every modules must be listed
238Duncan Coutts <duncan@haskell.org>**20080729160308
239 in one of the fields exposed-modules, other-modules or main-is
240 Add an extra note to the section on the Paths_pkgname module
241 as the fact that it's automatically generated confuses people.
242]
243[Document the wildcard behaviour in data-files and extra-source-files fields
244Duncan Coutts <duncan@haskell.org>**20080729155920]
245[Document the $os and $arch install path vars
246Duncan Coutts <duncan@haskell.org>**20080729155654]
247[File globs must match at least one file or it's an error.
248Duncan Coutts <duncan@haskell.org>**20080729154050]
249[Fix the semantics of the simple file globbing to be sane
250Duncan Coutts <duncan@haskell.org>**20080729152624
251 I realised when I started to document it that the behaviour
252 was not terribly consistent or sensible. The meaning now is:
253   The limitation is that * wildcards are only allowed in
254   place of the file name, not in the directory name or
255   file extension. In particular, wildcards do not include
256   directories contents recursively. Furthermore, if a
257   wildcard is used it must be used with an extension, so
258   "data-files: data/*" is not allowed. When matching a
259   wildcard plus extension, a file's full extension must
260   match exactly, so "*.gz" matches "foo.gz" but not
261   "foo.tar.gz".
262 The reason for providing only a very limited form of wildcard
263 is to concisely express the common case of a large number of
264 related files of the same file type without making it too easy
265 to accidentally include unwanted files.
266]
267[Allow $arch and $os in install paths.
268Duncan Coutts <duncan@haskell.org>**20080729151952
269 Fixes ticket #312. For example a user could use:
270   cabal configure --libsubdir="$pkgid/$compiler/$arch"
271 if they wanted to have packages for multiple architectures
272 co-exist in the same filestore area.
273]
274[Use "pkg == 1.2.*" as the version wildcard syntax
275Duncan Coutts <duncan@haskell.org>**20080729151612
276 Rather than "pkg ~ 1.2.*". This seemed to be the consensus.
277 The syntax "pkg == 1.2.*" means "pkg >= 1.2 && < 1.3" and it
278 is to encourage people to put upper bounds on api versions.
279]
280[disambiguate Control.Exception.catch for nhc98
281Malcolm.Wallace@cs.york.ac.uk**20080728164506]
282[more import qualification to help nhc98
283Malcolm.Wallace@cs.york.ac.uk**20080728153629]
284[help nhc98's module disambiguator a bit
285Malcolm.Wallace@cs.york.ac.uk**20080724165753]
286[Pass -no-user-package-conf to ghc when not using UserPackageDB
287Duncan Coutts <duncan@haskell.org>**20080729145040
288 Should eliminate the corner case where we're doing a global
289 install but the user package db contains the exact same
290 version as in the global package db. Perhaps we should warn
291 in that case anyway since it's likely to go wrong later.
292]
293[Substitute for $topdir when we read GHC's InstalledPackageInfo's
294Ian Lynagh <igloo@earth.li>**20080723112232]
295[Fix the location of gcc.exe in a Windows GHC installation
296Ian Lynagh <igloo@earth.li>**20080723101848]
297[Don't need the complex code in detecting hsc2hs anymore
298Duncan Coutts <duncan@haskell.org>**20080720234019
299 Since we do not need to know if hsc2hs uses ghc or gcc as cc
300 by default since in either case we now tell it to use gcc.
301]
302[Always use gcc as cc with hsc2hs
303Duncan Coutts <duncan@haskell.org>**20080720233759
304 Lookup what flags to use from the package index. Previously this
305 was done by calling ghc as cc and passing -package flags to ghc.
306 ghc would then lookup what extra flags to pass to gcc. We now do
307 that ourselves directly and it's a good deal simpler and it's
308 portable to the other haskell implementations. This is only a
309 first go, the flags may not all be exactly right. Needs testing.
310]
311[Add gccProgram
312Duncan Coutts <duncan@haskell.org>**20080720232818
313 on Windows we have to find ghc's private copy of gcc.exe
314]
315[Add PackageSet.topologicalOrder and reverseTopologicalOrder
316Duncan Coutts <duncan@haskell.org>**20080720223731
317 with type :: PackageFixedDeps pkg => PackageSet pkg -> [pkg]
318]
319[Change some PackageSet functions to return the package rather than the id
320Duncan Coutts <duncan@haskell.org>**20080720221702
321 dependencyGraph and reverseDependencyClosure now return the
322 full package rather than just the PackageIdentifier
323]
324[Convert from PackageIndex to PackageSet
325Duncan Coutts <duncan@haskell.org>**20080720194924
326 Turns out the feature to do case-insensitive lookups was only
327 needed in cabal-install (and only in one little part) and
328 elsewhere it causes problems. So use PackageSet instead.
329]
330[If we have GHC >= 6.9 then use the new -optdep replacement flags
331Ian Lynagh <igloo@earth.li>**20080722163346]
332[And exitcode of 2 from ghc-pkg when doing describe '*' means no packages
333Ian Lynagh <igloo@earth.li>**20080722125759
334 This is a bit of a kludge around GHC's #2201, until Cabal is updated to
335 use ghc-pkg dump.
336]
337[Fix warnings and add a comment explaining why we pass -x to strip on OS X
338Ian Lynagh <igloo@earth.li>**20080720220851]
339[Pass -x to strip on OSX
340Duncan Coutts <duncan@haskell.org>**20080720204609]
341[Generate expanded makefile rules directly, rather than using $(eval ...)
342Ian Lynagh <igloo@earth.li>**20080720194801
343 We used to do this with $(eval ...) and $(call ...) in the
344 Makefile, but make 3.79.1 (which is what comes with msys)
345 doesn't understand $(eval ...), so now we just stick the
346 expanded loop directly into the Makefile we generate.
347]
348[Put GHC's programArgs in GHC_OPTS when making a Makefile
349Ian Lynagh <igloo@earth.li>**20080715132429]
350[Pass -package-conf foo when using GHC as CC
351Ian Lynagh <igloo@earth.li>**20080713123958]
352[If we are using ghc as hsc2hs's cc, then tell it where package.conf is
353Ian Lynagh <igloo@earth.li>**20080713110548
354 if we have been told to use a specific one with --package-db
355]
356[Fix installing datafiles
357Ian Lynagh <igloo@earth.li>**20080712173934
358 If datadir is foo and the datafile is bar then we should install it to
359 $datadir/bar, not $datadir/foo/bar.
360]
361[Fix the "Setup makefile" rules for C files
362Ian Lynagh <igloo@earth.li>**20080712173851]
363[If install is given a distPref, pass it on to copy and register
364Ian Lynagh <igloo@earth.li>**20080712121916]
365[derive Eq for ConfiguredProgram
366Duncan Coutts <duncan@haskell.org>**20080711160138
367 a request from Saizan
368]
369[Simplify ghc version test slightly
370Duncan Coutts <duncan@haskell.org>**20080711142026]
371[Add a hack to copy .hs-boot files into dist/...
372Ian Lynagh <igloo@earth.li>**20080711000826
373 When a preprocessor generates a .hs file we need to put the .hs-boot
374 file next to it so that GHC can find it.
375]
376[Teach "Setup makefile" how to cope with multiple hs-source-dirs
377Ian Lynagh <igloo@earth.li>**20080711000726]
378[Fix some whitespace in Makefile.in
379Ian Lynagh <igloo@earth.li>**20080710231519]
380[In Makefile.in, put all the rules that mentions srcdir together
381Ian Lynagh <igloo@earth.li>**20080710231415]
382[Fix haddocking (with old haddocks?)
383Ian Lynagh <igloo@earth.li>**20080703154714]
384[Correct the order of args given by --PROG-options
385Duncan Coutts <duncan@haskell.org>**20080710181437
386 They were getting reversed. Problem located by Igloo.
387]
388[Remove the need for a compat Data.Map module
389Duncan Coutts <duncan@haskell.org>**20080710154600
390 Stop using Map.alter, use the same solution as the PackageIndex module.
391]
392[fix #if __GLASGOW_HASKELL__ test
393Ross Paterson <ross@soi.city.ac.uk>**20080705105048
394 
395 The problem is that
396 
397 #if __GLASGOW_HASKELL__ < NNN
398 
399 is also true for non-GHC.  It should be
400 
401 #if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < NNN
402]
403[help nhc98's import overlap resolver
404Malcolm.Wallace@cs.york.ac.uk**20080704140613]
405[massage a pattern-with-context around nhc98's typechecker
406Malcolm.Wallace@cs.york.ac.uk**20080704140541]
407[Fix using specified package databases
408Ian Lynagh <igloo@earth.li>**20080703001216
409 If we are using a specified package database, we need to tell GHC what
410 it is when building
411]
412[Fix the build with GHC 6.4.2: Data.Map.alter doesn't exist
413Ian Lynagh <igloo@earth.li>**20080703001151]
414[Allow installing executables in-place, and using shell script wrappers
415Ian Lynagh <igloo@earth.li>**20080629164939
416 GHC-only currently.
417]
418[haddock typo
419Ian Lynagh <igloo@earth.li>**20080629114342]
420[Fix a haddock typo
421Ian Lynagh <igloo@earth.li>**20080629114239]
422[Update .darcs-boring
423Ian Lynagh <igloo@earth.li>**20080627182013]
424[TAG 2008-05-28
425Ian Lynagh <igloo@earth.li>**20080528004259]
426[Remove the SetupWrapper module
427Duncan Coutts <duncan@haskell.org>**20080628173010
428 It's not used in Cabal itself and while cabal-install used
429 it previously, it now has its own extended implementation.
430]
431[Update module headers
432Duncan Coutts <duncan@haskell.org>**20080628172550
433 Use cabal-devel@haskell.org as the maintainer in most cases except for
434 a few which were pre-existing modules copied from elsewhere or modules
435 like L.H.Extension which really belong to libraries@haskell.org
436 Remove the useless stability module. We have more detailed information
437 on stability elsewhere (in the version number and user guide).
438 Add more top level module documentation, taken from the source guide.
439]
440[Whitespace changes, convert tabs to spaces
441Duncan Coutts <duncan@haskell.org>**20080626200933]
442[Remove a couple old deprecated empty modules
443Duncan Coutts <duncan@haskell.org>**20080626195204]
444[Add ModuleName as a new type instead of using String everywhere
445Duncan Coutts <duncan@haskell.org>**20080626192939]
446[Tweaks to the readme, hopefully will reduce confusion
447Duncan Coutts <duncan@haskell.org>**20080625232051]
448[Add compat InstalledPackageInfo types for older GHCs
449Duncan Coutts <duncan@haskell.org>**20080621013727
450 We need these types for their Read instances so that we
451 can still read older GHCs package db files when we make
452 changes to the current InstalledPackageInfo type, or the
453 types contained in it, like PackageIdentifier or License.
454]
455[Add simple file name globbing (*) to data-files and extra-source-files
456Duncan Coutts <duncan@haskell.org>**20080626171424]
457[Use conservative render style for display
458Duncan Coutts <duncan@haskell.org>**20080619222258]
459[Include trailing newline in hscolour command description
460Duncan Coutts <duncan@haskell.org>**20080619220940]
461[Add PackageSet, like PackageIndex but case sensitive
462Duncan Coutts <duncan@haskell.org>**20080614003705
463 Actually it turns out that we don't need case insensitivity in many
464 cases, mosty just for simple lookups in the UI. For everything else
465 the ordinary Ord instance is much simpler. The fact that listing the
466 contents of a PackageIndex doesn't come out in Ord order actually
467 causes real problems in cabal-install and necessitates re-sorting.
468 So we should move to using PackageSet in most cases and just leave
469 the search and lookup operations in PackageIndex.
470]
471[Add PackageName as a newtype
472Duncan Coutts <duncan@haskell.org>**20080614002926]
473[No more need for the distinction between null and emptyBuildInfo
474Duncan Coutts <duncan@haskell.org>**20080614001654
475 Now that we have removed the hsSourceDirs = [currentDir] default
476 from emptyBuildInfo it is now equal to nullBuildInfo.
477]
478[Add version wildcard syntax
479Duncan Coutts <duncan@haskell.org>**20080619175006
480   build-depends: foo ~1.2.*
481 means:
482   build-depends: foo >=1.2 && <1.3
483 It's also valid everywhere else version ranges are used.
484]
485[haddock-2.2 and later do now support the --hoogle flag
486Duncan Coutts <duncan@haskell.org>**20080613205445]
487['.' should not always be in hs-source dirs
488Duncan Coutts <duncan@haskell.org>**20080613230352
489 We changed the parsing of list fields in the .cabal file so that it
490 adds to the current value rather than replacing it. This allows you
491 to put multiple entries for a list field and they all get
492 concatenated. However that means that the '.' in the hsSourceDirs of
493 emptyBuildInfo is always added to and not replaced like we did
494 previously. That's not what we want in this case. We want to use '.'
495 for hsSourceDirs *only* if hsSourceDirs is otherwise null. As it
496 happens, due to the way the configurations code works, we're already
497 filling in the default if it'd otherwise be null so we do not need
498 '.' in the emptyBuildInfo at all.
499]
500[Fix css location in generation of user guide
501Duncan Coutts <duncan@haskell.org>**20080617133811]
502[Update changelog for 1.4.0.1
503Duncan Coutts <duncan@haskell.org>**20080617130434]
504[Makefile tweak, setup depends on Setup.hs
505Duncan Coutts <duncan@haskell.org>**20080616175446]
506[force results inside withHaskellFile
507Ross Paterson <ross@soi.city.ac.uk>**20080614160707
508 
509 withUTF8FileContents now closes the file, so we need to force what we're
510 computing from the contents before it's gone.
511]
512[construct InstalledPackageInfo from scratch rather than by overriding
513Duncan Coutts <duncan@haskell.org>**20080616171505
514 It means we catch any fields that get added. As it happens we were
515 missing a field, though its value is supposed to be just [] which is
516 the same value as we got from the default emptyInstalledPackageInfo.
517]
518[Include the readme and the changelog in the tarball
519Duncan Coutts <duncan@haskell.org>**20080612190558]
520[Move the mkGHCMakefile.sh out of the root dir
521Duncan Coutts <duncan@haskell.org>**20080612190317
522 Having it there confuses people.
523 They think they have to run it as part of the install process.
524]
525[Put upper bounds on all the build-depends
526Duncan Coutts <duncan@haskell.org>**20080612174958]
527[Add the 1.4.0.0 release to the changelog
528Duncan Coutts <duncan@haskell.org>**20080612164242]
529[Add the 1.2.4.0 release to the changelog
530Duncan Coutts <duncan@haskell.org>**20080612164144]
531[Update the README and convert it to markdown syntax
532Duncan Coutts <duncan@haskell.org>**20080612162906]
533[Update the release notes
534Duncan Coutts <duncan@haskell.org>**20080612154624]
535[Update copyright and authors list in the .cabal file
536Duncan Coutts <duncan@haskell.org>**20080612154444]
537[base-1.0 does not have Data.Map.alter so use insertWith instead
538Duncan Coutts <duncan@haskell.org>**20080612154309]
539[Lift the restriction that libraries must have exposed-modules
540Duncan Coutts <duncan@haskell.org>**20080612092924
541 This allows libs that have only private modules or C code. This
542 might be used to make libs that have non-exposed modules and only
543 export C APIs. It could also be used to make packages that consist
544 only of C code. That might be useful for bindings where it may
545 make sense to split the C and Haskell code into separate packages.
546]
547[Use the standard autogenModulesDir rather than a local copy
548Duncan Coutts <duncan@haskell.org>**20080612092855]
549[Fix the register --gen-pkg-config flag
550Duncan Coutts <duncan@haskell.org>**20080612092425
551 When specified without any file name it is supposed to use
552 a default file name rather than be ignored completely.
553]
554[Filter out the Paths_pkgname file in sdist
555Duncan Coutts <duncan@haskell.org>**20080612091810
556 Fixes ticket #187 finally (I hope).
557]
558[Switch the hugs code to safe file reading and writing
559Duncan Coutts <duncan@haskell.org>**20080610180947]
560[Use writeFileAtomic everywhere instead of writeFile
561Duncan Coutts <duncan@haskell.org>**20080610180727]
562[Switch to scoped file reading rather than lazy readFile
563Duncan Coutts <duncan@haskell.org>**20080610180528]
564[Close the package.conf file after reading it
565Duncan Coutts <duncan@haskell.org>**20080610180217
566 We had a bug on windows where we open and read ghc's package.conf
567 database but because we did not consume the final newline we did
568 not close the file. Then when we called ghc-pkg to register a
569 package it failed because it could not rename the open file.
570]
571[Add withFileContents and withUTF8FileContents
572Duncan Coutts <duncan@haskell.org>**20080610180150
573 Safe block scoped reading of files.
574 These guarantee that the file gets closed.
575]
576[Fix pre-processing for haddock and executables
577Duncan Coutts <duncan@haskell.org>**20080609233609
578 Now look in the right place to find the pre-processed source
579 files belongign to executables. Fixes ticket #252.
580]
581[Fail better when using haddock 2.x and the --hoogle flag
582Duncan Coutts <duncan@haskell.org>**20080609190555
583 Fixes ticket #249
584]
585[Install haddock interface only when generated
586Duncan Coutts <duncan@haskell.org>**20080609190251
587 This is actually Andrea Rossato's patch but it didn't merge
588 cleanly due to more recent changes. Fixes ticket #250.
589]
590[Install license file into the right place
591Duncan Coutts <duncan@haskell.org>**20080609185840
592 even if the license file was kept in a subdir of the src tree.
593 The canonical example was: license-file: debian/copyright
594 It was being installed into $docdir/debian/ and failing since
595 that dir did not exist. It's now installed into just $docdir.
596]
597[Bump version due to api changes
598Duncan Coutts <duncan@haskell.org>**20080529104714]
599[Put spaces round || and && when displaying version range expressions
600Duncan Coutts <duncan@haskell.org>**20080529104214
601 This makes them much more readable.
602]
603[Change the PackageIndex invariant so the buckets are ordered
604Duncan Coutts <duncan@haskell.org>**20080529095346
605 Each bucket holds packages with the same name case-insensitively.
606 Previously each buckets was internally unordered. Now they're
607 ordered by the full package id which means first by package name
608 case-sensitively and then by version.
609]
610[Add thisPackageVersion and notThisPackageVersion
611Duncan Coutts <duncan@haskell.org>**20080529092607
612 Util functions for makeing dependencies from package identifiers.
613 thisPackageVersion    (foo-1.0) = foo ==1.0
614 notThisPackageVersion (foo-1.0) = foo /=1.0
615 The latter is handy as a constraint in dependency resolution.
616]
617[Add notThisVersion :: Version -> VersionRange
618Duncan Coutts <duncan@haskell.org>**20080529092244
619 Opposite of ThisVersion, it means /= x.y but is actually implemented
620 as > x.y || < x.y as we do not have not or not equal as primitives.
621]
622[Note compatability issue in deprecation message for defaultUserHooks
623Duncan Coutts <duncan@haskell.org>**20080527135830]
624[Write out Bool config values correctly
625Duncan Coutts <duncan@haskell.org>**20080521153420
626 Used by cabal-install when writing the default ~/.cabal/config file.
627 Previously it was using show for type Maybe Bool and writing out
628 "Just True" when of course it should just be "True".
629]
630[Rename doc/fptools.css to avoid the ghc build system cleaning it
631Duncan Coutts <duncan@haskell.org>**20080520191700
632 The user guide gets built in two different ways. There's a target
633 in Cabal's the top level Makefile and there is also the stuff that
634 the ghc build system uses. The ghc build system expects to copy in
635 doc/fptools.css and then delete it again on make clean. We want a
636 persistent copy so that we can make the docs when we've just got a
637 standalone Cabal build tree, so that's now kept as doc/Cabal.css.
638]
639[Remove gnerated file (doc/fptools.css)
640Ian Lynagh <igloo@earth.li>*-20080511130035]
641[document data-dir field
642Bertram Felgenhauer <int-e@gmx.de>**20080509131306]
643[add data-dir field to package config
644Bertram Felgenhauer <int-e@gmx.de>**20080509130448
645 Cabal will look for data files to install relative to the directory given
646 in the data-dir field, allowing package authors to better structure their
647 source tree. There's no behavioural change by default.
648]
649[Allow the bindir, libdir and libexec dir to be specified via env vars too
650Duncan Coutts <duncan@haskell.org>**20080519173808
651 Same as for the datadir. Eg for package Foo, you'd use
652 Foo_bindir=... Foo_datadir=... Foo_libexecdir=... ./Foo
653 The next step would be generating a wrapper script that allows
654 running the program inplace. It should also work for a library.
655]
656[Remove unused import
657Duncan Coutts <duncan@haskell.org>**20080513094301]
658[Do not display version tags
659Duncan Coutts <duncan@haskell.org>**20080509094455]
660[Remove Distribution.Compat.Exception from other-modules
661Duncan Coutts <duncan@haskell.org>**20080514171822]
662[Add PackageIndex.lookupPackageName and extra deletion functions
663Duncan Coutts <duncan@haskell.org>**20080514162954]
664[Check invariant on every construction and elide on lookups
665Duncan Coutts <duncan@haskell.org>**20080514154104]
666[Remove redundant Char test in parseBuildToolName
667Duncan Coutts <duncan@haskell.org>**20080514153343
668 It was made redundant after the isSymbol test was removed.
669 Spotted by Igloo.
670]
671[Eliminate use of bracketOnError, use handle instead
672Duncan Coutts <duncan@haskell.org>**20080514153206
673 It's actually more appropriate anyway.
674 This means we don't need any Distribution.Compat.Exception.
675]
676[Define bracketOnError in compat; fixes the build for GHC 6.4
677Ian Lynagh <igloo@earth.li>*-20080514003919]
678[Add in {-# OPTIONS #-} for the benefit of ghc-6.4.x
679Duncan Coutts <duncan@haskell.org>**20080514144728
680 Which do not grok OPTIONS_GHC or LANGUAGE pragmas
681]
682[fix scope errors in non-GHC branch of an #ifdef
683Malcolm.Wallace@cs.york.ac.uk**20080514112530]
684[Prefix the datadir env var with the package name
685Duncan Coutts <duncan@haskell.org>**20080514094203
686 Partly as it is more likely not to clash with other users and since
687 in general different libs within a program may need different paths.
688]
689[Made it possible to run executeables with data files in place.
690Johan Tibell <johan.tibell@gmail.com>**20080413134155
691 Added an environment variable, DATA_DIR, that is checked before the
692 installation data directory is used.
693]
694[Don't use Data.Char.isSymbol as it doesn't exist in base-1.0
695Duncan Coutts <duncan@haskell.org>**20080514083405
696 This is an alternative fix to creating a Distribution.Compat.Char
697]
698[Modules that use cpp have to have cpp language prama to say so
699Duncan Coutts <duncan@haskell.org>**20080514082913
700 Otherwise we cannot compile with just ghc --make
701 which is actually essential for bootstrapping.
702]
703[Make Distribution.Compat.Char for isSymbol; fixes the build with GHC 6.4
704Ian Lynagh <igloo@earth.li>*-20080514004703]
705[Add new compat modules to Cabal file
706Ian Lynagh <igloo@earth.li>**20080514022119]
707[Make Distribution.Compat.Char for isSymbol; fixes the build with GHC 6.4
708Ian Lynagh <igloo@earth.li>**20080514004703]
709[Hack around lack of Read for Map in GHC 6.4
710Ian Lynagh <igloo@earth.li>**20080514004400
711 This is made worse by Show on Map being strange in GHC 6.4.
712 The code could be better, but it works, and all the ugliness is in
713 #if's that we can remove at some point down the line.
714]
715[Define bracketOnError in compat; fixes the build for GHC 6.4
716Ian Lynagh <igloo@earth.li>**20080514003919]
717[Print exit code and stderr for failing progs at debug level verbosity
718Duncan Coutts <duncan@haskell.org>**20080513094055
719 Also adjust the verbosity level we get during configure at -v3
720 Should make it a bit easier to track down failing calls.
721]
722[Remove a hardcoded "dist"
723Ian Lynagh <igloo@earth.li>**20080511181305]
724[Make the "dist" directory configurable
725Ian Lynagh <igloo@earth.li>**20080511155640]
726[Remove gnerated file (doc/fptools.css)
727Ian Lynagh <igloo@earth.li>**20080511130035]
728[Fix a bug in the unlitter
729Ian Lynagh <igloo@earth.li>**20080510233852
730 If we see a birdtrack while we are in latex mode, then we stay in latex
731 mode - don't change into bird mode!
732]
733[Display Cabal version in configure output with -v
734Duncan Coutts <duncan@haskell.org>**20080509163507
735 eg "Using Cabal-1.5.1 compiled by ghc-6.8"
736 Annoyingly ghc doesn't give us its full version number.
737]
738[Add PackageIndex.reverseDependencyClosure
739Duncan Coutts <duncan@haskell.org>**20080506234902
740 It's similar to dependencyClosure but looks at reverse dependencies.
741 For example it's useful to find all packages that depend on broken
742 packages and are thus themselves broken.
743]
744[Improve style and performance of PackageIndex.dependencyClosure
745Duncan Coutts <duncan@haskell.org>**20080506234447
746 Keep the completed set as another PackageIndex rather than a list.
747 We want to return an index at the end anyway and in the mean time
748 we want to do lots of lookups to see if we've visited previously.
749]
750[Add PackageIndex.dependencyGraph that builds a Graph
751Duncan Coutts <duncan@haskell.org>**20080506234326
752 Useful for some more tricky queries.
753]
754[Remove a test for the specific kind of exception for nhc98 compatibility
755Duncan Coutts <duncan@haskell.org>**20080506102804
756 This was the check for ghc-pkg failing. We cannot check for the
757 exception being an ExitException since that assumes ghc's
758 representation of the Exception type, whereas nhc98 defines:
759 type Exception = IOError
760]
761[Add PackageIndex.delete
762Duncan Coutts <duncan@haskell.org>**20080506131603
763 We occasionally need to remove packages from an index
764 eg to restrict the choices of a dependency resolver.
765]
766[Cope better with ghc bug #2201, display a better error message
767Duncan Coutts <duncan@haskell.org>**20080505085746
768 Otherwise it can (and does) really confuse people.
769 The problem is that the command $ ghc-pkg-6.9 describe '*' --user
770 returns a non-zero exit code if the user package db is empty.
771 ghc-pkg intends this exit code to tell us if the query returned
772 any results (one can use more complex queries as tests) but Cabal
773 interprets it as failure. Indeed we cannot distinguish it from
774 any other kind of failure from ghc-pkg.
775]
776[Add PackageIndex.dependencyCycles
777Duncan Coutts <duncan@haskell.org>**20080504131626
778 Finds any cycles (strongly connected components) in the dependencies
779 of set of packages. This is useful for checking the correctness of
780 installation plans.
781]
782[Change dependencyInconsistencies to not take the pseudo top package
783Duncan Coutts <duncan@haskell.org>**20080504130802
784 The one case where we need the pseudo top package we can use
785 PackageIndex.insert instead to get the same effect and there
786 are other cases in cabal-install where we do not want a pseudo
787 top package.
788]
789[Reverse the order of the args to PackageIndex.insert
790Duncan Coutts <duncan@haskell.org>**20080504130317
791 To take the index last like the other functions and like Data.Map.
792 It is actually more convenient that way round.
793]
794[Revert the change about the --internal flag and a warning about haddock
795Duncan Coutts <duncan@haskell.org>**20080501223131
796 Just a bit of confusion over the behaviour of the --executable flag.
797]
798[Document --internal in Cabal.xml
799Joachim Breitner <mail@joachim-breitner.de>**20080501153356]
800[With --executable, --internal just adds --ignore-all-exports
801Joachim Breitner <mail@joachim-breitner.de>**20080501152544]
802[Implement --internal flag
803Joachim Breitner <mail@joachim-breitner.de>**20080501152421
804 Passing --internal to the haddock stage does these things:
805  * Does not pass --hide parameter to haddock
806  * Passes --ignore-all-exports parameter
807  * Appends "(internal documentation)" to the title
808]
809[Add an --internal flag to HaddockFlags
810Joachim Breitner <mail@joachim-breitner.de>**20080501145103]
811[Revert the other `fmap` to (.)
812Malcolm.Wallace@cs.york.ac.uk**20080501110006
813 To avoid needing a non-H'98 instance of Functor for (->).
814]
815[Revert one change of (.) to fmap. It was not necessary and broke nhc98.
816Duncan Coutts <duncan@haskell.org>**20080501104620
817 The other one was needed as we changed a type from Bool to Maybe Bool.
818]
819[Add help command as per ticket #272
820Duncan Coutts <duncan@haskell.org>**20080430133740
821 "cabal help" behaves like "cabal --help"
822 "cabal help cmd" behaves like "cabal cmd --help"
823 Should still work with command line completion.
824]
825[Change handling of bool command line args to allow an unset state
826Duncan Coutts <duncan@haskell.org>**20080429201123
827 For bool valued flags we were always producing the command line
828 string corresponding to a false flag value, even if the flag was
829 not set. For example we'd always get "--disable-shared".
830 It is important for cabal-install to be able to take an empty set
831 of flags, override a few flags and turn the flags back into
832 command line strings without getting a lot of extra defaults.
833 Partly this is because we have to work with older versions of the
834 Cabal library command line which does not recognise the new options.
835]
836[Remove the feature for highlighting the default cases in --help output
837Duncan Coutts <duncan@haskell.org>**20080429191206
838 Turns out it doesn't help us much because in many cases the initial/default
839 flags are actually empty so we cannot identify the default values.
840]
841[Make the old test code compile
842Duncan Coutts <duncan@haskell.org>**20080428225729
843 Still a lot of bit rot, many of the full tests fail due to changed paths
844]
845[Fix license parsing
846Duncan Coutts <duncan@haskell.org>**20080428192255
847 Spotted by the testsuite which I'm trying to resurrect.
848]
849[Fix fix for #224.
850Thomas Schilling <nominolo@gmail.com>**20080426164537
851 
852 Changing from list of Dependencies to Maps resulted in the wrong Monoid
853 instance being used.  I'd still like to be able to run a test suite on
854 this but that'd require a lot more work to do properly...
855]
856[When multiple specifying list fields in the same section combine them
857Duncan Coutts <duncan@haskell.org>**20080423201519
858 eg if you had:
859 extensions: Foo
860 extensions: Bar, Baz
861 then previously we only ended up with [Bar, Baz]. Now we get them all.
862 Only applies to list fields, for single fields the second value is taken
863 and the first is silently discarded. This isn't good of course but the
864 fix is harder since we're not in a context where we can report errors.
865 Really we should just declare up front what kind of field it is and
866 inherit the right behaviour automagically, either duplicates disallowed
867 or allowed and combined with mappend.
868]
869[Normalise file names in warning messages
870Duncan Coutts <duncan@haskell.org>**20080423190457
871 We already do this for error messages.
872]
873[Fix the check for -XFooBar ghc-options flags to be more permissive
874Duncan Coutts <duncan@haskell.org>**20080423190243
875 Previously we rejected all such flags but that posed the problem that older
876 versions of Cabal, like 1.1.6 did not understand new extensions so we
877 could not actually follow the advice and use the extenion. So now we only
878 warn about -X flags if they refer to old extensions that Cabal 1.1.6 knew
879 about. If the .cabal file specifies cabal-version: >= 1.2 or similar
880 (anything that excludes 1.1.6) then we warn about all -X flags.
881]
882[Add checks for unknown OS Arch and Compiler names
883Duncan Coutts <duncan@haskell.org>**20080423151410
884 They're ok locally but for distribution they need to be known.
885]
886[Package check now take a GenericPackageDescription
887Duncan Coutts <duncan@haskell.org>**20080423150354
888 Unfortunately in some cases we only have a already-configured
889 PackageDescription to we have to expose a checkConfiguredPackage.
890 We should refactor things so that we keep all the information
891 even in a configured PackageDescription.
892]
893[fix import for nhc98
894Malcolm.Wallace@cs.york.ac.uk**20080422133009]
895[Make warning messages show the file name
896Duncan Coutts <duncan@haskell.org>**20080422141909]
897[Update UTF8 code
898Duncan Coutts <duncan@haskell.org>**20080422141539
899 Some code and test cases taken from the utf8-string package.
900 Updated copyright notice appropriately (I think).
901]
902[Don't nub extra-libs in unionBuildInfo
903Duncan Coutts <duncan@haskell.org>**20080420192312
904 It's possible that we sometimes need to list the same library
905 more than once if there are circular symbol references.
906]
907[Fix unionBuildInfo
908Duncan Coutts <duncan@haskell.org>**20080420180520
909 Fix ticket #264 to use nub only on the fields which are treated as sets.
910 Probably we should be using the right types and mappend for each field.
911 Change to construct a new value from scratch rather than overriding one
912 of the two args. This helps to make sure we're updating all the field
913 as we get a warning if we miss any. Turns out we were missing the ghc
914 profiling and shared libs options which meant they were getting dropped.
915 That had the effect of ghc-prof-options: in .cabal files being ignored.
916 Thanks to 'midfield' from #haskell for spotting this.
917]
918[Add newtype FlagName and FlagAssignment type alias
919Duncan Coutts <duncan@haskell.org>**20080415204854
920 and use them in the appropriate places.
921]
922[Add PackageIndex.insert and reverse merge/mappend
923Duncan Coutts <duncan@haskell.org>**20080415203637
924 Packages in the second argument to merge now mask those in the first.
925]
926[Make finalizePackageDescription use CompilerId type
927Duncan Coutts <duncan@haskell.org>**20080413224111
928 Use the proper data type rather than a tuple (CompilerFlavor, Version)
929]
930[Fix #224.  We do not yet warn if the user specified a dependency that
931Thomas Schilling <nominolo@gmail.com>**20080413182659
932 did not occur in the package (it is just silently ignored.)
933]
934[Add 'readP_to_E' function that takes the longest parse.
935Thomas Schilling <nominolo@gmail.com>**20080413182042]
936[Add simple test case for the dependency resolution case.  This should
937Thomas Schilling <nominolo@gmail.com>**20080413132002
938 go into the test suite one day.
939]
940[Fix/Add documentation.
941Thomas Schilling <nominolo@gmail.com>**20080413131839]
942[Change dependency resolution algorithm.
943Thomas Schilling <nominolo@gmail.com>**20080413131807
944 
945 There were two reasons to do this.  Firstly, this formulation makes it
946 easier to add the --constraint command line flag that adds additional
947 constraints on the packages that should be used.
948 
949 Secondly, with the orgininal algorithm it was possible to satisfy the
950 constraint "foo < 1, foo > 2" if we had two versions of package "foo"
951 which each satisfy one constraint.  This patch fixes this by requiring
952 the same package to satisfy both constraints (which of course is
953 impossible in this case).
954]
955[expose ghcOptions
956jeanphilippe.bernardy@gmail.com**20080417211221
957 This helps finding the options to pass to GHC API in various tools
958]
959[expose tryGetConfigStateFile
960jeanphilippe.bernardy@gmail.com**20080417180248
961 This is needed by Yi to (try to) load an arbitrary
962 project.
963]
964[fix for #187 -- directory of Paths_packagename is included when looking for source files
965Andres Loeh <mail@andres-loeh.de>**20080412204904]
966[Check for the required cabal version early in parsing
967Duncan Coutts <duncan@haskell.org>**20080409154655
968 Previously we only checked the "cabal-version" field after parsing
969 and all other configure processing. If the package really needs a
970 later Cabal version it is of course highly likely that parsing or
971 configure are going to fail and the user is not going to get the
972 helpful error message about the version of Cabal required. So now
973 we do the check early during parsing. If a later version is
974 required and parsing subsequently fails, we now report the version
975 issue, not the subsequent parse error. If parsing succeeds we
976 still issue a warning which should be a useful hint to the user if
977 subsequent configure processing fails.
978]
979[Use relative file paths in .cabal parse error messages
980Duncan Coutts <duncan@haskell.org>**20080409154030
981 Do this by normalising the file path in the error message
982 and when looking for .cabal files, by looking in '.' rather
983 than the absolute path of the current directory.
984]
985[Remove unused import
986Duncan Coutts <duncan@haskell.org>**20080409073352]
987[Fix for detecting ~/.cabal/ dir as a .cabal file
988Duncan Coutts <duncan@haskell.org>**20080409073236
989 Which happened if you use cabal configure in your home dir.
990 Now produced the right error message, or if you actually put
991 a cabal project in your home dir, it might actually work.
992 Also, do the same fix for findHookedPackageDesc.
993]
994[Fix spelling in error message
995Duncan Coutts <duncan@haskell.org>**20080408134610]
996[Fix names of profiling libs
997Duncan Coutts <duncan@haskell.org>**20080407013449
998 I broke this recently when refactoring. Restore the original behaviour.
999 Was generating "libHSfoo_p-1.0.a" when it should be "libHSfoo-1.0_p.a".
1000]
1001[TAG 1.5.1
1002Duncan Coutts <duncan@haskell.org>**20080329181329]
1003Patch bundle hash:
1004b97438a91b25b611b54be9b0e2960aaef30c994a