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

function/stdlib: ZipmapFunc precise mark handling #96

Merged
merged 3 commits into from
Apr 19, 2021

Commits on Apr 19, 2021

  1. Configuration menu
    Copy the full SHA
    c2cbe7d View commit details
    Browse the repository at this point in the history
  2. cty: .Mark on an already-marked value shouldn't create nested marks

    Previously we were correctly pulling all of the inner marks up to the top
    level but _not_ discarding the existing "marker", and so we ended up with
    a marker with another marker nested inside it.
    
    That's confusing and violates assumptions elsewhere, so now we'll also
    discard the existing marker and retain only what it was wrapping, so that
    there can only ever be one level of marker wrapper.
    apparentlymart committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    9df2e4f View commit details
    Browse the repository at this point in the history
  3. function/stdlib: ZipmapFunc precise mark handling

    ZipmapFunc can now handle marks on an element-by-element basis, to the
    extent that the cty type system is able to do so.
    
    Since map keys can't be individually sensitive, any sensitive values in
    the keys list will aggregate on the map as a whole, but the individual
    value elements will have their marks preserved individually.
    
    We previously didn't have unit tests for ZipmapFunc so this also includes
    some additional tests not related to marks, in order to cover the other
    interesting cases this function must handle.
    apparentlymart committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    92c56f0 View commit details
    Browse the repository at this point in the history