crossReference = (neededIds, policyIds) => {
  // Policy generator skips packages that don't use anything, so it's ok for policy to be missing.
  // This is only for debugging

  /** @type {string[]} */
  const missingIds = []
  neededIds.forEach((id) => {
    if (!policyIds.includes(id)) {
      missingIds.push(id)
    }
  })
  diag.rawDebug(4, { missingIds, policyIds, neededIds })
  if (missingIds.length > 0) {
    diag.rawDebug(
      1,
      `Policy is missing the following resources: ${missingIds.join(', ')}`
    )
  }
}
@param {Set<string>} neededIds
@param {string[]} policyIds