[Feature] Support relative parent paths for module files
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 102
- Forks
- 49
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 16
Description
Description
fga.mod file do not support relative parent paths (e.g. ../model.fga) to module files listed in contents. Files must reside in a child directory of the fga.mod location.
What makes this particularly problematic is that module files must be named fga.mod and cannot have arbitrary names therefore preventing multiple module from being in the same directory.
Benefits
- Enhanced composition flexibility
- Ability to avoid duplication of module definitions
Use Case
As part of a model migration system I aim to support incremental model migrations and need to version models by date while reusing module definitions from previous versions that remain unchanged.
Example
models
├── 20250601
│ ├── core.fga
│ └── fga.mod
├── 20250604
│ ├── wiki.fga
| └── fga.mod
└── 20250605
├── issue-tracker
│ ├── projects.fga
| └── tickets.fga
└── fga.mod
20250605/fga.mod
schema: '1.2'
contents:
- ../20250601/core.fga # Not supported
- ../20250604/wiki.fga # Not supported
- issue-tracker/projects.fga
- issue-tracker/tickets.fga
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 tracing how the CLI reads fga.mod and resolves paths listed under contents. Reproduce the example with parent paths such as ../20250601/core.fga, then inspect the existing handling for child-directory files. Done means valid relative parent paths work without breaking current module loading behavior, with tests covering both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100