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

Open
#7,579 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

bug Imported Jira Issue

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
Dominant language
Java
Stars
6.7k
Forks
4k
Avg merge
1d 5h
Merged PRs (30d)
86

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/storm

All issues in apache/storm

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.