Skip to content

Offline builds #359

Closed
Closed

Description

@davidsiefert

Would it be possible to support offline builds where stack commands just rely on cached downloads? I cannot do any builds while I'm traveling to/from work. 😭 🐼

Activity

  1. bitemyapp commented on Jun 19, 2015

    @bitemyapp
    Contributor

    Think we had a ticket before to this effect.

    #316 and
    #297

    --dry-run and --prefetch I think.

    Let us know if this solves your problem for you.

  2. added this to the milestone on Jun 21, 2015
  3. gregwebs commented on Jun 23, 2015

    @gregwebs
    Contributor

    I am trying to cache my dependencies for a continuous integration build. So I tried using --dry-run and --prefetch, but that is not quite what I wanted: I would like to install the dependencies. So the behavior I really want is the same as cabal install --only-dep --enable-tests.

    Would it make sense to have a stack test --dry-run --install-deps command?

    A somewhat related note is that --prefetch does not seem useful without --dry-run, but this is not enforced.
    So one option would be for the behavior of --prefetch to be download and install, but when --dry-run is given it only downloads.

    Another option would be to dedicate a separate top-level command: stack install-deps. By default, I usually want to install test dependencies, so it would need a flag to indicate that test dependencies should not be installed.

  4. snoyberg commented on Jun 23, 2015

    @snoyberg
    Contributor

    Did you see the --only-snapshot flag?

  5. gregwebs commented on Jun 23, 2015

    @gregwebs
    Contributor

    yes, that is what I was looking for! I can confirm that --dry-run --prefetch builds from cached downloads

  6. davidsiefert commented on Jun 23, 2015

    @davidsiefert
    Author

    The --dry-run --prefetch also worked for me. However, I'm wondering would it be possible to create a new project offline as well?

  7. snoyberg commented on Jun 24, 2015

    @snoyberg
    Contributor

    How would stack be able to know which build plan and packages to download in advance in that case?

  8. davidsiefert commented on Jun 24, 2015

    @davidsiefert
    Author

    I'm wondering if things could be cached from other prior builds at a higher level. For example, my prior project build has a certain set of dependencies that were downloaded, so if my new project has a subset of those dependencies then what would prevent me from using those artifacts? If stack is running 'offline', look in the local project cache, if nothing there, goto the next level cache (a user-level cache?), and if missing information then fail.

    Doing some experimenting, if I create an empty cabal file (contents of: "") it already goes to the internet to get snapshots.json.... Let me try to prototype what I'm talking about and see what points it fails miserably. 😄

  9. snoyberg commented on Jun 24, 2015

    @snoyberg
    Contributor

    It's only snapshots.json that gets downloaded each time, since that information is temporal. Packages and indices are cached and shared among projects already.

  10. borsboom commented on Mar 20, 2018

    @borsboom
    Contributor

    Potential approach: #3813

  11. neerajb1 commented on Sep 28, 2018

    @neerajb1

    Hi All,

    I am very new on ducling using stack. I had installed duckling on windows but don't know to run . Anyone knows how to run it. I am very new to it. Could you please let me know how to run ducling as local host

    Thanks in advance

  12. bitemyapp commented on Sep 28, 2018

    @bitemyapp
    Contributor

    @neerajb1 this is the repository for Stack the build tool, not the Duckling project. We can't tell you how to run Duckling, you'll need to ask them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions