@@ -159,6 +159,7 @@ type packageFileHashes map[packageFileHashKey]string
159
159
// in the task graph. Must be called before calculating task hashes.
160
160
func (th * Tracker ) CalculateFileHashes (allTasks []dag.Vertex , workerCount int , repoRoot turbopath.AbsolutePath ) error {
161
161
fmt .Printf ("CalculateFileHashes()\n " )
162
+
162
163
hashTasks := make (util.Set )
163
164
164
165
for i , v := range allTasks {
@@ -172,7 +173,6 @@ func (th *Tracker) CalculateFileHashes(allTasks []dag.Vertex, workerCount int, r
172
173
}
173
174
pkgName , _ := util .GetPackageTaskFromId (taskID )
174
175
if pkgName == th .rootNode {
175
- fmt .Printf ("\t Continue\n " )
176
176
continue
177
177
}
178
178
@@ -181,19 +181,18 @@ func (th *Tracker) CalculateFileHashes(allTasks []dag.Vertex, workerCount int, r
181
181
return fmt .Errorf ("missing pipeline entry %v" , taskID )
182
182
}
183
183
184
- taskDefinition .Inputs = append (taskDefinition .Inputs , "./package.json" )
184
+ // taskDefinition.Inputs = append(taskDefinition.Inputs, "./package.json")
185
185
186
186
pfs := & packageFileSpec {
187
187
pkg : pkgName ,
188
188
inputs : taskDefinition .Inputs ,
189
189
}
190
190
191
- fmt .Printf ("\t taskDefinition.Inputs: %v\n " , taskDefinition .Inputs )
192
- fmt .Printf ("\t pfs.inputs: %v\n " , pfs .inputs )
193
-
194
191
hashTasks .Add (pfs )
195
192
}
196
193
194
+ fmt .Printf ("\t hashTasks\n \t \t %#v\n " , hashTasks )
195
+
197
196
hashes := make (map [packageFileHashKey ]string )
198
197
hashQueue := make (chan * packageFileSpec , workerCount )
199
198
hashErrs := & errgroup.Group {}
@@ -211,14 +210,14 @@ func (th *Tracker) CalculateFileHashes(allTasks []dag.Vertex, workerCount int, r
211
210
}
212
211
th .mu .Lock ()
213
212
pfsKey := packageFileSpec .ToKey ()
214
- fmt .Printf ("\t adding to hashes\n " )
215
- fmt .Printf ("\t \t \" %v\" : %v\n " , pfsKey , hash )
213
+ fmt .Printf ("\t adding key \" %#v\" with value \" %#v\" \n " , pfsKey , hash )
216
214
hashes [pfsKey ] = hash
217
215
th .mu .Unlock ()
218
216
}
219
217
return nil
220
218
})
221
219
}
220
+
222
221
for ht := range hashTasks {
223
222
hashQueue <- ht .(* packageFileSpec )
224
223
}
@@ -229,7 +228,7 @@ func (th *Tracker) CalculateFileHashes(allTasks []dag.Vertex, workerCount int, r
229
228
}
230
229
th .packageInputsHashes = hashes
231
230
232
- fmt .Printf ("\t th.packageInputsHashes: % v\n " , th . packageInputsHashes )
231
+ fmt .Printf ("\t tracker: \n \t \t %# v\n " , th )
233
232
return nil
234
233
}
235
234
0 commit comments