title: what is the output type in bazel?
body: <p>In Bazel you can define an attribute type, which could be int or string ... or <strong>output</strong></p>
  <p>What does it mean to have a type of attribute as &quot;output&quot; ?</p>
  <p>Here's an example:</p>
  <pre><code>def _something(ctx):
  
      print(&quot;The username is: &quot;, ctx.attr.username)
      print(&quot;boolean value is&quot;, ctx.attr.boolean)
      print(&quot;my age is:&quot;, ctx.attr.age)
      print(&quot;Start printing hours ..&quot; )
      for i in ctx.attr.hours:
          print (i)
      print(&quot;Finish printing hours ..&quot;)
      print(&quot;Depending on: &quot;, ctx.attr.dep_on)
  
  print_me = rule(
      implementation = _something,
      attrs = {
          &quot;username&quot; : attr.string(),
          &quot;boolean&quot; : attr.bool(),
          &quot;age&quot; : attr.int(),
          &quot;hours&quot; : attr.int_list(),
          &quot;dep_on&quot;: attr.label(),
          &quot;the_results&quot;: attr.output(),
      },
  )
  </code></pre>
  <p>It's a simple rule, which has the_results as of type output</p>