apache / apache/storm

[STORM-3797] Cannot generate storm.thrift using Golang generator

Open
#7,579 0 comments 0 reactions 0 assignees View on GitHub
bug Imported Jira Issue
Dominant language
Java
Stars
6.7k
Forks
4k
Avg merge
1d 7h
Merged PRs (30d)
62

Description

Generating Go code from storm.thrift fails with the following message:

[FAILURE:generation:1] Error: Cannot produce a valid type for a Go map key: []int64 - aborting.

 

The offending lines:

https://github.com/apache/storm/blob/b5252eda18e76c4f42af58d7481ea66cf3ec8471/storm-client/src/storm.thrift#L517-L518

 

Golang does not allow slices to be used as a key for a map since they are not comparable using the equality operator. Otherwise the rest of it will generate just fine if those maps are commented out.

 

What is the significance of those maps?

---
Originally reported by waj334, imported from: Cannot generate storm.thrift using Golang generator


  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2025-01-24

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with storm-client/src/storm.thrift at lines 517-518 and reproduce generation with the Go generator. Determine the significance of the maps and how their []int64 keys should be handled for Go, then verify that storm.thrift generates valid Go code without losing the intended map behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.