Skip to content

Conversation

@github-actions
Copy link

This PR bumps the Cargo.toml and deno.json version to 0.0.8

@jonasstrehle jonasstrehle added this to the Release 0.0.8 milestone Oct 15, 2025
@jonasstrehle jonasstrehle marked this pull request as draft October 15, 2025 17:09
@jonasstrehle jonasstrehle marked this pull request as ready for review November 5, 2025 22:34
Copilot AI review requested due to automatic review settings November 5, 2025 22:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the "Final" mutability option from the DIF (Datex Interface Format) reference system and consolidates it with "Immutable" mutability. The change simplifies the mutability model by eliminating a redundant concept where "Final" and "Immutable" served the same purpose.

  • Removed DIFReferenceMutability.Final enum value from the type definitions
  • Updated all references from Final to Immutable across codebase
  • Updated version to 0.0.8 and upgraded datex-core dependency to 0.0.7

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/dif/definitions.ts Removed the Final: 2 entry from DIFReferenceMutability enum
src/dif/display.ts Removed display logic for "Final" mutability (&final prefix)
src/dif/dif-handler.ts Updated comment from "final" to "immutable" in observer logic
src/runtime/runtime.ts Replaced all type checks from DIFReferenceMutability.Final to DIFReferenceMutability.Immutable
test/runtime/dif.test.ts Updated test cases and assertions to use Immutable instead of Final
src/datex-core/datex_core_js.d.ts Reordered interface definitions (auto-generated)
rs-lib/src/runtime.rs Added formatting_mode parameter to DecompileOptions
rs-lib/Cargo.toml Updated version to 0.0.8 and datex-core dependency to 0.0.7
deno.json Updated version to 0.0.8
Cargo.lock Updated dependency versions and checksums
Comments suppressed due to low confidence (6)

test/runtime/dif.test.ts:400

  • This test case is a duplicate of the test starting at line 346. Both tests have the same name 'immutable pointer primitive ref update' and identical implementation. One of these duplicate tests should be removed.
Deno.test("immutable pointer primitive ref update", () => {
    const val = 123;
    const ptrObj = runtime.createPointer(
        val as number,
        undefined,
        DIFReferenceMutability.Immutable,
    );
    if (!(ptrObj instanceof Ref)) {
        throw new Error("Pointer object is not a Ref");
    }
    assertEquals(ptrObj.value, val);

    // get value of ptrObj from DATEX execution
    const result = runtime.executeSyncWithStringResult(
        "$" + ptrObj.pointerAddress,
    );
    assertEquals(result, "&123f64");

    // update the ref value
    assertThrows(
        () => {
            ptrObj.value = 456;
        },
        Error,
        `immutable reference`,
    );
});

src/dif/dif-handler.ts:160

  • The JSDoc comment still references 'final' but should be updated to 'immutable' to match the refactored terminology.
     * @throws If the pointer is final.

src/dif/dif-handler.ts:241

  • The JSDoc comment still references 'final' but should be updated to 'immutable' to match the refactored terminology.
     * @throws If the pointer is final.

src/dif/dif-handler.ts:34

  • The comment still references 'final' but should be updated to 'immutable' to match the refactored terminology.
     * The observerId is only set if the pointer is being observed (if not final).

src/dif/dif-handler.ts:254

  • The comment still references 'final' but should be updated to 'immutable' to match the refactored terminology.
        // make sure the pointer is not final (no observer)

src/dif/dif-handler.ts:256

  • The error message still references 'final reference' but should be updated to 'immutable reference' to match the refactored terminology and be consistent with the test assertions that check for 'immutable reference'.
            throw new Error(`Cannot observe final reference $${address}`);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants