diff --git a/experimental/dds/tree/src/migration-shim/shimHandle.ts b/experimental/dds/tree/src/migration-shim/shimHandle.ts index 26f9282d389e..8deaa86e578b 100644 --- a/experimental/dds/tree/src/migration-shim/shimHandle.ts +++ b/experimental/dds/tree/src/migration-shim/shimHandle.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. */ -import { type IFluidHandleInternal } from '@fluidframework/core-interfaces/internal'; import { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal'; import { type IShim } from './types.js'; @@ -33,10 +32,4 @@ export class ShimHandle extends FluidHandleBase { public async get(): Promise { return this.shim; } - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandleInternal): void { - return toFluidHandleInternal(this.shim.currentTree.handle).bind(handle); - } } diff --git a/experimental/dds/tree/src/test/utilities/TestSerializer.ts b/experimental/dds/tree/src/test/utilities/TestSerializer.ts index 198aa2b3fe22..3af61ef61fcc 100644 --- a/experimental/dds/tree/src/test/utilities/TestSerializer.ts +++ b/experimental/dds/tree/src/test/utilities/TestSerializer.ts @@ -39,13 +39,6 @@ export class TestFluidHandle extends FluidHandleBase { throw new Error('Method not implemented.'); } - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandle): void { - throw new Error('Method not implemented.'); - } - public attachGraph(): void { throw new Error('Method not implemented.'); } diff --git a/packages/common/core-interfaces/src/handles.ts b/packages/common/core-interfaces/src/handles.ts index f86f971e05e3..c4f8f790528e 100644 --- a/packages/common/core-interfaces/src/handles.ts +++ b/packages/common/core-interfaces/src/handles.ts @@ -94,14 +94,6 @@ export interface IFluidHandleInternal< * Runs through the graph and attach the bounded handles. */ attachGraph(): void; - - /** - * Binds the given handle to this one or attach the given handle if this handle is attached. - * A bound handle will also be attached once this handle is attached. - * - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - bind(handle: IFluidHandleInternal): void; } /** diff --git a/packages/dds/test-dds-utils/src/ddsFuzzHandle.ts b/packages/dds/test-dds-utils/src/ddsFuzzHandle.ts index e119677a5c6b..734422dc4486 100644 --- a/packages/dds/test-dds-utils/src/ddsFuzzHandle.ts +++ b/packages/dds/test-dds-utils/src/ddsFuzzHandle.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. */ -import { type IFluidHandle } from "@fluidframework/core-interfaces"; import { type IFluidHandleContext } from "@fluidframework/core-interfaces/internal"; import { FluidHandleBase, @@ -42,12 +41,6 @@ export class DDSFuzzHandle extends FluidHandleBase { this.attached = true; } } - - // eslint-disable-next-line jsdoc/require-description - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandle): void {} } export class PoisonedDDSFuzzHandle extends FluidHandleBase implements IPoisonedHandle { @@ -80,10 +73,4 @@ export class PoisonedDDSFuzzHandle extends FluidHandleBase implements IP this.attached = true; } } - - // eslint-disable-next-line jsdoc/require-description - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandle): void {} } diff --git a/packages/runtime/container-runtime/src/blobManager/blobManager.ts b/packages/runtime/container-runtime/src/blobManager/blobManager.ts index 93cc29828af7..8aeb72b0f71c 100644 --- a/packages/runtime/container-runtime/src/blobManager/blobManager.ts +++ b/packages/runtime/container-runtime/src/blobManager/blobManager.ts @@ -13,7 +13,6 @@ import type { IEmitter, IEventProvider, IFluidHandleContext, - IFluidHandleInternal, IFluidHandleInternalPayloadPending, ILocalFluidHandle, ILocalFluidHandleEvents, @@ -125,14 +124,6 @@ export class BlobHandle this.onAttachGraph?.(); } } - - // eslint-disable-next-line jsdoc/require-description - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandleInternal): void { - throw new Error("Cannot bind to blob handle"); - } } // Restrict the IContainerRuntime interface to the subset required by BlobManager. This helps to make diff --git a/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md b/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md index accdb868e206..ef1e858792a8 100644 --- a/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md +++ b/packages/runtime/datastore/api-report/datastore.legacy.alpha.api.md @@ -120,6 +120,7 @@ export class FluidObjectHandle extends Flui readonly routeContext: IFluidHandleContext; // (undocumented) protected readonly value: T | Promise; + protected get visible(): boolean; } // @alpha @legacy (undocumented) diff --git a/packages/runtime/datastore/package.json b/packages/runtime/datastore/package.json index f838be356ba1..fffc9ffec007 100644 --- a/packages/runtime/datastore/package.json +++ b/packages/runtime/datastore/package.json @@ -158,7 +158,20 @@ "typescript": "~5.4.5" }, "typeValidation": { - "broken": {}, + "broken": { + "Class_FluidDataStoreRuntime": { + "backCompat": false + }, + "Class_FluidObjectHandle": { + "backCompat": false + }, + "ClassStatics_FluidDataStoreRuntime": { + "backCompat": false + }, + "ClassStatics_FluidObjectHandle": { + "backCompat": false + } + }, "entrypoint": "legacy" } } diff --git a/packages/runtime/datastore/src/fluidHandle.ts b/packages/runtime/datastore/src/fluidHandle.ts index ca73a8614c95..496724a64526 100644 --- a/packages/runtime/datastore/src/fluidHandle.ts +++ b/packages/runtime/datastore/src/fluidHandle.ts @@ -104,9 +104,9 @@ export class FluidObjectHandle< // eslint-disable-next-line jsdoc/require-description /** * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - * @privateRemarks This implementation will be moved to SharedObjectHandle once this is removed. + * @privateRemarks This implementation will be moved to SharedObjectHandle, along with some logic from attachGraph above. */ - public bind(handle: IFluidHandleInternal): void { + protected bind(handle: IFluidHandleInternal): void { // If this handle is visible, attach the graph of the incoming handle as well. if (this.visible) { handle.attachGraph(); diff --git a/packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts b/packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts index bab8d7182452..c3cb3ff77294 100644 --- a/packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts +++ b/packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts @@ -31,6 +31,7 @@ declare type old_as_current_for_Class_FluidDataStoreRuntime = requireAssignableT * typeValidation.broken: * "Class_FluidDataStoreRuntime": {"backCompat": false} */ +// @ts-expect-error compatibility expected to be broken declare type current_as_old_for_Class_FluidDataStoreRuntime = requireAssignableTo, TypeOnly> /* @@ -49,6 +50,7 @@ declare type old_as_current_for_Class_FluidObjectHandle = requireAssignableTo, TypeOnly> /* @@ -58,6 +60,7 @@ declare type current_as_old_for_Class_FluidObjectHandle = requireAssignableTo, TypeOnly> /* @@ -67,6 +70,7 @@ declare type current_as_old_for_ClassStatics_FluidDataStoreRuntime = requireAssi * typeValidation.broken: * "ClassStatics_FluidObjectHandle": {"backCompat": false} */ +// @ts-expect-error compatibility expected to be broken declare type current_as_old_for_ClassStatics_FluidObjectHandle = requireAssignableTo, TypeOnly> /* diff --git a/packages/runtime/runtime-utils/src/handles.ts b/packages/runtime/runtime-utils/src/handles.ts index 1d20386db218..321cbfe70921 100644 --- a/packages/runtime/runtime-utils/src/handles.ts +++ b/packages/runtime/runtime-utils/src/handles.ts @@ -180,10 +180,6 @@ export function toFluidHandleErased( export abstract class FluidHandleBase implements IFluidHandleInternal { public abstract absolutePath: string; public abstract attachGraph(): void; - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public abstract bind(handle: IFluidHandleInternal): void; public abstract readonly isAttached: boolean; public abstract get(): Promise; diff --git a/packages/runtime/runtime-utils/src/remoteFluidObjectHandle.ts b/packages/runtime/runtime-utils/src/remoteFluidObjectHandle.ts index 1c18621a2666..98559642f1ee 100644 --- a/packages/runtime/runtime-utils/src/remoteFluidObjectHandle.ts +++ b/packages/runtime/runtime-utils/src/remoteFluidObjectHandle.ts @@ -4,11 +4,8 @@ */ import { FluidObject, IRequest } from "@fluidframework/core-interfaces"; -import { - IFluidHandleContext, - type IFluidHandleInternal, -} from "@fluidframework/core-interfaces/internal"; -import { assert, fail } from "@fluidframework/core-utils/internal"; +import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal"; +import { assert } from "@fluidframework/core-utils/internal"; import { responseToException } from "./dataStoreHelpers.js"; import { FluidHandleBase } from "./handles.js"; @@ -69,11 +66,4 @@ export class RemoteFluidObjectHandle extends FluidHandleBase { public attachGraph(): void { return; } - - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandleInternal): void { - fail("RemoteFluidObjectHandle not supported as a bind source"); - } } diff --git a/packages/runtime/test-runtime-utils/src/mockHandle.ts b/packages/runtime/test-runtime-utils/src/mockHandle.ts index a0989e1010b8..57f09365c3e1 100644 --- a/packages/runtime/test-runtime-utils/src/mockHandle.ts +++ b/packages/runtime/test-runtime-utils/src/mockHandle.ts @@ -32,10 +32,4 @@ export class MockHandle extends FluidHandleBase { public attachGraph(): void { this.graphAttachState = AttachState.Attached; } - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind() { - throw Error("MockHandle.bind() unimplemented."); - } } diff --git a/packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts b/packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts index 9dcc4f43406e..89ad10b72728 100644 --- a/packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/attachRegisterLocalApiTests.spec.ts @@ -569,14 +569,6 @@ describeCompat( channel3.set("channel2handle", channel2.handle); channel2.set("dataStore3", dataStore3.handle); channel3.set("dataStore2", dataStore2.handle); - toFluidHandleInternal(dataStore2.handle).bind( - toFluidHandleInternal(dataStore3.handle), - ); - toFluidHandleInternal(dataStore2.handle).bind(toFluidHandleInternal(channel3.handle)); - toFluidHandleInternal(dataStore3.handle).bind( - toFluidHandleInternal(dataStore2.handle), - ); - toFluidHandleInternal(dataStore3.handle).bind(toFluidHandleInternal(channel2.handle)); toFluidHandleInternal(dataStore2.handle).attachGraph(); assert.strictEqual( @@ -675,11 +667,9 @@ describeCompat( "Channel should be detached", ); - channel2OfDataStore2.set("componet3Handle", dataStore3.handle); + channel2OfDataStore2.set("dataStore3Handle", dataStore3.handle); channel1OfDataStore3.set("channel23handle", channel2OfDataStore3.handle); - toFluidHandleInternal(dataStore3.handle).bind( - toFluidHandleInternal(dataStore4.handle), - ); + channel1OfDataStore3.set("dataStore4Handle", dataStore4.handle); // Channel 1 of dataStore 2 points to its parent dataStore 2. // Channel 2 of dataStore 2 points to its parent dataStore 2 and also to dataStore 3. diff --git a/packages/test/test-end-to-end-tests/src/test/gc/gcUnknownHandles.spec.ts b/packages/test/test-end-to-end-tests/src/test/gc/gcUnknownHandles.spec.ts index cfc0f660e949..1dd09fc3120a 100644 --- a/packages/test/test-end-to-end-tests/src/test/gc/gcUnknownHandles.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/gc/gcUnknownHandles.spec.ts @@ -8,7 +8,7 @@ import { strict as assert } from "assert"; import { ITestDataObject, describeCompat } from "@fluid-private/test-version-utils"; import { IContainer } from "@fluidframework/container-definitions/internal"; import { ContainerRuntime } from "@fluidframework/container-runtime/internal"; -import { IFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces"; +import { IRequest, IResponse } from "@fluidframework/core-interfaces"; import { IFluidHandleContext } from "@fluidframework/core-interfaces/internal"; import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal"; // This test doesn't care to test compat of the Fluid handle implementation, it's just used for convenience @@ -37,13 +37,6 @@ export class TestFluidHandle extends FluidHandleBase { throw new Error("Method not implemented."); } - /** - * @deprecated No replacement provided. Arbitrary handles may not serve as a bind source. - */ - public bind(handle: IFluidHandle): void { - throw new Error("Method not implemented."); - } - public attachGraph(): void { this.isAttached = true; }