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

language: dont hide modules without aliases #3356

Merged
1 commit merged into from Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/damlc/daml-opts/daml-opts/DA/Daml/Options.hs
Expand Up @@ -63,7 +63,7 @@ toCompileOpts options@Options{..} reportProgress =
, optDefer = Ghcide.IdeDefer False
}
where
toRenaming aliases = ModRenaming False [(GHC.mkModuleName mod, GHC.mkModuleName alias) | (mod, alias) <- aliases]
toRenaming aliases = ModRenaming True [(GHC.mkModuleName mod, GHC.mkModuleName alias) | (mod, alias) <- aliases]
locateInPkgDb :: String -> PackageConfig -> GHC.Module -> IO (Maybe FilePath)
locateInPkgDb ext pkgConfig mod
| (importDir : _) <- importDirs pkgConfig = do
Expand Down
Expand Up @@ -177,7 +177,7 @@ packagingTests = testGroup "packaging"
writeFileUTF8 (projectB </> "daml" </> "B.daml") $ unlines
[ "daml 1.2"
, "module B where"
, "import A"
, "import C"
, "import Foo.Bar.Baz"
, "b : ()"
, "b = a"
Expand All @@ -194,7 +194,11 @@ packagingTests = testGroup "packaging"
, " - daml-prim"
, " - daml-stdlib"
, " - " <> aDar
, "build-options:"
, "- '--package=(\"a-1.0\", [(\"A\", \"C\")])'"
]
-- the last option checks that module aliases work and modules imported without aliases
-- are still exposed.
withCurrentDirectory projectB $ callCommandQuiet "daml build"
assertBool "b.dar was not created." =<< doesFileExist bDar
, testCaseSteps "Dependency on a package with source: A.daml" $ \step -> withTempDir $ \tmpDir -> do
Expand Down