Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Usage of default values in protobuf

未关闭
#46 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
停滞
领域
documentation

调研方向

首先定位 issue 中提到的 version 和 extent 字段的 .proto 定义,然后检查它们的默认值在矢量瓦片规范中是如何表示的。当从 .proto 中移除不符合规范的默认值,并在矢量瓦片规范中定义所需的 version 和 extent 默认值后,工作即告完成。

由索引模型根据 Issue 内容生成。

描述

3.0 Specification

The google protobuf v3 spec doesn't allow you to define default values any more. In v3 defaults are what you would expect: 0 for integers, empty strings for strings, whatever has value 0 in enums.
(For details see https://developers.google.com/protocol-buffers/docs/proto3 and https://github.com/google/protobuf/blob/master/CHANGES.txt#L309).

We are using protobuf v2 currently, but to keep our options open for later switching to protobuf v3 I suggest we get rid of default values that don't correspond to the default values in the protobuf spec in the .proto and move any defaults we need into the vector tile spec.

Specifically this is the version field which has a default of 1 and the extent field which has a default of 4096.

主要语言
没有语言数据
星标
1k
派生
213
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mapbox/vector-tile-spec 的其他 Issue

查看 mapbox/vector-tile-spec 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。