From d48f510f14e04c51870216a17b821ebb8289d808 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 30 Dec 2019 16:32:05 +0100 Subject: [PATCH] Propagate Checksum and CompressionType when building ArtifactIndex Refers to #33 --- pkg/compiler/artifact.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/compiler/artifact.go b/pkg/compiler/artifact.go index 4c4058bc..f8298863 100644 --- a/pkg/compiler/artifact.go +++ b/pkg/compiler/artifact.go @@ -51,7 +51,15 @@ func (i ArtifactIndex) CleanPath() ArtifactIndex { newIndex := ArtifactIndex{} for _, n := range i { art := n.(*PackageArtifact) - newIndex = append(newIndex, &PackageArtifact{Path: path.Base(n.GetPath()), SourceAssertion: art.SourceAssertion, CompileSpec: art.CompileSpec, Dependencies: art.Dependencies}) + // FIXME: This is a dup and makes difficult to add attributes to artifacts + newIndex = append(newIndex, &PackageArtifact{ + Path: path.Base(n.GetPath()), + SourceAssertion: art.SourceAssertion, + CompileSpec: art.CompileSpec, + Dependencies: art.Dependencies, + CompressionType: art.CompressionType, + Checksums: art.Checksums, + }) } return newIndex //Update if exists, otherwise just create