Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e28e7fa
chore(deps): bump the dependencies group across 1 directory with 3 up…
dependabot[bot] Jul 31, 2026
db371bf
chore(deps): bump the dependencies group with 3 updates (#658)
dependabot[bot] Aug 6, 2026
7a991c4
chore(deps): bump fast-uri from 3.1.4 to 3.1.5 in /pkg/js (#655)
dependabot[bot] Aug 10, 2026
0d2ad7f
feat: support $expression reserved condition name on type restriction…
yissellokta Aug 18, 2026
1007517
chore(deps): bump docker/setup-buildx-action from 4.2.0 to 4.3.0 in t…
dependabot[bot] Aug 20, 2026
96eccfe
fix(graph): prevent nil-pointer panic and corruption in parseThis (#661)
adriantam Aug 21, 2026
9444831
chore(ci): pin the Go version used by the lint job (#669)
SoulPancake Aug 21, 2026
a03e3ed
chore(deps): bump the dependencies group in /pkg/go with 2 updates (#…
dependabot[bot] Aug 21, 2026
c3c89f7
chore(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 i…
dependabot[bot] Aug 27, 2026
806daba
chore(deps): bump actions/setup-java from 5.7.0 to 6.0.0 in the depen…
dependabot[bot] Aug 27, 2026
0d89fec
Merge remote-tracking branch 'origin/main' into chore/sync-develop-fr…
SoulPancake Aug 31, 2026
e7902b6
fix(pkg/go): exempt $expression from the undefined-condition check
SoulPancake Aug 31, 2026
f0427d2
chore(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /pk…
dependabot[bot] Sep 2, 2026
aa1d651
chore(deps-dev): bump browserslist from 4.28.4 to 4.28.8 in /pkg/js (…
dependabot[bot] Sep 2, 2026
eda77f7
chore(deps): bump fast-uri from 3.1.5 to 3.1.7 in /pkg/js (#677)
dependabot[bot] Sep 3, 2026
cc3a9e0
chore(deps-dev): bump @humanfs/node from 0.16.7 to 0.16.8 in /pkg/js …
dependabot[bot] Sep 3, 2026
afffa2f
chore(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /pk…
dependabot[bot] Sep 9, 2026
31286a8
chore(deps-dev): bump js-yaml from 4.3.1 to 4.3.2 in /pkg/js (#681)
dependabot[bot] Sep 9, 2026
5a5f4d6
Merge remote-tracking branch 'origin/main' into chore/sync-develop-fr…
SoulPancake Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/pkg-go-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ">=1.25.0"
# golangci-lint v1 cannot read export data emitted by Go 1.27 or later,
# so the lint job tracks the newest Go the linter supports rather than
# the newest Go available. Raise this together with the linter version
# in pkg/go/Makefile.
go-version: "1.26"
cache-dependency-path: "./pkg/go/go.sum"
check-latest: true

Expand All @@ -30,7 +34,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Generate Antlr code and validate up to date
run: |
Expand All @@ -43,12 +47,12 @@ jobs:
matrix:
go-version: ["1.25", "1.26"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0

- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pkg-java-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ jobs:
testCheckout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

lint:
name: Lint Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0

- name: Set up JDK
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
java-version: 20
distribution: "temurin"
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Generate Antlr code and validate up to date
run: |
Expand All @@ -59,15 +59,15 @@ jobs:
java: ["11", "17", "20"]

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0

- name: Set up JDK
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
java-version: ${{ matrix.java }}
distribution: "temurin"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pkg-java-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ jobs:
working-directory: "pkg/java"

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
path: "."
sparse-checkout: "pkg/java"
sparse-checkout-cone-mode: false

- name: Set up JDK
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
java-version: 11
distribution: "temurin"

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic # Use the open-source basic cache provider

Expand All @@ -65,24 +65,24 @@ jobs:
working-directory: "pkg/java"

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
path: "."
sparse-checkout: "pkg/java"
sparse-checkout-cone-mode: false

- name: Set up JDK
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
java-version: 11
distribution: "temurin"

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic # Use the open-source basic cache provider

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pkg-js-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Generate Antlr code and validate up to date
run: |
Expand All @@ -45,12 +45,12 @@ jobs:
node-version: [20.x, 22.x, 24.x, 25.x]

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0

- name: Set up node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkg-js-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
working-directory: "pkg/js"

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
path: "."
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}

- name: Checkout (full history + tags)
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }}

- name: Checkout (full history + tags)
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-release-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run parse-release tests
run: bash .github/workflows/scripts/parse-release.test.sh

6 changes: 6 additions & 0 deletions OpenFGALexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ STRING:

BYTES: ('b' | 'B') STRING;

// Reserved condition name for inline expressions on a type restriction
// (e.g. `define viewer: [user with $expression]`). It is intentionally placed
// before IDENTIFIER so the literal wins, and `$` exists nowhere else in the
// lexer, so this cannot collide with any existing token.
DOLLAR_EXPRESSION: '$expression';

IDENTIFIER: (LETTER | '_') (LETTER | DIGIT | '_' | MINUS)*;
// NOTE: MINUS is not allowed in CEL, but allowed in FGA, CEL will be revalidated after

Expand Down
2 changes: 1 addition & 1 deletion OpenFGAParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ relationDefRewrite: rewriteComputedusersetName=extended_identifier (WHITESPACE F

relationDefTypeRestriction: NEWLINE? (
relationDefTypeRestrictionBase
| (relationDefTypeRestrictionBase WHITESPACE KEYWORD_WITH WHITESPACE conditionName)
| (relationDefTypeRestrictionBase WHITESPACE KEYWORD_WITH WHITESPACE (conditionName | DOLLAR_EXPRESSION))
) NEWLINE?;
relationDefTypeRestrictionBase: relationDefTypeRestrictionType=extended_identifier
((COLON relationDefTypeRestrictionWildcard=STAR)
Expand Down
3 changes: 2 additions & 1 deletion pkg/go/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BINARY_NAME=openfga-language
DOCKER_BINARY=docker
GO_BIN ?= $(shell go env GOPATH)/bin
GOLANGCI_LINT_VERSION ?= v1.64.8
.DEFAULT_GOAL := help

help: ## Show this help
Expand All @@ -12,7 +13,7 @@ help: ## Show this help
#-----------------------------------------------------------------------------------------------------------------------
$(GO_BIN)/golangci-lint:
@echo "==> Installing golangci-lint within "${GO_BIN}""
@go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
@go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)

$(GO_BIN)/govulncheck:
@echo "==> Installing govulncheck within "${GO_BIN}""
Expand Down
5 changes: 4 additions & 1 deletion pkg/go/gen/OpenFGALexer.interp

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions pkg/go/gen/OpenFGALexer.tokens

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading