Commit 1b000168 authored by Committed by Ben GamariBrowse files
The -package flag should select match from right-most package db.
The shadowing and default behavior (in the absence of -hide-all-packages) prefers packages that come from "later" package databases. So for example if tmp1.d and tmp2.d both expose p-1.0, then ghc -package-db tmp1.d -package-db tmp2.d brings the p-1.0 from tmp2.d into scope (and if they have the same IPID, tmp2.d shadows tmp1.d). HOWEVER, -package flags do NOT respect this behavior. ghc -package-db tmp1.d -package-db tmp2.d -package p-1.0 this will force the p-1.0 from tmp1.d to be exposed! This is confusing, so this patch makes the behavior of -package flags consistent. Signed-off-by: Edward Z. Yang <email@example.com> Test Plan: validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1709
Showing with 163 additions and 1 deletion