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

Feature/registry alias #273

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

Conversation

dgehriger
Copy link

This PR introduces these features:

This release introduces several key updates and new features:


New Command-Line Options

  • -k / --insecure: Skip SSL validation during operations. Useful for environments with self-signed certificates or testing scenarios.

Enhancements to buffrs install Subcommand

  • --buf-yaml Flag:
    Adding this flag during buffrs install (e.g., buffrs install --buf-yaml) generates a buf.yaml file matching installed dependencies during dependency resolution.
    • This enables seamless use of buf for linting and generating proxies/stubs from proto files.
  • --only-dependencies Flag:
    Only installs vendor dependencies.

Default Arguments in Configuration

  • Specify Defaults via .buffrs/config.toml:
    Users can now define default arguments for commands. For example, to always generate buf.yaml files during buffrs install:
[registry]
default = "globus"

[registries]
globus = "https://conan-us.globusmedical.com/artifactory"

[commands.install]
default_args = ["--buf-yaml"]

Support for Registry Aliases

  • Aliases in Proto.toml:
    The registry field in Proto.toml now supports aliases. For instance:
edition = "0.9"

[package]
type = "api"
name = "grpc-test"
version = "0.1.0"

[dependencies.api-examples-hub]
version = "=0.2.0"
repository = "grpc"
registry = "acme" # Alias for "https://conan-us.acme.com/artifactory"

Normalized Proto.toml for Compatibility

  • Registry Aliases in Packaging and Publishing:
    Buffrs resolves registry aliases when packing or publishing to an upstream repository. To ensure compatibility, the original Proto.toml is preserved as Proto.toml.orig, while the normalized version is used during operations.
    This mirrors Cargo's behavior, providing a seamless user experience.
Example: Alias Normalization

Original Proto.toml:

edition = "0.9"

[package]
type = "api"
name = "api-examples-test"
version = "0.3.0"

[dependencies.lib-geom]
version = "=0.1.0"
repository = "grpc"
registry = "acme"

Generated Proto.toml:

# THIS FILE IS AUTOMATICALLY GENERATED BY BUFFRS
#
# Buffrs normalizes Proto.toml files for compatibility with all versions.
# It rewrites `path` dependencies to registry dependencies.
#
# For the original contents, refer to Proto.toml.orig.

edition = "0.9"

[package]
type = "api"
name = "api-examples-test"
version = "0.3.0"

[dependencies.lib-geom]
version = "=0.1.0"
repository = "grpc"
registry = "https://conan-us.acme.com/artifactory"

dgehriger and others added 30 commits June 25, 2024 21:43
Add .buffrs/config.toml registries and hierarchical packages
Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.7 to 0.10.10.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](GitoxideLabs/gitoxide@gix-path-v0.10.7...gix-path-v0.10.10)

---
updated-dependencies:
- dependency-name: gix-path
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	src/main.rs
#	src/manifest.rs
#	src/registry/mod.rs
#	tests/cmd/publish/in
#	tests/cmd/publish/out
Prepare for upstream

Prepare for upstream

Prepare for upstream

Move config file to .config/buffrs.toml

Reformat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant