class Syskit::MissingDeployments
Exception raised at the end of resolve if some tasks do not have a deployed equivalent
Attributes
tasks[R]
The tasks that are not deployed, as a hash from the actual task to a set of [role_set, parent_task] pairs
This is computed in initialize as the dependency structure will probably change afterwards
Public Class Methods
new(tasks_with_candidates)
click to toggle source
Initializes this exception by providing a mapping from tasks that have no deployments to the deployment candidates
Public Instance Methods
pretty_print(pp)
click to toggle source
# File lib/syskit/exceptions.rb, line 509 def pretty_print(pp) pp.text "cannot deploy the following tasks" tasks.each do |task, (parents, possible_deployments)| pp.breakable pp.text "#{task} (#{task.orogen_model.name})" pp.nest(2) do pp.breakable pp.seplist(parents) do |parent_task| role, parent_task = parent_task pp.text "child #{role} of #{parent_task}" end end end tasks.each do |task, (parents, possible_deployments, deployment_hints)| has_free_deployment = possible_deployments.any? { |_, _, _, existing| existing.empty? } pp.breakable if has_free_deployment pp.text "#{task}: multiple possible deployments, choose one with #prefer_deployed_tasks(deployed_task_name)" if !deployment_hints.empty? deployment_hints.each do |hint| pp.text " current hints: #{deployment_hints.map(&:to_s).join(", ")}" end end elsif possible_deployments.empty? pp.text "#{task}: no deployments available" else pp.text "#{task}: some deployments exist, but they are already used in this network" end pp.nest(2) do possible_deployments.each do |process_server_name, deployment, task_name, existing| pp.breakable pp.text "task #{task_name} from deployment #{deployment.orogen_model.name} defined in #{deployment.orogen_model.project.name} on #{process_server_name}" pp.nest(2) do existing.each do |task, parents| pp.breakable msg = parents.map do |parent_task| role, parent_task = *parent_task "child #{role} of #{parent_task}" end pp.text "already used by #{task}: #{msg.join(", ")}" end end end end end end