[Haskell-cafe] Compilation time

Michael Snoyman michael at snoyman.com
Tue Aug 25 04:55:07 UTC 2015


This sounds like another manifestation of[1]. tl;dr: stack added a feature
in the 0.1.3.0 release that checks if modules or data files are used by
your code but not listed in your cabal file. The current implementation
will then notice on the *second* build that it didn't know about these
files the first time around, and rebuild. In single-package projects, this
isn't a big deal, but in multi-package projects, it causes a cascade
rebuild. Manny and I discussed yesterday, and we have a plan for fixing
this.

On the other hand, if the rebuild happens every time you run stack build,
without requiring any changes to files to trigger it, that would be a
problem. If so, please open a separate Github issue for us to assess and
discuss.

[1] https://github.com/commercialhaskell/stack/issues/838

On Tue, Aug 25, 2015 at 1:04 AM, Christopher Allen <cma at bitemyapp.com>
wrote:

> Did you run it multiple times and get that output? Also you usually want
> stack build.
>
> My work projects use Stack and it'll *only* build my current project when
> I run stack build (and be fairly fast) unless I changed the source, a cabal
> file, or a stack.yaml.
>
> If you did run it multiple times and got that output, is something
> touching those directories between builds?
>
> On Mon, Aug 24, 2015 at 4:38 PM, Corentin Dupont <
> corentin.dupont at gmail.com> wrote:
>
>> i tried, but the time is still around 1m20s.
>> The syntax is:
>>
>> packages:
>> - '.'
>> - location: ../Nomyx-Core
>>   extra-dep: true
>> - location: ../Nomyx-Language
>>   extra-dep: true
>> - location: ../Nomyx-Web
>>   extra-dep: true
>>
>> Right?
>> It spends a lot of time apparently recompiling dependencies:
>>
>> $ stack install
>> Nomyx-Core-0.7.6-30a37de35e61a9979fabc74d548ee6e6: unregistering
>> Nomyx-Language-0.7.6-06bfc13bf2ab48163968e23e340be801: unregistering
>> Nomyx-Web-0.7.6-b75419b3b0faacbe02c94176b84e0564: unregistering
>> Nomyx-Language-0.7.6: build
>> Nomyx-Language-0.7.6: install
>> Nomyx-Core-0.7.6: build
>> Nomyx-Core-0.7.6: install
>> Nomyx-Web-0.7.6: build
>> Nomyx-Web-0.7.6: install
>> Nomyx-0.7.6: build
>> Building Nomyx-0.7.6...
>> Preprocessing executable 'Nomyx' for Nomyx-0.7.6...
>> Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/Nomyx/Nomyx ...
>> Nomyx-0.7.6: install
>> Installing executable(s) in
>>
>> /home/cdupont/Dropbox/Nomyx/Nomyx/.stack-work/install/x86_64-linux/lts-2.19/7.8.4/bin
>> Completed all 4 actions.
>> Copying from
>> /home/cdupont/Dropbox/Nomyx/Nomyx/.stack-work/install/x86_64-linux/lts-2.19/7.8.4/bin/Nomyx
>> to /home/cdupont/.local/bin/Nomyx
>>
>> Installed executables to /home/cdupont/.local/bin/:
>> - Nomyx
>>
>>
>>
>> On Mon, Aug 24, 2015 at 11:16 PM, Christopher Allen <cma at bitemyapp.com>
>> wrote:
>>
>>> You need to specify extra-deps: true for Nomyx-* if you to cache the
>>> build results and treat them like dependencies rather than core parts of
>>> your project.
>>>
>>> On Mon, Aug 24, 2015 at 4:15 PM, Corentin Dupont <
>>> corentin.dupont at gmail.com> wrote:
>>>
>>>> My stack.yaml is like that:
>>>>
>>>> flags: {}
>>>> packages:
>>>> - '.'
>>>> - ../Nomyx-Core
>>>> - ../Nomyx-Language
>>>> - ../Nomyx-Web
>>>> extra-deps:
>>>> - Nomyx-Core-0.7.6
>>>> - Nomyx-Language-0.7.6
>>>> - Nomyx-Web-0.7.6
>>>> - hint-server-1.4.2
>>>> - DebugTraceHelpers-0.12
>>>> - acid-state-0.12.4
>>>> - either-unwrap-1.1
>>>> - eprocess-1.7.2
>>>> - happstack-authenticate-2.1.4
>>>> - reform-0.2.7
>>>> - reform-blaze-0.2.4
>>>> - reform-happstack-0.2.5
>>>> - time-recurrence-0.9.2
>>>> - web-routes-0.27.9
>>>> - web-routes-happstack-0.23.9
>>>> - web-routes-regular-0.19.0
>>>> - web-routes-th-0.22.3
>>>> - boomerang-1.4.5
>>>> - data-ordlist-0.4.7.0
>>>> - happstack-hsp-7.3.5
>>>> - happstack-jmacro-7.0.10
>>>> - hsp-0.10.0
>>>> - hsx-jmacro-7.3.6
>>>> - hsx2hs-0.13.3.2
>>>> - ixset-typed-0.3
>>>> - jwt-0.6.0
>>>> - pwstore-purehaskell-2.1.4
>>>> - web-routes-boomerang-0.28.4
>>>> - web-routes-hsp-0.24.6
>>>> - harp-0.4.1
>>>> resolver: lts-2.19
>>>>
>>>> Is that correct?
>>>>
>>>> On Mon, Aug 24, 2015 at 10:54 PM, Christopher Allen <cma at bitemyapp.com>
>>>> wrote:
>>>>
>>>>> Do you have additional packages other than '.' specified in your
>>>>> stack.yaml? If so, are they specified with extra-dep: true or extra-dep:
>>>>> false or not specified at all?
>>>>>
>>>>> On Mon, Aug 24, 2015 at 3:44 PM, Corentin Dupont <
>>>>> corentin.dupont at gmail.com> wrote:
>>>>>
>>>>>> Hi guys,
>>>>>> I have an application with around 7K loc in 4 packages. It takes
>>>>>> 1min30 to compile with stack.
>>>>>> Is it a normal compilation time?
>>>>>> My computer is fairly recent with Intel i7... I run some music in
>>>>>> background :).
>>>>>> Is there some statistics about compilation time somewhere?
>>>>>> Thanks.
>>>>>> Corentin
>>>>>>
>>>>>> _______________________________________________
>>>>>> Haskell-Cafe mailing list
>>>>>> Haskell-Cafe at haskell.org
>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Chris Allen
>>>>> Currently working on http://haskellbook.com
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Chris Allen
>>> Currently working on http://haskellbook.com
>>>
>>
>>
>
>
> --
> Chris Allen
> Currently working on http://haskellbook.com
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150825/35de4036/attachment.html>


More information about the Haskell-Cafe mailing list