Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4ea5786
[ts-frontend] M1: scaffold, EtsIR DTO mirrors, serializer, invariant …
CaelmBleidd Jul 2, 2026
6beec1a
[ts-frontend] M2: TypeScript type -> TypeDto conversion
CaelmBleidd Jul 2, 2026
f3c8fd6
[ts-frontend] M3: straight-line lowering to three-address code
CaelmBleidd Jul 2, 2026
b6d05d7
[ts-frontend] M4: control-flow lowering (CFG)
CaelmBleidd Jul 2, 2026
a251ff6
[ts-frontend] M5: classes, interfaces, enums, namespaces
CaelmBleidd Jul 2, 2026
f82c1f5
[ts-frontend] M6: try/catch/finally and import/export infos
CaelmBleidd Jul 2, 2026
162fe37
[ts-frontend] M7: closures, object literals, destructuring, optional …
CaelmBleidd Jul 2, 2026
77d61fd
[ts-frontend] M8: provider selection, project/multi CLI modes, Gradle…
CaelmBleidd Jul 2, 2026
deb6c07
[ts-frontend] M9: CI integration and documentation
CaelmBleidd Jul 2, 2026
14f7665
[ts-frontend] Expand README with full usage documentation
CaelmBleidd Jul 2, 2026
b356509
[ts-frontend] Fix ci-ets: unbreak ArkAnalyzer setup and make it best-…
CaelmBleidd Jul 3, 2026
ab85ff1
[ts-frontend] Fix ArkAnalyzer setup: pin @types/node via the manifest
CaelmBleidd Jul 3, 2026
cbc8e5e
[ts-frontend] Review fixes: PtrCallExpr.ptr validation, inc/dec seman…
CaelmBleidd Jul 3, 2026
6758a43
[ts-frontend] Hoist raw fallback values into temps
CaelmBleidd Jul 3, 2026
9b6ca2a
[ts-frontend] Duplicate finally blocks on abrupt exits
CaelmBleidd Jul 3, 2026
525637f
[ts-frontend] Review fixes: cast-stripped LHS in raw-value check, ci.…
CaelmBleidd Jul 3, 2026
ba04250
[ts-frontend] Preserve source origins in EtsIR
CaelmBleidd Jul 17, 2026
ed94d48
[ts-frontend] Preserve array element types in lowering
CaelmBleidd Jul 18, 2026
cb4eb99
[ts-frontend] Preserve expression and scope semantics
CaelmBleidd Jul 19, 2026
a42c8a4
[ts-frontend] Model closures and derived constructors
CaelmBleidd Jul 19, 2026
8df790e
[ts-frontend] Bundle runtime and honor project config
CaelmBleidd Jul 19, 2026
368bf8a
[ts-frontend] Preserve inferred collection structure
CaelmBleidd Jul 19, 2026
00209b1
[ts-frontend] Finalize production frontend semantics
CaelmBleidd Jul 22, 2026
6ea830c
[ts-frontend] Fix reviewed lowering semantics
CaelmBleidd Jul 22, 2026
26eb87f
Fix review findings in the native TypeScript frontend
CaelmBleidd Aug 2, 2026
28236fb
Fix JDK 8 build failure: avoid Java 9+ Redirect.DISCARD
CaelmBleidd Aug 2, 2026
5c6cd65
Fix TypeScript evaluation order lowering
CaelmBleidd Aug 10, 2026
76637b3
Fix TypeScript lowering side effects and optional chains
CaelmBleidd Aug 10, 2026
f92e030
Fix optional call chain lowering
CaelmBleidd Aug 10, 2026
6095b6d
Preserve receivers in optional method chains
CaelmBleidd Aug 10, 2026
d9c454f
Fix mixed optional method chain lowering
CaelmBleidd Aug 10, 2026
498671a
Fix TypeScript binding and constructor lowering
CaelmBleidd Aug 10, 2026
dc5a9c0
Fix direct super constructor initialization
CaelmBleidd Aug 10, 2026
5bafa59
Instantiate generic aliases in EtsIR types
CaelmBleidd Aug 10, 2026
4963277
Clear omitted generic alias substitutions
CaelmBleidd Aug 10, 2026
736a5c7
Harden ETS provider and process timeout handling
CaelmBleidd Aug 10, 2026
c45e843
Exercise inherited stdin on process timeout
CaelmBleidd Aug 10, 2026
ede5838
Harden ETS provider and process timeout handling
CaelmBleidd Aug 10, 2026
7f28995
Bound process pipe closure after timeout
CaelmBleidd Aug 10, 2026
7bf6daf
Keep timeout termination itself bounded
CaelmBleidd Aug 10, 2026
4870780
Require timeout to reap the direct process
CaelmBleidd Aug 10, 2026
47fc657
Reap timed-out processes with redirected streams
CaelmBleidd Aug 10, 2026
f843da0
Clean redirected process files eagerly
CaelmBleidd Aug 10, 2026
7c998cd
Specify safe ProcessUtil input and output behavior
CaelmBleidd Aug 10, 2026
ab374ef
Poll bounded process output without temp files
CaelmBleidd Aug 10, 2026
d07b887
Exercise continuous output and interrupted termination
CaelmBleidd Aug 11, 2026
0bb2134
Keep continuous process output available during timeout
CaelmBleidd Aug 11, 2026
5170781
Start continuous output before the timeout deadline
CaelmBleidd Aug 11, 2026
c924ff2
Assert continuous output timeout precisely
CaelmBleidd Aug 11, 2026
3b3af69
Bound process drain passes and preserve ownership
CaelmBleidd Aug 11, 2026
d5f4bc6
Strengthen continuous output timing margin
CaelmBleidd Aug 11, 2026
7215406
Test bounded output passes deterministically
CaelmBleidd Aug 11, 2026
c16c675
Require bundled TypeScript runtime in ETS artifacts
CaelmBleidd Aug 11, 2026
73490b9
Preserve process ownership on interruption
CaelmBleidd Aug 11, 2026
0091819
Preserve remaining TypeScript evaluation order
CaelmBleidd Aug 11, 2026
33815d6
Share transitive closure capture cells
CaelmBleidd Aug 11, 2026
42c18a6
Update audited TypeScript test dependencies
CaelmBleidd Aug 11, 2026
ea98bf7
Sync ArkAnalyzer documentation with CI
CaelmBleidd Aug 11, 2026
190f3bf
Fix TypeScript truthiness condition lowering
CaelmBleidd Aug 20, 2026
1aeb77f
Scope statement source origins explicitly
CaelmBleidd Aug 20, 2026
c8d0c50
Model frontend assignment LValues explicitly
CaelmBleidd Aug 20, 2026
049e9b0
Restore assignment LValue validation
CaelmBleidd Aug 20, 2026
1b15c43
Handle non-finite TypeScript numbers
CaelmBleidd Aug 20, 2026
40bce8c
Fix project declaration shadowing for non-finite globals
CaelmBleidd Aug 20, 2026
6243b12
Flatten nested ETS array types recursively
CaelmBleidd Aug 20, 2026
4e362b3
Extract decorator names without truncation
CaelmBleidd Aug 20, 2026
bde5894
Clarify CFG unterminated block state
CaelmBleidd Aug 20, 2026
d60823c
Use named class category constants
CaelmBleidd Aug 20, 2026
a0beb65
Isolate bundled frontend runtime extraction
CaelmBleidd Aug 20, 2026
5b6e204
Memoize bundled frontend initialization failure
CaelmBleidd Aug 20, 2026
2634d07
Simplify ETS provider selection
CaelmBleidd Aug 20, 2026
6050425
Simplify external process execution
CaelmBleidd Aug 20, 2026
c6bc0bb
Use CommonJS for TypeScript lib copying
CaelmBleidd Aug 20, 2026
0df94fa
Rewrite native frontend documentation
CaelmBleidd Aug 20, 2026
f6c87a9
Remove accidentally tracked review artifact
CaelmBleidd Aug 20, 2026
fd8a09f
Address final review findings
CaelmBleidd Aug 20, 2026
7cd865b
Make interruption test handshake deterministic
CaelmBleidd Aug 20, 2026
6f20df4
Address follow-up ETS review findings
CaelmBleidd Aug 20, 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
57 changes: 45 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
# Only write to the cache for builds on the specific branches. (Default is 'main' only.)
# Builds on other branches will only read existing entries from the cache.
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'ref/heads/neo' }}
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/neo' }}
Comment thread
CaelmBleidd marked this conversation as resolved.

