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

primops: add builtins.convertHash #7708

Merged
merged 8 commits into from
Oct 19, 2023

Commits on Oct 18, 2023

  1. Simplify parseHashTypeOpt

    Remove redundant "else" after "return".
    
    Use std::nullopt to increase readability.
    ShamrockLee committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    e9ddf0b View commit details
    Browse the repository at this point in the history
  2. Elaborate the "unknown hash algorithm" error

    List the allowed hash formats
    ShamrockLee committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    aff177d View commit details
    Browse the repository at this point in the history
  3. treewide: Rename hashBase to hashFormat

    hashBase is ambiguous, since it's not about the digital bases, but about
    the format of hashes. Base16, Base32 and Base64 are all character maps
    for binary encoding.
    
    Rename the enum Base to HashFormat.
    
    Rename variables of type HashFormat from [hash]Base to hashFormat,
    including CmdHashBase::hashFormat and CmdToBase::hashFormat.
    ShamrockLee committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    838c70f View commit details
    Browse the repository at this point in the history
  4. Document HashFormat

    ShamrockLee committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    5043e6c View commit details
    Browse the repository at this point in the history
  5. treewide: Reference HashFormat members with scope

    Base* -> HashFormat::Base*
    ShamrockLee committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    e026f3e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    231b0fc View commit details
    Browse the repository at this point in the history
  7. Add helper function parseHashFormat[Opt] printHashFormat

    Add hash format analogy of
    parseHashTypeOpt, parseHashType, and printHashType.
    
    Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
    ShamrockLee and fricklerhandwerk committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    6b47635 View commit details
    Browse the repository at this point in the history
  8. primops: add builtins.convertHash

    Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
    ShamrockLee and fricklerhandwerk committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    5088e65 View commit details
    Browse the repository at this point in the history