Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6028

Treat unresolved type references as errors instead of being a Resource type

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.5.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      Language 2016-03-23, Language 2016-04-06
    • Release Notes:
      New Feature
    • Release Notes Summary:
      Hide
      References to resource types are now validated against existing types. Earlier all non data types were considered to be a Resource type. The introduction of type aliases made it possible to validate all type references. This means that references to undefined types will be caught everywhere during compilation not just when attempting to create a resource of that type or when forming a relationship.
      Show
      References to resource types are now validated against existing types. Earlier all non data types were considered to be a Resource type. The introduction of type aliases made it possible to validate all type references. This means that references to undefined types will be caught everywhere during compilation not just when attempting to create a resource of that type or when forming a relationship.

      Description

      References to resource types are not validated against existing types. Now all non data types are considered to be a Resource type. The introduction of type aliases makes it possible to validate all references to types. By fixing this all references to undefined types will be caught everywhere not just when attempting to create a resource of that type, as is the case today.

      With the addition of type aliases and being able to load types using the 4.x loaders to resolve types it should be relatively easy to add every known resource type as an alias to a Resource. (if we are not already doing that; in which case it is as easy as changing the default of treating 'unknown' as a Resource to as a 'not found'; if so change the # story points).

      ACCEPTANCE CRITERA


      • all references to undefined types raises an error during compilation
      • trivially tested by $a = SantaClause and $b = ToothFairy['molar']

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  henrik.lindberg Henrik Lindberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: