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

Track static vs. dynamic dependencies #8624

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jan 24, 2023

  1. Extend the InstalledPackageInfo record with 2 fields for artifacts.

    These 2 fields involve configuration flags that affect which build artifacts
    (dynamic and static files) are provided.  (This record corresponds to the
    ‘.conf’ files in the package-db directories, and Cabal-syntax provides an
    interface to this record.  Cabal-syntax is used as a dependency by ‘ghc-pkg’
    and ‘cabal-install’, and old Cabal-syntax implementations may produce an
    ‘Unknown field’ warning when used with new ‘.conf’ files.)
    
    Add these IPI build artifact fields to enable tracking build artifacts in
    installed packages.  The modular resolver could then use these new fields to
    filter out installed package options missing required build artifacts that
    would lead to a failing build plan.
    bairyn committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    111a46a View commit details
    Browse the repository at this point in the history
  2. Track build artifacts in installed packages.

    Add a step to the validation phase of the modular resolver that rules out
    pre-installed package options that would introduce a missing artifact
    condition, so that alternatives if available can be chosen instead, rather than
    producing assignments for a build plan that would fail with ‘files missing’
    (e.g. ‘….hi’ or ‘….dyn_hi’).
    bairyn committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    39953f1 View commit details
    Browse the repository at this point in the history
  3. Add a PackageTest test for missing static files.

    The test builds and installs a package dynamically only, then builds and
    installs a package statically that depends on that dynamic package.
    
    This demonstrates how cabal-install can fail when it ignores which build
    artifacts are provided by a package, e.g. static and/or dynamic files.  Recent
    changes add to the InstalledPackageInfo record so that installed packages are
    more explicit in what is available, so that cabal-install is better able to
    know when it should rebuild from source, when installed packages were not built
    from config flags to build the required artifacts.
    bairyn committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    eaf3858 View commit details
    Browse the repository at this point in the history