Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tftypes: Enhance Type Comparisons Functionality #94

Merged
merged 18 commits into from
Aug 10, 2021
Merged

Commits on Aug 5, 2021

  1. Start refactoring type comparisons.

    Update our Type interface to include UsableAs and Equal explicitly.
    
    Add placeholders for UsableAs and Equal on all types, so tests can run.
    
    Update String, Number, Bool, and DynamicPseudoType to have UsableAs
    implementations, and tests for those implementations. DynamicPseudoType
    will panic when UsableAs is called on it, because DynamicPseudoType is a
    type constraint, it should never be associated with a Value.
    
    This work will allow us to resolve #83.
    paddycarver committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    18e2a0e View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2021

  1. Configuration menu
    Copy the full SHA
    ad050d9 View commit details
    Browse the repository at this point in the history
  2. tftypes: Refactor List, Map, Object, primitive, Set, and Tuple equals…

    …() into Equal() and Is()
    
    The interface now accounts for the differing semantics of Equal() and Is(), which means the dual purpose equals() method is extraneous.
    bflad committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    bddb622 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    86d9cd4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c1b23b4 View commit details
    Browse the repository at this point in the history
  5. tftypes: Ensure (primitive).Is() does full equality checking

    Prevent issues with DynamicPsuedoType handling.
    bflad committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    ddb92f7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    73aa5a9 View commit details
    Browse the repository at this point in the history
  7. tftypes: Use (Type).Equal() instead of Is() in (Value).Equal()

    More accurate behavior after Is() refactoring and prevents panics.
    bflad committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    840d09b View commit details
    Browse the repository at this point in the history
  8. tftypes: Remove special casing for zero length Tuple ElementTypes and…

    … Object AttributeTypes
    bflad committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    2539862 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    41d4335 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2021

  1. tftypes: Use previous error messaging including English can't contr…

    …actions so testing does not require adjustment
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    5570b22 View commit details
    Browse the repository at this point in the history
  2. tftypes: Remove panic in (primitive).UsableAs() for DynamicPseudoType

    Leave descriptive comment for future travelers.
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    d1e9933 View commit details
    Browse the repository at this point in the history
  3. tftypes: Additional type constraint adjustments for split out Equal()…

    … and UsableAs() functionality
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    a531129 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    54b4d7a View commit details
    Browse the repository at this point in the history
  5. .changelog: Remove breaking change about Type interface methods as it…

    … cannot be implemented outside the tftypes package
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    1f71fc6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c2b390a View commit details
    Browse the repository at this point in the history
  7. tftypes: Allow unknown DynamicPseudoType, but ensure NewValue() only …

    …accepts matching Type and Value
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    d87b2cd View commit details
    Browse the repository at this point in the history
  8. tftypes: Fixed elements of Tuple and Map and attributes of `Objec…

    …t` having `DynamicPseudoType` as their type when unmarshaling JSON values from Terraform.
    bflad committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    7943864 View commit details
    Browse the repository at this point in the history