| | 105 | == Discussions == |
| | 106 | |
| | 107 | '''2007-07-16''' |
| | 108 | {{{ |
| | 109 | 16:38 < Igloo> nominolo: http://urchin.earth.li/~ian/nom.txt |
| | 110 | 16:39 < nominolo> ah. ok. that's pretty much what i agreed on with bringert, too |
| | 111 | 16:40 < nominolo> one thing is that i'm not quite sure what the interface to a cabal file with configs should be |
| | 112 | 16:40 < nominolo> e.g. for cabal install |
| | 113 | 16:40 < nominolo> atm, it's very opaque |
| | 114 | 16:41 < nominolo> ie., you can only read it and find a possible flag assignment |
| | 115 | 16:41 < nominolo> then you get an old-style interface |
| | 116 | 16:41 < Igloo> What can't you do? |
| | 117 | 16:42 < Igloo> Presumably the datastructures are also exported? |
| | 118 | 16:42 < nominolo> inspect which conditions are there, what possibe deps, what archs are possible |
| | 119 | 16:43 < Igloo> But that could always be added later, right? Or written by hand with the datastructure? |
| | 120 | 16:43 < nominolo> atm, it is parsed directly into a structure optimized for flag-resolving |
| | 121 | 16:43 < nominolo> not yet |
| | 122 | 16:43 < nominolo> i think i'll add an intermediate representation |
| | 123 | 16:44 < nominolo> sth. like: data Stmt = CIf Cond [Stmt] [Stmt] | CProp .. |
| | 124 | 16:44 < Igloo> Ah, I see |
| | 125 | 16:45 < nominolo> my internal nstructure is more like a decision tree |
| | 126 | 16:45 < nominolo> or rather, graph |
| | 127 | 16:46 < nominolo> bjorn and i also talked about possible requirements for cabal-install |
| | 128 | 16:47 < Igloo> I'm happy for Bjorn to mentor you rather than me, BTW; might make more sense given the goegraphy |
| | 129 | 16:47 < nominolo> yes, but he'll be away for a while from next week on |
| | 130 | 16:47 < Igloo> Ah, OK |
| | 131 | 16:48 < nominolo> i'll try to summarize it in a mail |
| | 132 | 16:49 < nominolo> btw, what is the problem with building it in HEAD? |
| | 133 | 16: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 |
| | 134 | 16:50 < lambdabot> Title: RFC: Cabal-Configurations patch(es), http://tinyurl.com/36yqf7 |
| | 135 | 16:52 < nominolo> ah, right. |
| | 136 | 16: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 |
| | 137 | 16:58 < Igloo> The sooner we can get the HEAD to use configurations the more chance we have of finding any bugs |
| | 138 | 16:59 < nominolo> yes. i'll try to fix that today |
| | 139 | 16:59 < Igloo> Cool |
| | 140 | 17:00 < nominolo> the other changes shouldn't affect backwards compatibility |
| | 141 | 17:54 < nominolo> Igloo: libraries/installPackage.hs is supposed to register an already configured (and built) package, right? |
| | 142 | 17:54 < Igloo> nominolo: Yes |
| | 143 | 17:55 < nominolo> ok. than the fix is simple, because finalizePackage has already been called |
| | 144 | 17:55 < nominolo> configure writes down a resolved package description. currently into a separate file |
| | 145 | 17:56 < Igloo> Ah, I thought it just put the flags used into the LBI |
| | 146 | 17:56 < nominolo> i guess it would be a good idea to put that into the persistBuildConfig |
| | 147 | 17:57 < nominolo> i don't think this would help with anything |
| | 148 | 17:57 < nominolo> could be done of course |
| | 149 | 17:57 < Igloo> Hmm, actually, why isn't the whole PackageDescription in the LBI? |
| | 150 | 17:57 < nominolo> yes. that's what i'm considering now |
| | 151 | 17:58 < nominolo> i wonder why we have to read the PD anyways |
| | 152 | 17: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 |
| | 153 | 17:58 < Igloo> When installing? So we know what modules we need to install |
| | 154 | 17:59 < Igloo> (and other files, as appropriate) |
| | 155 | 17:59 < nominolo> i see |
| | 156 | 18:00 < nominolo> then we should just use the finalized PD from the persistBuildConfig |
| | 157 | 18:02 < nominolo> that's good. this way i can undo some interface changes |
| | 158 | 18: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 |
| | 159 | 18:03 < Igloo> OAIC? |
| | 160 | 18:04 < nominolo> true |
| | 161 | 18:06 < nominolo> would we want to detect if a .cabal file was changed after a configuration was called? |
| | 162 | 18:06 < nominolo> ie, if we read both files separately we could do that |
| | 163 | 18:06 < Igloo> I'm actually liking the idea that no changes are noticed, as I think currently it's somewhat random whether one is |
| | 164 | 18:06 < nominolo> but also get inconsistencies |
| | 165 | 18:06 < nominolo> yeah |
| | 166 | 18:06 < Igloo> And yeah, it means the cabal file can't go inconsistent with the config result |
| | 167 | 18:07 < Igloo> So bundling the PD in the LBI makes sense to me |
| | 168 | 18:07 < nominolo> yeah, i think so, too |
| | 169 | 18:07 < Igloo> Then the configure hook gets a PPD and all the other hooks get an LBI, I think |
| | 170 | 18:07 < Igloo> Wait, I've got PD and PPD the wrong way round, haven't I |
| | 171 | 18:07 < nominolo> yes, and i'll change the PPD to something more usable |
| | 172 | 18:08 < nominolo> no it's right that way round |
| | 173 | 18:08 < Igloo> Oh, OK. What's the first P again? I thought it was Prepared |
| | 174 | 18:08 < nominolo> parse -> PPD -> config+finalize -> LBI+PD |
| | 175 | 18:08 < nominolo> prepared |
| | 176 | 18:08 < nominolo> not super-sensible |
| | 177 | 18:09 < nominolo> maybe it should be PD instead of PPD, and LocalPD |
| | 178 | 18:09 < nominolo> but that might break too much |
| | 179 | 18:10 < nominolo> i'd like to keep the current names afap |
| | 180 | 18:11 < Igloo> current as in before your patches? |
| | 181 | 18:11 < nominolo> yup |
| | 182 | 18:11 < nominolo> i mostly just added code |
| | 183 | 18:11 Igloo doesn't like prepared, but can't think of a good word OTTOMH |
| | 184 | 18:12 < nominolo> ParsedPD? |
| | 185 | 18:12 < Philippa> compiled? |
| | 186 | 18:12 < Igloo> I think it should be something like Complete or Flagful |
| | 187 | 18:13 < Igloo> And we can add a type synonym of an equivalent name for PackageDescription, and migrate to it |
| | 188 | 18:13 < nominolo> well, the thing is, i kinda "compile" to the old-style PD |
| | 189 | 18:13 < Igloo> Oh, except we can't do that with the constructor name. Why don't we have constructor synonyms? |
| | 190 | 18:14 < Igloo> I'm not keen on parsed, because you could put that on the front of pretty much any datastructure |
| | 191 | 18:14 < nominolo> yeah, that would be helpful |
| | 192 | 18:14 < nominolo> true |
| | 193 | 18:14 < nominolo> it should be PD and CompiledPD |
| | 194 | 18:15 < Igloo> CompletePD and (Local)PD? |
| | 195 | 18:15 Igloo is no good at naming things |
| | 196 | 18:16 < nominolo> GenericPD and (Local)PD? |
| | 197 | 18:16 < nominolo> GlobalGD and (Local)PD |
| | 198 | 18:16 < nominolo> *GlobalPD |
| | 199 | 18:17 < Igloo> Or Generic and Specific, maybe |
| | 200 | |
| | 201 | }}} |
| | 202 | |