Skip to content

Either implement implicit snapshots or have an option promoting everything to the local DB #3782

@mgsloan

Description

@mgsloan

To me, one of the ugliest bits of stack right now is if you want to build all of the packages in your build plan with a particular flag. To do it currently, you have to ensure that your snapshot and all packages that could potentially be shared are unregistered. Moreover, these global build settings can leak into snapshot packages.

I propose that for the next stack release that either implicit snapshots should be implemented (#3330), or if it isn't implemented yet, a simple approach should be implemented to make the semantics match what they will be with implicit snapshots:

  1. Snapshot packages that were configured with nonstandard settings should be unregistered and removed from the sharing cache.

  2. By default, if $everything: ... is specified, then promote the entire snapshot to the local DB. Similarly, ghc-options for a particular package should promote that package to the local DB.

The cost will be a lot less package sharing if $everything is specified in ghc-options. However, this will finally allow us to implement configure-options: + --configure-options with decent semantics, and make ghc-options: for more reasonable.

We could consider this change a nice step along the way to implicit snapshots, but it might be less work to just go ahead and do implicit snapshots and skip the intermediate step.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions