Skip to content

Commit

Permalink
feat: removing hashing mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
seankwarren committed Feb 9, 2024
1 parent 8c51882 commit 54207b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/application.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-expect-error application-flavors.js is not typed
import { allApplications, getAppData, getAppTree } from "@exabyte-io/application-flavors.js";
import { NamedDefaultableHashedInMemoryEntity } from "@exabyte-io/code.js/dist/entity";
import { NamedDefaultableInMemoryEntity } from "@exabyte-io/code.js/dist/entity";

import lodash from "lodash";

Expand All @@ -9,7 +9,7 @@ import { getApplicationConfig, getExecutableConfig } from "./tree";
import { ApplicationConfig, ApplicationData } from "./types";
import { Constructor } from "@exabyte-io/code.js/dist/context";

const Base = NamedDefaultableHashedInMemoryEntity;
const Base = NamedDefaultableInMemoryEntity;
abstract class ApplicationBaseEntity extends Base {};

export function ApplicationMixin<
Expand Down
4 changes: 2 additions & 2 deletions src/executable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
NamedDefaultableHashedInMemoryEntity,
NamedDefaultableInMemoryEntity,
RuntimeItemsMixin,
} from "@exabyte-io/code.js/dist/entity";

Expand All @@ -8,7 +8,7 @@ import { FlavorData } from "./types";
import { Constructor } from "@exabyte-io/code.js/dist/context";
import { AnyObject } from "@exabyte-io/code.js/dist/entity/in_memory";

const Base = RuntimeItemsMixin(NamedDefaultableHashedInMemoryEntity);
const Base = RuntimeItemsMixin(NamedDefaultableInMemoryEntity);
type ExecutableBaseEntity = InstanceType<typeof Base>;

export function ExecutableMixin<
Expand Down
4 changes: 2 additions & 2 deletions src/flavor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
NamedDefaultableHashedInMemoryEntity,
NamedDefaultableInMemoryEntity,
RuntimeItemsMixin,
} from "@exabyte-io/code.js/dist/entity";

Expand All @@ -8,7 +8,7 @@ import { Constructor } from "@exabyte-io/code.js/dist/context";
import { AnyObject } from "@exabyte-io/code.js/dist/entity/in_memory";
import { ExecutionUnitInputItemSchemaForPhysicsBasedSimulationEngines, TemplateSchema1 } from "@exabyte-io/code.js/dist/types";

const Base = RuntimeItemsMixin(NamedDefaultableHashedInMemoryEntity);
const Base = RuntimeItemsMixin(NamedDefaultableInMemoryEntity);
type FlavorBaseEntity = InstanceType<typeof Base>;

export function FlavorMixin<
Expand Down
4 changes: 1 addition & 3 deletions src/template.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// @ts-expect-error application-flavors.js is not typed
import { allTemplates } from "@exabyte-io/application-flavors.js";
import {
HashedEntityMixin,
HashedInputArrayMixin,
NamedInMemoryEntity,
} from "@exabyte-io/code.js/dist/entity";
import { deepClone } from "@exabyte-io/code.js/dist/utils";
Expand All @@ -14,7 +12,7 @@ import { ContextProviderRegistry } from "./context/registry";
import { Constructor, ContextProvider } from "@exabyte-io/code.js/dist/context";
import { TemplateData } from "./types";

const Base = HashedInputArrayMixin(HashedEntityMixin(NamedInMemoryEntity))
const Base = NamedInMemoryEntity
abstract class TemplateBaseEntity extends Base {};

export function TemplateMixin<
Expand Down

0 comments on commit 54207b0

Please sign in to comment.