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

crit: fix proto imports for library #109

Merged
merged 4 commits into from
May 20, 2023

Commits on May 13, 2023

  1. chore: move magic-gen to subdirectory

    Since the proto-gen script will also be placed in the scripts directory,
    it is ideal to have each script in its own subdirectory along with the
    associated tests and Makefile.
    
    Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
    snprajwal committed May 13, 2023
    Configuration menu
    Copy the full SHA
    e65209f View commit details
    Browse the repository at this point in the history
  2. crit(proto-gen): move to Python script

    Previously, CRIT was using an overengineered Makefile stunt to generate
    protobuf bindings for the CLI. The problem of statically linking all the
    bindings while using the library as a dependency cannot be resolved in a
    reasonable manner in the Makefile. The logic has been moved out into a
    Python script.
    
    Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
    snprajwal committed May 13, 2023
    Configuration menu
    Copy the full SHA
    61f8266 View commit details
    Browse the repository at this point in the history
  3. refactor(crit): move pb.go files to separate dirs

    Using the new Python script, the protobuf bindings are now generated in
    independent packages. This commit refactors CRIT to work with the new
    organisation of files. It does not change the implementation of CRIT
    in any way apart from resolving the imports correctly.
    
    Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
    snprajwal committed May 13, 2023
    Configuration menu
    Copy the full SHA
    854004d View commit details
    Browse the repository at this point in the history
  4. refactor(crit): pass proto struct as argument

    The proto struct required for encoding or decoding the images was
    previously being inferred from the `images.ProtoHandler()` function.
    Now, it is inferred using that only in the CLI, and is passed to the
    actual CRIT functions as a parameter. This eliminates the redundant
    protobuf bindings being imported when using CRIT as a library.
    
    Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
    snprajwal committed May 13, 2023
    Configuration menu
    Copy the full SHA
    e69417e View commit details
    Browse the repository at this point in the history