-
Notifications
You must be signed in to change notification settings - Fork 710
Minimal rebuilds for add-source dependencies #1121
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
Comments
I think we can get this in 1.18. |
My current plan for this:
This will also make it easy to implement |
I'm not quite sure I follow how this would work. I think it might be sufficiently complicated that a short design doc is in order. |
@tibbe This is the same idea as checking whether the library/exe timestamp is older than any of the sources, except that we'll be using a single timestamp for the whole sandbox instead of a one for each library. Since the whole sandbox is updated as a single unit, I think that this will work. This will make the timestamp check much easier (all you need to know is the list of the dependency's source files, and this info can be extracted from the One complication with keeping copies of add-source deps in the sandbox is that files can be deleted/added in the source, but we can start with rebuilding from scratch each time the dependency is updated and later implement smarter updating. |
Here are a question I'd like you think about: In the future, we'd like to move away from a model where building is focused on the package in the current directory. Instead we expect that users (e.g. a company) will have a large source tree (e.g. in git) containing hundreds of packages. In such a system we'd like to to focus less on the "current" package and more on the whole tree. Here's a mocked-up interaction:
In such a system (with potentially tens of thousands of source files), do we really want to copy all the source files into some new directory? I don't think so, as it might bring a host of problems with keeping things in sync (in addition to potentially being slow). |
It should be easy to extend this scheme to support in-place building (just add another type of build tree reference). Timestamp check should still work. With multi-package source trees we can use in-place building by default. Motivation for copying by default is that it'll avoid surprising behaviour such as described in #1281 - but we can still have Additionally, copying will make the sandbox relocatable - if you copy the project directory to another computer, you'll still have a snapshot of all dependencies (though it won't be possible to update them). In any case, copying is not essential to this scheme, minimal rebuilds should be still implementable without it. I think I'll implement both |
I think this is a non-goal. I don't want people to think in terms of sandboxes. They're just a mechanism to get hermetic builds.
We can try this for now, but remember the above statement. Sandboxes are not the goal and neither is lots of In other word, lets implement this mechanism but remember that it's just that. |
Fixed by #1292. |
Right now there is no way to tell whether an add-source dependency needs to be rebuilt, so
sandbox-build
conservatively reinstalls all add-source dependencies. This, in turn, triggers the installation of all their reverse dependencies, which can make the build unnecessary long. We should only reinstall those add-source dependencies that have been modified since the last time we installed them.As an interim measure there should at least be a flag to disable reinstalling add-source dependencies.
The text was updated successfully, but these errors were encountered: