Changes between Version 13 and Version 14 of CabalConfigurations

Show
Ignore:
Timestamp:
07/16/07 09:38:42 (6 years ago)
Author:
nominolo
Comment:

added irc log for isaac

Legend:

Unmodified
Added
Removed
Modified
  • CabalConfigurations

    v13 v14  
    103103Note that if you want to change the configuration of a package, you have to ''./Setup.lhs clean'' first, to make sure everything gets recompiled. 
    104104 
     105== Discussions == 
     106 
     107'''2007-07-16''' 
     108{{{ 
     10916:38 <     Igloo> nominolo: http://urchin.earth.li/~ian/nom.txt 
     11016:39 <  nominolo> ah. ok. that's pretty much what i agreed on with bringert, too 
     11116:40 <  nominolo> one thing is that i'm not quite sure what the interface to a cabal file with configs should be 
     11216:40 <  nominolo> e.g. for cabal install 
     11316:40 <  nominolo> atm, it's very opaque 
     11416:41 <  nominolo> ie., you can only read it and find a possible flag assignment 
     11516:41 <  nominolo> then you get an old-style interface 
     11616:41 <     Igloo> What can't you do? 
     11716:42 <     Igloo> Presumably the datastructures are also exported? 
     11816:42 <  nominolo> inspect which conditions are there, what possibe deps, what archs are possible 
     11916:43 <     Igloo> But that could always be added later, right? Or written by hand with the datastructure? 
     12016:43 <  nominolo> atm, it is parsed directly into a structure optimized for flag-resolving 
     12116:43 <  nominolo> not yet 
     12216:43 <  nominolo> i think i'll add an intermediate representation 
     12316:44 <  nominolo> sth. like: data Stmt = CIf Cond [Stmt] [Stmt] | CProp .. 
     12416:44 <     Igloo> Ah, I see 
     12516:45 <  nominolo> my internal nstructure is more like a decision tree 
     12616:45 <  nominolo> or rather, graph 
     12716:46 <  nominolo> bjorn and i also talked about possible requirements for cabal-install 
     12816:47 <     Igloo> I'm happy for Bjorn to mentor you rather than me, BTW; might make more sense given the goegraphy 
     12916:47 <  nominolo> yes, but he'll be away for a while from next week on 
     13016:47 <     Igloo> Ah, OK 
     13116:48 <  nominolo> i'll try to summarize it in a mail 
     13216:49 <  nominolo> btw, what is the problem with building it in HEAD? 
     13316:50 <     Igloo> The problem is building the HEAD with it; the last part of http://www.haskell.org/pipermail/cabal-devel/2007-June/000652.html 
     13416:50 < lambdabot> Title: RFC: Cabal-Configurations patch(es), http://tinyurl.com/36yqf7 
     13516:52 <  nominolo> ah, right. 
     13616:57 <     Igloo> If it works as much as the old Cabal then I wouldn't be shy about pushing it into the HEAD before it is perfect, by the way 
     13716:58 <     Igloo> The sooner we can get the HEAD to use configurations the more chance we have of finding any bugs 
     13816:59 <  nominolo> yes.  i'll try to fix that today 
     13916:59 <     Igloo> Cool 
     14017:00 <  nominolo> the other changes shouldn't affect backwards compatibility 
     14117:54 <  nominolo> Igloo: libraries/installPackage.hs is supposed to register an already configured (and built) package, right? 
     14217:54 <     Igloo> nominolo: Yes 
     14317:55 <  nominolo> ok. than the fix is simple, because finalizePackage has already been called 
     14417:55 <  nominolo> configure writes down a resolved package description.  currently into a separate file 
     14517:56 <     Igloo> Ah, I thought it just put the flags used into the LBI 
     14617:56 <  nominolo> i guess it would be a good idea to put that into the persistBuildConfig 
     14717:57 <  nominolo> i don't think this would help with anything 
     14817:57 <  nominolo> could be done of course 
     14917:57 <     Igloo> Hmm, actually, why isn't the whole PackageDescription in the LBI? 
     15017:57 <  nominolo> yes. that's what i'm considering now 
     15117:58 <  nominolo> i wonder why we have to read the PD anyways 
     15217:58 <     Igloo> The reasons I can see for putting the flags in are (a) you can find out what flags were used and (b) tweaks to things like the package description won't need a reconfigure 
     15317:58 <     Igloo> When installing? So we know what modules we need to install 
     15417:59 <     Igloo> (and other files, as appropriate) 
     15517:59 <  nominolo> i see 
     15618:00 <  nominolo> then we should just use the finalized PD from the persistBuildConfig 
     15718:02 <  nominolo> that's good.  this way i can undo some interface changes 
     15818:03 <     Igloo> Oh, I'm expecting it to need more interface changes, as most of the hooks will no longer need to take a PackageDescription argument 
     15918:03 <     Igloo> OAIC? 
     16018:04 <  nominolo> true 
     16118:06 <  nominolo> would we want to detect if a .cabal file was changed after a configuration was called? 
     16218:06 <  nominolo> ie, if we read both files separately we could do that 
     16318:06 <     Igloo> I'm actually liking the idea that no changes are noticed, as I think currently it's somewhat random whether one is 
     16418:06 <  nominolo> but also get inconsistencies 
     16518:06 <  nominolo> yeah 
     16618:06 <     Igloo> And yeah, it means the cabal file can't go inconsistent with the config result 
     16718:07 <     Igloo> So bundling the PD in the LBI makes sense to me 
     16818:07 <  nominolo> yeah, i think so, too 
     16918:07 <     Igloo> Then the configure hook gets a PPD and all the other hooks get an LBI, I think 
     17018:07 <     Igloo> Wait, I've got PD and PPD the wrong way round, haven't I 
     17118:07 <  nominolo> yes, and i'll change the PPD to something more usable 
     17218:08 <  nominolo> no it's right that way round 
     17318:08 <     Igloo> Oh, OK. What's the first P again? I thought it was Prepared 
     17418:08 <  nominolo> parse -> PPD -> config+finalize -> LBI+PD 
     17518:08 <  nominolo> prepared 
     17618:08 <  nominolo> not super-sensible 
     17718:09 <  nominolo> maybe it should be PD instead of PPD, and LocalPD  
     17818:09 <  nominolo> but that might break too much 
     17918:10 <  nominolo> i'd like to keep the current names afap 
     18018:11 <     Igloo> current as in before your patches? 
     18118:11 <  nominolo> yup 
     18218:11 <  nominolo> i mostly just added code 
     18318:11              Igloo doesn't like prepared, but can't think of a good word OTTOMH 
     18418:12 <  nominolo> ParsedPD? 
     18518:12 <  Philippa> compiled? 
     18618:12 <     Igloo> I think it should be something like Complete or Flagful 
     18718:13 <     Igloo> And we can add a type synonym of an equivalent name for PackageDescription, and migrate to it 
     18818:13 <  nominolo> well, the thing is, i kinda "compile" to the old-style PD 
     18918:13 <     Igloo> Oh, except we can't do that with the constructor name. Why don't we have constructor synonyms? 
     19018:14 <     Igloo> I'm not keen on parsed, because you could put that on the front of pretty much any datastructure 
     19118:14 <  nominolo> yeah, that would be helpful 
     19218:14 <  nominolo> true 
     19318:14 <  nominolo> it should be PD and CompiledPD 
     19418:15 <     Igloo> CompletePD and (Local)PD? 
     19518:15              Igloo is no good at naming things 
     19618:16 <  nominolo> GenericPD and (Local)PD? 
     19718:16 <  nominolo> GlobalGD and (Local)PD 
     19818:16 <  nominolo> *GlobalPD 
     19918:17 <     Igloo> Or Generic and Specific, maybe 
     200 
     201}}} 
     202 
    105203 
    106204== Progress Log ==