Skip to content

consider supporting vendored feature to avoid prost dependency during build #579

@nyurik

Description

@nyurik

requiring every dependent project to add sudo apt-get install -y protobuf-compiler to all of their workflows is a bit annoying, especially for the .protoc file that has not changed in many years. Would it be possible to use a vendored .rs file, and to have an extra feature that would force build that file? This way most users by default would use the included generated file, but your CI would trigger an error if you update prost crate which would generate a slightly different auto-genned file, which would make the git status show modified file?

Running something like this after cargo build --feature compile-protoc would trigger an error (I have this code as a recipe in most of my justfiles)

if [ -n "$(git status --untracked-files --porcelain)" ]; then
  >&2 echo "ERROR: git repo is no longer clean. Make sure compilation and tests artifacts are in the .gitignore, and no repo files are modified."
  >&2 echo "######### git status ##########"
  git status
  git --no-pager diff
  exit 1
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions