mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-13 00:16:19 +03:00
Avoid globbing for stable packages (#3905)
I managed to break our Windows CI twice already due to this so while it makes me sad, I think hardcoding those files is the more sensible option for now.
This commit is contained in:
parent
52bf6056a4
commit
10a7715d2b
@ -489,8 +489,15 @@ generatePackageMapRule opts =
|
||||
generateStablePackages :: LF.Version -> FilePath -> IO ([FileDiagnostic], Map.Map (UnitId, LF.ModuleName) LF.DalfPackage)
|
||||
generateStablePackages lfVersion fp = do
|
||||
(diags, pkgs) <- fmap partitionEithers $ do
|
||||
allFiles <- listFilesRecursive fp
|
||||
let dalfs = filter ((== ".dalf") . takeExtension) allFiles
|
||||
-- It is very tempting to just use a listFilesRecursive here.
|
||||
-- However, that has broken CI several times on Windows due to the lack of
|
||||
-- sandboxing which resulted in newly added files being picked up from other PRs.
|
||||
-- Given that this list doesn’t change too often and you will get a compile error
|
||||
-- if you forget to update it, we hardcode it here.
|
||||
let dalfs =
|
||||
map (fp </>) $
|
||||
map ("daml-prim" </>) ["DA-Types.dalf", "GHC-Prim.dalf", "GHC-Tuple.dalf", "GHC-Types.dalf"] <>
|
||||
map ("daml-stdlib" </>) ["DA-Internal-Any.dalf", "DA-Internal-Template.dalf"]
|
||||
forM dalfs $ \dalf -> do
|
||||
let packagePath = takeFileName $ takeDirectory dalf
|
||||
let unitId = stringToUnitId $ if packagePath == "daml-stdlib"
|
||||
|
@ -46,6 +46,7 @@ genrule(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# If you change this you also need to update generateStablePackages in Development.IDE.Core.Rules.Daml
|
||||
filegroup(
|
||||
name = "stable-packages",
|
||||
srcs = [
|
||||
|
Loading…
Reference in New Issue
Block a user