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

Add initial version of redis-codegen #1

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Commits on Jun 11, 2022

  1. Add initial version of redis-codegen

    redis-codegen generates medium level API interfaces based on the redis
    command documention provided as commands.json from the redis-doc
    repository.
    
    Currently the generated commands still use the implement_commands macro
    and are included using the include macro.
    
    There are some breaking changes trough this. All shorthand medium level
    commands from the old definition needs to be moved out and
    reimplemented. Probably named as high level api.
    valkum committed Jun 11, 2022
    Configuration menu
    Copy the full SHA
    635f476 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. Add support for multiple tag through slices

    This also adds _single fn variants that do not take a slice, as a
    shorthand.
    valkum committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    1693f92 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Remove the usage of the implement_commands!() macro

    redis-code now generate a single module per type of implementation.
    The traits Commands and AsyncCommands are implemented in the commands
    and async_commands module.
    Cmd gets a additional implementation in the command module.
    The same holds for pipeline and cluster_pipeline.
    
    Token enum generation is WIP.
    valkum committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    c2fda18 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Improve handling of block arguments

    We generate a tuple based interface for block arguments now. This is
    over specific, but should provide a stricter API.
    valkum committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    afde254 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. Configuration menu
    Copy the full SHA
    b1b1fbd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2da46c3 View commit details
    Browse the repository at this point in the history
  3. Update generated files

    valkum committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    944fba6 View commit details
    Browse the repository at this point in the history
  4. Remove some of the warning in generated files.

    Add allow deprecated to commands.rs
    Add docs to tokens.rs
    valkum committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    fc18c4d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e0cab8b View commit details
    Browse the repository at this point in the history
  6. Add sync_commands_json test

    This test is ignored by default similar to the sync_schemas command of
    opentelemetry-rust. This test can be used to update the commands.json
    valkum committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    a88af98 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    15807e1 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. Rename token generator to type generator

    This also fixes some logical flaws with the previous implementation.
    Previously when two types hat the same token name or in the worst case
    the same argument name, an identical type was created.
    
    This adds a TypeRegistry which creates a submodule when such an
    duplicate type is encountered. It also helps to resolve types when
    generating code.
    This solution is pretty regarding the names of modules, but at least
    this works for now.
    valkum committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    c41ff7f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3206673 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2022

  1. Add first version of commands.json build script

    Redis Maintainers asked to use the output of a working redis instance to
    generate the commands.json ourselves.
    This adds a built_commands_json module which is a more typesafe copy of
    the python script redis uses to generate the commands.json in the docs
    repo.
    valkum committed Jul 24, 2022
    Configuration menu
    Copy the full SHA
    5ea39e4 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2022

  1. Add initial overwrite support

    This adds support to automatically generate cursor based commands using
    an iterator result.
    This currently is not finished, as the command json generator is missing
    support for optional and multiple arguments.
    valkum committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    a266465 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2022

  1. Configuration menu
    Copy the full SHA
    48bd85e View commit details
    Browse the repository at this point in the history
  2. Finish commands.json generation and update generated code

    The commands.json generation based on the redis-cli output now correctly
    computes subcommands.
    valkum committed Sep 5, 2022
    Configuration menu
    Copy the full SHA
    d7fa5bf View commit details
    Browse the repository at this point in the history