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

Make newly-added add-source deps override previously installed versions. #1331

Merged
merged 1 commit into from May 17, 2013

Conversation

23Skidoo
Copy link
Member

Fixes #1197.

This patch is a bit large because it includes several related changes:

  1. Remove installUseSandbox from InstallFlags and pass useSandbox as an additional argument instead.

  2. Instead of calling reinstallAddSourceDeps from installAction, always pass SandboxPackageInfo to install.

  3. Set the timestamps of newly-added add-source deps to 0 in the timestamp file.

  4. Move the timestamp file update to postInstallActions from withModifiedDeps. This way, the timestamps are updated even when the user runs install --only-dependencies or install some-add-source-dep-package-id.

@23Skidoo
Copy link
Member Author

This solution is also described in a bit more detail here.

Fixes haskell#1197.

This patch is a bit large because it includes several related changes:

1) Remove 'installUseSandbox' from 'InstallFlags' and pass 'useSandbox' as an
additional argument instead.

2) Instead of calling 'reinstallAddSourceDeps' from 'installAction', always pass
'SandboxPackageInfo' to 'install'.

3) Set the timestamps of newly-added add-source deps to 0 in the timestamp file.

4) Move the timestamp file update to 'postInstallActions' from
'withModifiedDeps'. This way, the timestamps are updated even when the user runs
'install --only-dependencies' or 'install some-add-source-dep-package-id'.
Nothing -- FIXME
globalFlags' configFlags'' configExFlags' installFlags' haddockFlags'
targets
-- FIXME: Passing 'SandboxPackageInfo' unconditionally means that 'install'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate a bit on this. Are we rebuilding/reinstalling things unnecessarily? That sounds bad.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This means that if some add-source dependency is modified when the user runs cabal install some-package inside a sandbox, it will be reinstalled, even though some-package probably does not depend on it.

@tibbe
Copy link
Member

tibbe commented May 17, 2013

LGTM

23Skidoo added a commit that referenced this pull request May 17, 2013
Make newly-added add-source deps override previously installed versions.
@23Skidoo 23Skidoo merged commit be4e19d into haskell:master May 17, 2013
@23Skidoo 23Skidoo deleted the new-add-source-deps-have-priority branch May 17, 2013 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make add-source packages have priority over other packages
2 participants