-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task runner capabilities #364
Comments
I'm not too keen on this, as I see that kind of interface quite complex (like, see #353 for an idea of which corner cases these kind of interfaces entail) As far as I know config reading and purs calls take very little time, so if you're encountering any performance issues I'd say we should try to address these underlying problems instead of trying to optimize some specific case |
OK, the proposed interface is only one of the possibilities.
With a decent hardware, maybe. I'm currently having this for a no-op build (after a warm-up):
|
when run on |
Right so the step taking the majority of the time is the call to But in any case we have the |
Yep. My point was that they could be used automatically when possible. Are you against introducing that kind of "cleverness" to spago? Also, I just realized that it may be possible to detect two or more sequential no-op builds by storing timestamped build history or some info about the last build somewhere. On successful detection of a no-op build, a warning could be spawned, suggesting to use these flags. |
How would we detect changes and decide to perform a build instead of skipping it? The most straightforward option would be to hash the source files and check if the hash is the same (if it changed you need to rebuild). |
I was thinking that it could be done by checking the time of the end of the last spago call, i.e. "how long ago did the last build end?". So that if there are many sequential runs, only the first would result in calling |
And to protect this scheme from source file modifications during the build itself, it is possible to watch the files while |
I have the feeling this would just be a big workaround for |
OK, let's close this then. |
Often in our build scenarios we have multiple spago commands running against the same set of files.
E.g. something like:
I think that by allowing spago to inspect the scenario beforehand, it is possible to achieve a speedup. Config re-reading, re-validation of packages and some calls to
purs
could be skipped, if only spago were smart enough to determine which steps are no-op.The interface for this could be as simple as specifying commands multiple times:
This does not even require a breaking change, AFAIK.
The text was updated successfully, but these errors were encountered: