Skip to content
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

Lazily download packages #2406

Merged
merged 11 commits into from
Feb 29, 2016
Merged

Lazily download packages #2406

merged 11 commits into from
Feb 29, 2016

Commits on Feb 19, 2016

  1. Fuse SourceMap and PackageSet

    This commit moves the SourceMap structure into the PackageSet structure, and
    simultaneously massively cuts down on the API surface area of PackageSet. It's
    intended that eventually a PackageSet will be a lazily loaded set of packages so
    we don't have to download everything all at once, and this is the commit in
    preparation of that.
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    2d25fca View commit details
    Browse the repository at this point in the history
  2. Refactor links validation to not use PackageSet

    Eventually we may not have the entire set of packages resident in memory, so
    refactor the implementation to validate the `links` attribute in a demand driven
    way rather than all at once up front.
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    5ea7a97 View commit details
    Browse the repository at this point in the history
  3. Refactor build script output state initialization

    Like with the previous refactor, remove the need to list all packages in a
    package set as we only need to lazily do this for the actual packages being
    compiled. Whenever a build script is requested to be executed is when we
    actually go and try to see if an override was in play.
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    919cdde View commit details
    Browse the repository at this point in the history
  4. Move the get_package step later when calculating deps

    Future calls to `get_package` may end up actually downloading a package, so we
    want to defer this as late as possible to ensure that we don't download
    anything.
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    dc5671d View commit details
    Browse the repository at this point in the history
  5. Remove the ability to list packages in PackageSet

    If we download lazily, that's excessively wasteful!
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    04c6c74 View commit details
    Browse the repository at this point in the history
  6. Remove SourceSet

    This isn't used anywhere
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    c024743 View commit details
    Browse the repository at this point in the history
  7. Merge the get/download methods on the Source trait

    Nothing currently implements the ability to more efficiently download a set of
    packages at any one point in time, and the download/get distinction isn't really
    used at all. We can always refactor later, but currently there's no benefit, nor
    can it really be seen what the possible benefit is, so let's just merge these
    two methods into one and have them operate on one id at a time.
    alexcrichton committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    9cf7051 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0b256d3 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2016

  1. Implement a fallible PackageSet::get

    This function will lazily download the package specified and fill a cell with
    that package. Currently this is always infallible because the `PackageSet` is
    initialized with all packages, but eventually this will not be true.
    alexcrichton committed Feb 22, 2016
    Configuration menu
    Copy the full SHA
    b56b61c View commit details
    Browse the repository at this point in the history
  2. Move Context::get_package to returning a Result

    The propagate all the `try!`-s needed upwards
    alexcrichton committed Feb 22, 2016
    Configuration menu
    Copy the full SHA
    078b670 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2016

  1. Stop downloading all packages immediately

    Instead delay all downloads until just before they're needed. This should ensure
    that we don't download any more packages than we really need to.
    alexcrichton committed Feb 26, 2016
    Configuration menu
    Copy the full SHA
    f994592 View commit details
    Browse the repository at this point in the history