Better support for modules in java
- Dominant language
- Go
- Stars
- 35
- Forks
- 17
- Avg merge
- 48m
- Merged PRs (30d)
- 10
Description
The Java implementation does not yet support some module specific logic, such as converting a set of module files to a full model and back.
For reference, the main code that handles modules are:
- Go:
- JS:
- https://github.com/openfga/language/blob/main/pkg/js/util/model_utils.ts#L10-L23 (given a model with modules, give me the list of modules)
- Tests for it: https://github.com/openfga/language/blob/main/pkg/js/util/model_utils.test.ts#L6-L69
- https://github.com/openfga/language/tree/main/pkg/js/transformer/modules
- test runners: https://github.com/openfga/language/tree/main/pkg/js/tests/modules
The tests are shared across all packages, and only the test runner needs to be implemented. Test data specific to modules
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the referenced Go and JavaScript module transformers and their test runners, then inspect the shared cases in tests/data/fga-mod-transformer-cases.yaml and tests/data/transformer-module. The work is complete when the Java implementation converts module files to a full model and back, and the module cases pass through its test runner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100