- name: Build and run tests
run: ./gradlew --scan build -x :jacodb-ets:build
Expand Down Expand Up @@ -108,31 +108,57 @@ jobs:
with:
# Only write to the cache for builds on the specific branches. (Default is 'main' only.)
# Builds on other branches will only read existing entries from the cache.
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'ref/heads/neo' }}
cache-read-only: ${{ github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/neo' }}

- name: Set up ArkAnalyzer
- name: Set up Node.js
uses: actions/setup-node@v4
with:
# Single source of truth, shared with the publish workflows.
node-version-file: jacodb-ets/ts-frontend/.nvmrc
cache: npm
cache-dependency-path: jacodb-ets/ts-frontend/package-lock.json

- name: Build and test ts-frontend
working-directory: jacodb-ets/ts-frontend
run: |
npm ci
npm run build
npm test

# The legacy ArkAnalyzer provider stays supported (selectable via
# ETS_IR_PROVIDER=arkanalyzer); setting ARKANALYZER_DIR here enables
# the provider-parity test in EtsTsFrontendTest.
#
# This step is BLOCKING on purpose: with `continue-on-error` a failure here
# left ARKANALYZER_DIR unset and the parity test silently skipped itself
# (assumeTrue), so ts-frontend/ArkAnalyzer regressions went unnoticed.
- name: Set up ArkAnalyzer (legacy provider)
run: |
REPO_URL="https://gitcode.com/Lipen/arkanalyzer"
DEST_DIR="arkanalyzer"
MAX_RETRIES=10
RETRY_DELAY=3 # Delay between retries in seconds
BRANCH="neo/2025-09-03"
# Pinned commit of branch neo/2025-09-03: a third-party repository must not be
# able to change the code executed on the runner under our feet.
COMMIT="d9d7d5ffddb1f4081f90a73836c865794ec6a88c"

mkdir -p "$DEST_DIR"
cd "$DEST_DIR"
git init -q
git remote add origin "$REPO_URL"

for ((i=1; i<=MAX_RETRIES; i++)); do
git clone --depth=1 --branch $BRANCH $REPO_URL $DEST_DIR && break
echo "Clone failed, retrying in $RETRY_DELAY seconds..."
git fetch --depth=1 origin "$COMMIT" && break
echo "Fetch failed, retrying in $RETRY_DELAY seconds..."
sleep "$RETRY_DELAY"
done

if [[ $i -gt $MAX_RETRIES ]]; then
echo "Failed to clone the repository after $MAX_RETRIES attempts."
echo "Failed to fetch the repository after $MAX_RETRIES attempts."
exit 1
else
echo "Repository cloned successfully."
fi

echo "ARKANALYZER_DIR=$(realpath $DEST_DIR)" >> $GITHUB_ENV
cd $DEST_DIR
git checkout -q FETCH_HEAD
echo "Repository checked out at $COMMIT."

# ArkAnalyzer's bundled TypeScript (ohos-typescript 4.9.5) cannot parse
# the d.ts files of the latest floating @types/node (e.g. ffi.d.ts uses
Expand All @@ -141,10 +167,17 @@ jobs:
# NB: do not run a second `npm install <pkg>` afterwards — it re-resolves
# the tree and prunes ohos-typescript, which the postinstall script adds
# with --no-save (i.e. it is absent from package.json).
#
# `--ignore-scripts` is NOT usable here for exactly that reason: ohos-typescript
# is installed by the postinstall hook and the build fails without it. The
# exposure is bounded by the pinned commit fetched above.
npm pkg set 'devDependencies.@types/node=18'
npm install
npm run build

# Export only after a successful build so a broken checkout is never used.
echo "ARKANALYZER_DIR=$(realpath .)" >> $GITHUB_ENV

- name: Run ETS tests
run: ./gradlew --scan :jacodb-ets:generateTestResources :jacodb-ets:test

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
# `publish` builds the bundled ts-frontend runtime via npm, so the Node
# version baked into the published artifact must be pinned explicitly.
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: jacodb-ets/ts-frontend/.nvmrc
cache: npm
cache-dependency-path: jacodb-ets/ts-frontend/package-lock.json
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

# `publish` builds the bundled ts-frontend runtime via npm, so the Node
# version baked into the published artifact must be pinned explicitly.
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: jacodb-ets/ts-frontend/.nvmrc
cache: npm
cache-dependency-path: jacodb-ets/ts-frontend/package-lock.json

- name: Generate snapshot version
id: version
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
# `publish` builds the bundled ts-frontend runtime via npm, so the Node
# version baked into the published artifact must be pinned explicitly.
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: jacodb-ets/ts-frontend/.nvmrc
cache: npm
cache-dependency-path: jacodb-ets/ts-frontend/package-lock.json
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build/
idea-community
*.db
/generated/
.tasks/
9 changes: 8 additions & 1 deletion jacodb-ets/ARKANALYZER.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ArkAnalyzer

> **Note:** ArkAnalyzer is now the LEGACY EtsIR provider. The default provider
> is the native TypeScript frontend in [`ts-frontend`](ts-frontend/README.md),
> which requires no external checkout. ArkAnalyzer remains fully supported:
> select it with `ETS_IR_PROVIDER=arkanalyzer` (plus `ARKANALYZER_DIR`) or by
> passing `EtsIrProvider.ARKANALYZER` to the `loadEts*AutoConvert` functions.

## Installation

Clone and install the ArkAnalyzer via NPM:
Expand All @@ -19,7 +25,8 @@ The `npm run build` command will generate the `out` directory, which contains th
Most probably, you will have to use our fork of ArkAnalyzer (https://gitcode.com/Lipen/arkanalyzer) and checkout a specific branch that is consistent with the current state of jacodb.
For this, replace the repo url in the commands above and use `git switch <branch>` to checkout the desired branch.

> Latest supported AA branch is `neo/2025-02-24`.
The ArkAnalyzer version exercised by CI is branch `neo/2025-09-03`, pinned to
commit `d9d7d5ffddb1f4081f90a73836c865794ec6a88c` for reproducible builds.

## Serialize TS to JSON

Expand Down
Loading
Loading