You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. 😭 🐼
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.
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. 😄
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.
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
Activity
bitemyapp commentedon Jun 19, 2015
Think we had a ticket before to this effect.
#316 and
#297
--dry-runand--prefetchI think.Let us know if this solves your problem for you.
gregwebs commentedon Jun 23, 2015
I am trying to cache my dependencies for a continuous integration build. So I tried using
--dry-runand--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 ascabal install --only-dep --enable-tests.Would it make sense to have a
stack test --dry-run --install-depscommand?A somewhat related note is that
--prefetchdoes not seem useful without--dry-run, but this is not enforced.So one option would be for the behavior of
--prefetchto be download and install, but when--dry-runis 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.snoyberg commentedon Jun 23, 2015
Did you see the --only-snapshot flag?
gregwebs commentedon Jun 23, 2015
yes, that is what I was looking for! I can confirm that
--dry-run --prefetchbuilds from cached downloadsdavidsiefert commentedon Jun 23, 2015
The
--dry-run --prefetchalso worked for me. However, I'm wondering would it be possible to create a new project offline as well?snoyberg commentedon Jun 24, 2015
How would stack be able to know which build plan and packages to download in advance in that case?
davidsiefert commentedon Jun 24, 2015
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. 😄snoyberg commentedon Jun 24, 2015
It's only
snapshots.jsonthat gets downloaded each time, since that information is temporal. Packages and indices are cached and shared among projects already.borsboom commentedon Mar 20, 2018
Potential approach: #3813
neerajb1 commentedon Sep 28, 2018
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
bitemyapp commentedon Sep 28, 2018
@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.