Support nested map messages in valdi_protobuf/web/test/NamespaceGenerator.spec.ts

Đang mở
#217 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start with the skipped xit spec in src/valdi_modules/src/valdi/valdi_protobuf/web/test/NamespaceGenerator.spec.ts, then read the web namespace generator in the sibling web/ directory to see how scalar fields are built. Add map field support, including message values, and run bazel test //src/valdi_modules/src/valdi/valdi_protobuf:valdi_protobuf_web_test. Done when the spec is it and passes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The spec supports nested map messages in monkey patched js namespace in src/valdi_modules/src/valdi/valdi_protobuf/web/test/NamespaceGenerator.spec.ts is skipped with xit and the comment "Does not yet work".

It creates a test.MapMessage through getTypedMessageNamespace with two map fields:

  • stringToDouble (Map<string, number>)
  • stringToMessage (Map<string, message>)

It expects both fields to come back as Map instances, and the nested value to be a ValdiMessage with its fields set. Map fields, and message values inside maps, aren't supported yet in the web namespace generator.

What to do: add map field support (including message values) to the web protobuf namespace generator in src/valdi_modules/src/valdi/valdi_protobuf/web/, then change xit back to it.

How to run

bazel test //src/valdi_modules/src/valdi/valdi_protobuf:valdi_protobuf_web_test

Done when: the spec runs as it and passes.

See CONTRIBUTING.md before opening a pull request.

Ngôn ngữ chính
C++
Star
16.4k
Fork
538
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Snapchat/Valdi

Tất cả issue của Snapchat/Valdi

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.