Ticket #539: depends.patch

File depends.patch, 28.3 KB (added by ganesh, 4 years ago)
Line 
1Thu Mar 26 20:51:09 GMT 2009  Ganesh Sittampalam <ganesh@earth.li>
2  * add dependency reporting command
3
4New patches:
5
6[add dependency reporting command
7Ganesh Sittampalam <ganesh@earth.li>**20090326205109] {
8hunk ./Distribution/Client/List.hs 6
9+--                    Ganesh Sittampalam 2009
10hunk ./Distribution/Client/List.hs 14
11-  list, info
12+  list, info, depends
13hunk ./Distribution/Client/List.hs 45
14-         ( ListFlags(..), InfoFlags(..) )
15+         ( ListFlags(..), InfoFlags(..), DependsFlags(..) )
16hunk ./Distribution/Client/List.hs 55
17+import Data.Map
18+         ( Map )
19+import qualified Data.Map as Map
20hunk ./Distribution/Client/List.hs 59
21-         ( listToMaybe, fromJust, fromMaybe, isJust, isNothing )
22+         ( listToMaybe, fromJust, fromMaybe, isJust, isNothing, catMaybes )
23+import Data.Set
24+         ( Set )
25+import qualified Data.Set as Set
26hunk ./Distribution/Client/List.hs 133
27+depends :: Verbosity
28+        -> PackageDB
29+        -> [Repo]
30+        -> Compiler
31+        -> ProgramConfiguration
32+        -> DependsFlags
33+        -> [UnresolvedDependency] --FIXME: just package names? or actually use the constraint
34+        -> IO ()
35+depends verbosity packageDB repos comp conf dependsFlags deps = do
36+  AvailablePackageDb available _ <- getAvailablePackages verbosity repos
37+  deps' <- IndexUtils.disambiguateDependencies available deps
38+  Just installed <- getInstalledPackages verbosity comp packageDB conf
39+  let deps'' = [ name | UnresolvedDependency (Dependency name _) _ <- deps' ]
40+  let pkgs = (PackageIndex.allPackages installed
41+             ,PackageIndex.allPackages available)
42+      pkgsinfo = map (uncurry mergePackageInfo) $ uncurry mergePackages pkgs
43+
44+  let fwdmap, revmap :: Map PackageName (Set PackageName)
45+      fwdmap = Map.fromList [(pkgname pkginfo, Set.fromList (dependencyNames pkginfo)) | pkginfo <- pkgsinfo ]
46+      revmap = Map.fromListWith Set.union [(name2, Set.singleton name1) | (name1, names) <- Map.assocs fwdmap, name2 <- Set.elems names]
47+      closeOnce mp = Map.fromListWith Set.union [(name1, Set.unions (names:namess)) | (name1, names) <- Map.assocs mp,
48+                                                                                      let namess = catMaybes $ map (flip Map.lookup mp) (Set.elems names)]
49+      close mp = let mp' = closeOnce mp in if mp == mp' then mp else close mp'
50+
51+  let maptouse = (if fromFlag (dependsRecursive dependsFlags) then close else id) $
52+                 if fromFlag (dependsReverse dependsFlags) then revmap else fwdmap
53+
54+  let names = Set.unions $ catMaybes $ map (flip Map.lookup maptouse) deps''
55+
56+  putStrLn $ unwords $ map (\(PackageName n) -> n) $ Set.elems names
57+
58hunk ./Distribution/Client/List.hs 199
59+dependencyNames :: PackageDisplayInfo -> [PackageName]
60+dependencyNames = map (\(Dependency name _) -> name) . dependencies
61+
62hunk ./Distribution/Client/Setup.hs 23
63+    , dependsCommand, DependsFlags(..)
64hunk ./Distribution/Client/Setup.hs 423
65+-- ------------------------------------------------------------
66+-- * Depends flags
67+-- ------------------------------------------------------------
68+
69+data DependsFlags = DependsFlags {
70+    dependsRecursive :: Flag Bool,
71+    dependsReverse :: Flag Bool,
72+    dependsVerbosity :: Flag Verbosity
73+  }
74+
75+defaultDependsFlags :: DependsFlags
76+defaultDependsFlags = DependsFlags {
77+    dependsRecursive = toFlag False,
78+    dependsReverse = toFlag False,
79+    dependsVerbosity = toFlag normal
80+  }
81+
82+dependsCommand  :: CommandUI DependsFlags
83+dependsCommand = CommandUI {
84+    commandName         = "depends",
85+    commandSynopsis     = "List dependencies of a package.",
86+    commandDescription  = Nothing,
87+    commandUsage        = usagePackages "depends",
88+    commandDefaultFlags = defaultDependsFlags,
89+    commandOptions      = \_ -> [
90+        optionVerbosity dependsVerbosity (\v flags -> flags { dependsVerbosity = v })
91+
92+        , option [] ["recursive"]
93+            "Follow dependencies recursively"
94+            dependsRecursive (\v flags -> flags { dependsRecursive = v })
95+            trueArg
96+
97+        , option [] ["reverse"]
98+            "Find dependencies of the given package"
99+            dependsReverse (\v flags -> flags { dependsReverse = v })
100+            trueArg
101+
102+        ]
103+  }
104+
105+instance Monoid DependsFlags where
106+  mempty = defaultDependsFlags
107+  mappend a b = DependsFlags {
108+    dependsRecursive = combine dependsRecursive,
109+    dependsReverse = combine dependsReverse,
110+    dependsVerbosity = combine dependsVerbosity
111+  }
112+    where combine field = field a `mappend` field b
113+
114hunk ./Main.hs 25
115+         , DependsFlags(..), dependsCommand
116hunk ./Main.hs 47
117-import Distribution.Client.List             (list, info)
118+import Distribution.Client.List             (list, info, depends)
119hunk ./Main.hs 125
120+      ,dependsCommand         `commandAddAction` dependsAction
121hunk ./Main.hs 237
122+dependsAction :: DependsFlags -> [String] -> GlobalFlags -> IO ()
123+dependsAction dependsFlags extraArgs globalFlags = do
124+  pkgs <- either die return (parsePackageArgs extraArgs)
125+  let verbosity = fromFlag (dependsVerbosity dependsFlags)
126+  config <- loadConfig verbosity (globalConfigFile globalFlags) mempty
127+  let configFlags  = savedConfigureFlags config
128+      globalFlags' = savedGlobalFlags    config `mappend` globalFlags
129+  (comp, conf) <- configCompilerAux configFlags
130+  depends verbosity
131+          (configPackageDB' configFlags)
132+          (globalRepos globalFlags')
133+          comp
134+          conf
135+          dependsFlags
136+          [ UnresolvedDependency pkg []  | pkg <- pkgs ]
137+
138}
139
140Context:
141
142[TAG 0.6.2
143Duncan Coutts <duncan@haskell.org>**20090219130720]
144[Update the README
145Duncan Coutts <duncan@haskell.org>**20090219130705]
146[Add missing other-modules
147Duncan Coutts <duncan@haskell.org>**20090218235206]
148[Add extra assertion into the top down dep planner
149Duncan Coutts <duncan@haskell.org>**20090218234650]
150[Bump version to 0.6.2
151Duncan Coutts <duncan@haskell.org>**20090218231016]
152[Update changelog for 0.6.2 release
153Duncan Coutts <duncan@haskell.org>**20090218230918]
154[Tweaks to the bootstrap script
155Duncan Coutts <duncan@haskell.org>**20090218223943
156 Update Cabal lib version to 1.6.0.2
157 Implement a couple shell script coding style recommendations.
158]
159[Disable the upgrade command for now.
160Duncan Coutts <duncan@haskell.org>**20090218221752]
161[Add warnings in the case that no remote servers have been specified
162Duncan Coutts <duncan@haskell.org>**20090216181424
163 It's not strictly an error but it can be rather confusing.
164]
165[Put an explanation of the config file format at the top in comments.
166Duncan Coutts <duncan@haskell.org>**20090215190817]
167[Change the field order in the initial config file.
168Duncan Coutts <duncan@haskell.org>**20090215190727
169 Also update the name of one excluded field.
170]
171[Put the default logging and reporting setting in the initial config file.
172Duncan Coutts <duncan@haskell.org>**20090215190524]
173[Complete the implementation of --build-summary=TEMPLATE
174Duncan Coutts <duncan@haskell.org>**20090215190254
175 Actually respect the new flag. It's actually a list of template files
176 and all specified files get written to. This allows us to specify
177 a default build log file and also have the user write to extra ones.
178 The summary file template can contain $pkgid $compiler etc.
179]
180[Rearrange user interface for build logging
181Duncan Coutts <duncan@haskell.org>**20090215185800
182 The new options (as described in ticket #501) are:
183   --build-summary=TEMPLATE
184   --build-log=TEMPLATE
185   --remote-build-reporting=LEVEL
186   where LELVEL `elem` [none,anonymous,detailed]
187]
188[always check environment variables for HTTP proxy first
189Ganesh Sittampalam <ganesh.sittampalam@credit-suisse.com>**20090210230736]
190[Improve the cabal update notice
191Duncan Coutts <duncan@haskell.org>**20090209211844]
192[Don't report that packages are cached at the default verbosity level
193Duncan Coutts <duncan@haskell.org>**20090209201228
194 It's just not that useful. Report it at -v verobisty level, and
195 change the text and formatting.
196]
197[Fix #490, unpack now gives a proper error message.
198Andrea Vezzosi <sanzhiyan@gmail.com>**20090208165240
199 Ignore-this: 358dd291624f8858a52ae2ff27a7e0c2
200]
201[Use the new withTempDirectory function
202Duncan Coutts <duncan@haskell.org>**20090202012255
203 In particular it means that install will unpack packages into
204 different temp dirs on each invocation which means that running
205 install on the same package for different compilers at the same
206 time should not clash. This is quite useful for testing.
207]
208[Add compat withTempDirectory function
209Duncan Coutts <duncan@haskell.org>**20090202011917
210 This is already in Cabal HEAD but we cannot use that yet
211]
212[Add homepage and bug-reports fields to .cabal file
213Duncan Coutts <duncan@haskell.org>**20090201225021]
214[Remove the prefernece and cabal lib version flags from the InstallFlags
215Duncan Coutts <duncan@haskell.org>**20090126012412
216 They are now in the ConfigExFlags instead.
217]
218[Change the install and configure modules to use the extended config flags
219Duncan Coutts <duncan@haskell.org>**20090126011942]
220[Add ConfigExFlags into the configure, install and upgrade commands
221Duncan Coutts <duncan@haskell.org>**20090126010918
222 Not yet passed all the way through.
223]
224[Add ConfigExFlags and related command
225Duncan Coutts <duncan@haskell.org>**20090126010132
226 This is for configure flags that we use in the configure command in the
227 cabal command line tool that are not present in runghc Setup configure
228 command line interface. These are flags that we are moving from the
229 install command, so that we can also use them for the configure command.
230 Initially it's just the flags for specifying package version preferences
231 and  the cabal library version. We'll add constraints later.
232]
233[Remove unnecessary qualified use of ConfigFlags
234Duncan Coutts <duncan@haskell.org>**20090126003951]
235[Make configure use the dependency resolver
236Duncan Coutts <duncan@haskell.org>**20090125170951
237 This means it makes smarter decisions and also decions that are more
238 consistent with those taken by the install command.
239]
240[Update HTTP dep in the bootstrap script
241Duncan Coutts <duncan@haskell.org>**20090123160700]
242[Improve error message when ghc or ghc-pkg are mismatched or not found
243Duncan Coutts <duncan@haskell.org>**20090123160550]
244[Don't use grep -e, solaris does not like it
245Duncan Coutts <duncan@haskell.org>**20090123160443]
246[Fix some FIXMEs and do some TODOs in the list command
247Duncan Coutts <duncan@haskell.org>**20090123004810
248 Now properly prints if the haddock docs are installed and if the
249 tarball is cached. It did print them before but it was lying.
250]
251[Add initial implementation of cabal info
252Duncan Coutts <duncan@haskell.org>**20090119025202
253 It provides more detailed information on a particular package.
254 Still a few TODOs. Fixes #361, #449 and #456.
255]
256[Only print the config file location for the global --help
257Duncan Coutts <duncan@haskell.org>**20090116175900]
258[Update to using HTTP-4000.x
259Duncan Coutts <duncan@haskell.org>**20090116135646
260 This should fix a long-standing bug with http proxies (ticket #352)
261 It should also make downloads faster, or at least use less memory.
262]
263[Parse compiler field from old config files correctly
264Duncan Coutts <duncan@haskell.org>**20090116002851
265 Really old versions of cabal-install generated a default config
266 containing "compiler: GHC". Sadly the new way we generate the
267 config file parser from the command line parser means we end up
268 with a case-sensitive parser as it only matches the exact
269 command line flags. So we hack it and add in a traditional
270 parser for that field only. Really the command line and config
271 file infrastructure needs rewriting again. Sigh.
272]
273[Improve the printing of config file field parse error messages
274Duncan Coutts <duncan@haskell.org>**20090116001421]
275[Read install dirs correctly from old-style .cabal/config files
276Duncan Coutts <duncan@haskell.org>**20090116001321
277 Should fix ticket #365
278]
279[Note in the README that zlib needs the zlib C lib package
280Duncan Coutts <duncan@haskell.org>**20090116000541]
281[Traditional /bin/sh portability fixes for bootstrap.sh
282Duncan Coutts <duncan@haskell.org>**20090115113227]
283[More improvments to the bootstrap.sh script
284Duncan Coutts <duncan@haskell.org>**20090115110612]
285[Rewrite the bootstrap.sh script
286Duncan Coutts <duncan@haskell.org>**20090115102210
287 Hopefully more useful and more robust. In particular it does not
288 download and install packages where suitable versions are already
289 installed. It also checks for deps.
290]
291[Don't add installed constraints system packages that are not installed
292Duncan Coutts <duncan@haskell.org>**20090114143540
293 In particular fixes a problem (ticket #439) where we required the
294 installed version of ghc-prim with compilers that do not have that
295 package such as ghc-6.8 and older, hugs, nhc, lhc etc.
296]
297[cabal update now reports if a newer version of cabal-install is available
298Duncan Coutts <duncan@haskell.org>**20090114133220]
299[Warn if a package index from a remote repo is 15 days or older
300Duncan Coutts <duncan@haskell.org>**20090114124827
301 For example it will print:
302 Warning: The package list for 'hackage.haskell.org' is 16 days old.
303 Run 'cabal update' to get the latest list of available packages.
304]
305[Don't display the category in cabal list output
306Duncan Coutts <duncan@haskell.org>**20090114003549
307 It is probably not sufficiently useful to justify the space it takes.
308]
309[In cabal list, always display available and installed versions
310Duncan Coutts <duncan@haskell.org>**20090114003329
311 Previously we omitted the line if it was not installed, or was
312 not available. However that confused people because it was not
313 obvious that it would list both. Now it shows something like:
314  * foo
315        Latest version available: 1.0
316        Latest version installed: [ Not installed ]
317]
318[Print the location of the config file in the global --help
319Duncan Coutts <duncan@haskell.org>**20090113192215
320 Ticket #413
321]
322[Improve the cabal --help output
323Duncan Coutts <duncan@haskell.org>**20090113192058
324 Put the general info message at the top and make the explanation of
325 installing a hackage package somewhat clearer.
326]
327[Display examples in cabal install --help
328Duncan Coutts <duncan@haskell.org>**20090113161426
329 Examples:
330   cabal install                     Package in the current directory
331   cabal install foo                 Package from the hackage server
332   cabal install foo-1.0             Specific version of a package
333   cabal install 'foo < 2'           Constrained package version
334]
335[Print a newline after entering upload password
336Duncan Coutts <duncan@haskell.org>**20090113142604
337 So we end up with:
338   Hackage password:
339   Uploading test.tar.gz...
340 rather than:
341   Hackage password: Uploading test.tar.gz...
342]
343[Respect the --package-db flag when compiling Setup.hs
344Duncan Coutts <duncan@haskell.org>**20081221184755
345 Fixes ticket #394.
346]
347[Use a more precise package substitution test in improvePlan
348Duncan Coutts <duncan@haskell.org>**20081219215922
349 This is where we take a valid plan and we "improve" it by swapping
350 installed packages for available packages wherever possible. This
351 change is to the condition we use in deciding if it is safe to use
352 the installed package in place of a reinstall. Previously we checked
353 that the dependencies of the installed version were exactly the same
354 as the dependencies we were planning to reinstall with. That was
355 valid but rather conservative. It caused problems in some situations
356 where the installed package did not exactly match the available
357 package (eg when using development versions of a package or of ghc).
358 What we do now is test if the extra constraints implied by selecting
359 the installed version are consistent with the existing set of
360 constraints. This involves threading the constraint set around. In
361 theory this should even cope with adding additional packages to the
362 plan as a result of selecting an installed package.
363]
364[Use installed constraints instead of hiding versions of the base package
365Duncan Coutts <duncan@haskell.org>**20081219193740
366 We want to stop cabal-install from accidentally trying to upgrade
367 the base package since this doesn't work in most cases. We used to
368 achieve that by deleting the base package from the available package
369 index. We now do it by leaving the package index as is and instead
370 adding a constraint that we pick only an installed version of base.
371 This is a nicer hack and has the potential to give better error
372 messages.
373]
374[Extend the invariant on the Constraints ADT
375Duncan Coutts <duncan@haskell.org>**20081219192309
376 It now carries around the original version of the database
377 purely so that it can do a much more extensive consistency
378 check. Packages are never gained or lost, just transfered
379 between pots in various slightly tricky ways.
380]
381[Fix constraint set handling for installed constraints
382Duncan Coutts <duncan@haskell.org>**20081219182328
383 A rather subtle bug. The code was actually correct but the transitionsTo
384 assertion was not accounting for a transition between the case where
385 a package's available version had been excluded and then the whole thing
386 got excluded by a version constraint. It counted one side as a loss
387 without a corresponding gain on the other side.
388]
389[Add a install/upgrade --preference='foo < 2' flag
390Duncan Coutts <duncan@haskell.org>**20081218213849
391 This behaves just like the preferred-versions file in the hackage index
392 but it can be specified on the command line or in a config file.
393]
394[Generalise the way preferences are specified to the resolver
395Duncan Coutts <duncan@haskell.org>**20081218204917
396 We still provide a default global policy, but now we give a
397 list of per-package preferences which can be on the version
398 or installed state. Later preferences override earlier ones.
399]
400[Workaround for a url parsing bug that breaks http proxies that need auth
401Duncan Coutts <duncan@haskell.org>**20081218165541
402 Diagnosis and patch from Valery V. Vorotyntsev.
403]
404[Implement cabal install --constraint=
405Duncan Coutts <duncan@haskell.org>**20081216235032
406 Connect up the existing user interface with the new dep resolver api.
407]
408[Have the dep resolver take constraints and targets separately
409Duncan Coutts <duncan@haskell.org>**20081216233446]
410[Add PackageInstalledConstraint to the PackageConstraint type
411Duncan Coutts <duncan@haskell.org>**20081215224538
412 This should be useful for things like preventing upgrading
413 the base package for ghc.
414]
415[A bit more renaming in the top down resolver
416Duncan Coutts <duncan@haskell.org>**20081215224324]
417[Take preferences into account in the bogus resolver
418Duncan Coutts <duncan@haskell.org>**20081215221728]
419[Mostly renaming and trivial refactoring
420Duncan Coutts <duncan@haskell.org>**20081215221034]
421[Change the dep resolver interface to pass constraints separately from targets
422Duncan Coutts <duncan@haskell.org>**20081215215634
423 This lets us specify constraints for packages that are not targets.
424]
425[Rename and rearrange the PackagePreferences type
426Duncan Coutts <duncan@haskell.org>**20081215204836]
427[Don't re-export PackageName from Distribution.Client.Dependency
428Duncan Coutts <duncan@haskell.org>**20081215203617
429 It used to be a type alias.
430]
431[Use the Platform type rather than passing around the OS and Arch separately
432Duncan Coutts <duncan@haskell.org>**20081215202856]
433[Bump version to 0.6.1
434Duncan Coutts <duncan@haskell.org>**20081210224713]
435[Tidy up the unpack code
436Duncan Coutts <duncan@haskell.org>**20081210223633
437 Also fix a bug for tar files that contain entries for files
438 without preceding entries for the directories they are in.
439]
440[Clean up the code in Main
441Duncan Coutts <duncan@haskell.org>**20081210223242
442 Make the names more regular and set up the various flags
443 in a more regular way.
444]
445[Use (\_ -> []) instead of mempty to avoid funky Monoid instance
446Duncan Coutts <duncan@haskell.org>**20081210223106
447 This would let us build with ghc-6.4 or nhc if it were not for other issues.
448]
449[Fix warning aobut -fffi in OPTIONS pragma
450Duncan Coutts <duncan@haskell.org>**20081203005449]
451[Mention where files get downloaded to at verbosity level verbose
452Duncan Coutts <duncan@haskell.org>**20081203004427]
453[Implement 'cabal unpack' command as in #390
454Andrea Vezzosi <sanzhiyan@gmail.com>**20081113185923]
455[Remove use of tabs
456Duncan Coutts <duncan@haskell.org>**20081122163527]
457[Put explicit lower bound on version of base
458Duncan Coutts <duncan@haskell.org>**20081122163151
459 It does not build with ghc-6.4.2, missing Functor instance for Either.
460]
461[Use a more general fix for "cabal install base"
462Duncan Coutts <duncan@haskell.org>**20081122163026
463 It's not specific to LHC. Normally we prevent upgrading of base
464 since it's unlikely to work and would normally be accidental.
465 However when the user explicitly asks to upgrade base then we
466 let them do that and they can keep the pieces when it breaks.
467]
468[Warn about use of tabs
469Duncan Coutts <duncan@haskell.org>**20081122154309]
470[Only send the base file name when uploading tarballs
471Duncan Coutts <duncan@haskell.org>**20080903230334
472 The server should ignore the dir part anyway but there's no
473 need to send it in the first place.
474]
475[Slightly better lhc support.
476Lemmih <lemmih@gmail.com>**20081121034338
477 Ignore-this: 9f51f465aa87d1c6677ca492f877ecd6
478]
479[TAG 0.6.0
480Duncan Coutts <duncan@haskell.org>**20081011195420]
481[Bump version to 0.6.0
482Duncan Coutts <duncan@haskell.org>**20081011195314]
483[Improve the README, better install instructions
484Duncan Coutts <duncan@haskell.org>**20081011185919
485 And slightly better intro guide to the main commands.
486]
487[Bump versions of deps in the bootstrap script
488Duncan Coutts <duncan@haskell.org>**20081011184937]
489[Add Eq for a couple types in the anon build reports
490Duncan Coutts <duncan@haskell.org>**20081011184825]
491[Drop silly export
492Duncan Coutts <duncan@haskell.org>**20081011184805]
493[Apparnetly builds with unix-2.0 which is what came with ghc-6.6
494Duncan Coutts <duncan@haskell.org>**20081010234836]
495[Fix the -i dir for compiling Setup.hs when it's the current dir
496Duncan Coutts <duncan@haskell.org>**20081010234558
497 map "" to "."
498]
499[Tidy up the preferred-versions file parser
500Duncan Coutts <duncan@haskell.org>**20081010070105]
501[Bump version number and dependencies
502Duncan Coutts <duncan@haskell.org>**20081010065854]
503[Relax deps to build with ghc-6.10
504Duncan Coutts <duncan@haskell.org>**20081007230701]
505[Handle build reports with missing logs better
506Duncan Coutts <duncan@haskell.org>**20081007230635]
507[Add DownloadFailed as a possible failure for installation
508Duncan Coutts <duncan@haskell.org>**20081007230418
509 Should now be caught during installing a bunch of packages
510 and not cause immediate overall failure. It should instead
511 be treated like any other package build failure and be
512 reported at the end and only affect other dependent builds.
513]
514[Fix search paths for compiling Setup.hs scrips
515Duncan Coutts <duncan@haskell.org>**20081007213630
516 and in particular for bootstrapping the Cabal lib.
517]
518[Fix selecting paired packages
519Duncan Coutts <duncan@haskell.org>**20081007062930
520 Previously when we selected base 4 (and as a consequence
521 slected base 3 too) we didn't properly trace the dependencies
522 of base 3 so if nothing actually required base 3 then we ended
523 up with base 3 in the solution but not with syb which it
524 depends on. Consequently the solution was invalid.
525 Now we select the paired package properly (hopefully).
526]
527[Take preferred versions into account in dependency planning
528Duncan Coutts <duncan@haskell.org>**20081006055129
529 This means we can now globally prefer base 3 rather than 4.
530 However we need to be slightly careful or we end up deciding
531 to do silly things like rebuild haskell98 against base 3.
532 That would happen because the h98 package doesn't constrain
533 the choice to one or the other and we would prefer base 3.
534 So we have to add that we really prefer whatever it uses
535 currently (if any).
536]
537[Pass the package suggested version constraints through to the resolver
538Duncan Coutts <duncan@haskell.org>**20081006042758
539 Not used yet.
540]
541[Fix selection of paired packages
542Duncan Coutts <duncan@haskell.org>**20081006040616]
543[Read preferred versions from the package index
544Duncan Coutts <duncan@haskell.org>**20081006030259
545 From a file named 'preferred-versions' in the 00-index.tar.gz
546 If there are several they are combined. Contents is like:
547 base < 4
548 one suggested version constraint per line.
549]
550[Refactor and update the hackage index reading code
551Duncan Coutts <duncan@haskell.org>**20081005202747]
552[Print more details about what is to be installed with -v
553Duncan Coutts <duncan@haskell.org>**20081005075556
554 Reports if installs are new or reinstalls and for reinstalls
555 prints what dependencies have changed.
556]
557[When finalising paired packages, cope with there being multiple choices
558Duncan Coutts <duncan@haskell.org>**20081005053821
559 For ordinary packages we selected a single version which means
560  we added an equality constraint. As a consequence we used to
561 assume there was only one version left when finalising. For
562 paired packages there may be two versions left if the package
563 did not directly constrain the choice to just one. If there is
564 more than one version remaining then we have to pick between
565 them. At the moment we still pick the highest version, but
566 later we can take a global preference or polciy into account.
567]
568[When selecting paired packages, select both.
569Duncan Coutts <duncan@haskell.org>**20081005053804]
570[Handle constraints on paired packages
571Duncan Coutts <duncan@haskell.org>**20081005051919
572 The trick is that when applying constraints to paired
573 packages, the constraint has to exclude both packages at
574 once. We exclude the pair together or not at all. If it
575 would only exclude one then we discard the constraint.
576]
577[Add the notion of paired packages to the Constraints ADT
578Duncan Coutts <duncan@haskell.org>**20081005013141
579 Packages like base-3 and base-4 are paired. This means they are
580 supposed to be treated equivalently in some contexts. Paired
581 packages are installed packages with the same name where one
582 version depends on the other.
583]
584[Make InstalledPackage an instance of PackageFixedDeps
585Duncan Coutts <duncan@haskell.org>**20081005012741]
586[Add the glue code to actully report excluded packages
587Duncan Coutts <duncan@haskell.org>**20081005001400
588 Now displayed in the output of install --dry-run -v
589]
590[Have Constraints.constrain report the excluded packages
591Duncan Coutts <duncan@haskell.org>**20081004235006
592 Each time we apply a constraint we can end up excluding some
593 extra package. Report that list of packages because it is
594 quite interesting information to get insight into what the
595 resolver is actually doing.
596]
597[Separate the construction of the exclusion list from its use
598Duncan Coutts <duncan@haskell.org>**20081004234421
599 Previously directly inserted packages into the excluded package
600 list. Now we generate a list of them and then add them. We want
601 the list of newly excluded packages separately because it is
602 interesting information to report to the user when -v is on.
603]
604[Generalise the logging of selected and discarded packages
605Duncan Coutts <duncan@haskell.org>**20081004232555
606 Allow for selecting several packages in one go.
607 Currently when we select a package we only list the over versions
608 of the same package that that excludes, and not the other packages
609 we exclude by applying the dependency constraints of the selected
610 package. In future we would like to do that so we now report the
611 package name of discards not just the version. Though we do group
612 by the package name to avoid too much repition.
613]
614[Fix infinite loop in the TopDown dependency resolver
615Andrea Vezzosi <sanzhiyan@gmail.com>**20080925181441
616 The loop occurred only if a package depended on another one
617 with the same name, e.g. base-3.0.3.0 <- base-4.0.0.0
618]
619[small improvements to bootstrap
620Duncan Coutts <duncan@haskell.org>**20080926214828
621 patch sent in by brian0, ticket #357
622]
623[Update to the development version of the Cabal lib
624Duncan Coutts <duncan@haskell.org>**20080831225243
625 The branch of cabal-install that tracks Cabal-1.4 now lives at
626 http://darcs.haskell.org/cabal-branches/cabal-install-0.5/
627]
628[Allow use of curl in bootstrap.sh
629Duncan Coutts <duncan@haskell.org>**20080826233400
630 Patch from jsnx. Fixes ticket #343. Also, use "cd blah; cd .."
631 instead of "pushd blah; popd" as some shells lack pushd/popd
632]
633[Relax version constraint on unix package
634Duncan Coutts <duncan@haskell.org>**20080826232851
635 Allows building with ghc-6.6.1
636]
637[Use mplus not mappend for combining tar filename checks
638Duncan Coutts <duncan@haskell.org>**20080826232606
639 mappend would join the error messages in the case that both
640 checks failed. Also the monoid instance was new in base 3.
641]
642[TAG 0.5.2
643Duncan Coutts <duncan@haskell.org>**20080826214238]
644Patch bundle hash:
645d3ff023708178ec167f7752a57b39d8a6f676f54