Skip to content

WIP: make hydration more compatible with compiler #262

WIP: make hydration more compatible with compiler

WIP: make hydration more compatible with compiler #262

Triggered via push June 8, 2024 14:38
Status Failure
Total duration 4m 10s
Artifacts

main.yml

on: push
Matrix: build
Matrix: docs
Matrix: lint
Matrix: test
Matrix: publish
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 8 warnings
test/index.ts > Compiler > compileTemplates > optimizes nested templates for the DOM: packages/compiler/test/index.ts#L236
AssertionError: expected 'import * as Document from "@typed/dom…' to deeply equal 'import * as Document from "@typed/dom…' - Expected + Received import * as Document from "@typed/dom/Document"; import * as RenderContext from "@typed/template/RenderContext"; import * as Context from "@typed/context"; import * as CompilerTools from "@typed/template/compiler-tools"; import * as RenderEvent from "@typed/template/RenderEvent"; import * as Effect from "effect/Effect"; import * as Scope from "effect/Scope"; import * as Fx from "@typed/fx"; - export const render = Fx.make(sink => Effect.gen(function* (_) { + export const render = Fx.make(function render(sink) { return Effect.gen(function* (_) { const context = yield* _(Effect.context()); const document = Context.get(context, Document.Document); const renderContext = Context.get(context, RenderContext.RenderContext); const templateContext = yield* _(CompilerTools.makeTemplateContext(document, renderContext, [[]], sink.onFailure)); const element0 = document.createElement("div"); element0.setAttribute("style", "border: 1px solid #000;"); const template0_element0 = document.createElement("p"); const template0_text0 = document.createTextNode("Hello"); template0_element0.appendChild(template0_text0); const template0_element1 = document.createElement("b"); const template0_text1 = document.createTextNode("World"); template0_element1.appendChild(template0_text1); element0.appendChild(template0_element0); element0.appendChild(template0_element1); if (templateContext.expected > 0 && (yield* _(templateContext.refCounter.expect(templateContext.expected)))) { yield* _(templateContext.refCounter.wait); } yield* _(sink.onSuccess(RenderEvent.DomRenderEvent(element0))); yield* _(Effect.never, Effect.onExit(exit => Scope.close(templateContext.scope, exit))); - })); + }); }); //# sourceMappingURL=nested-templates.js.map ❯ test/index.ts:236:20
test/index.ts > Compiler > compileTemplates > optimizes interpolated templates for the DOM: packages/compiler/test/index.ts#L243
AssertionError: expected 'import * as Document from "@typed/dom…' to deeply equal 'import * as Document from "@typed/dom…' - Expected + Received import * as Document from "@typed/dom/Document"; import * as RenderContext from "@typed/template/RenderContext"; import * as Context from "@typed/context"; import * as CompilerTools from "@typed/template/compiler-tools"; import * as RenderEvent from "@typed/template/RenderEvent"; import * as Scope from "effect/Scope"; import * as Fx from "@typed/fx"; import * as Effect from "effect/Effect"; - export const render = Fx.make(sink => Effect.gen(function* (_) { + export const render = Fx.make(function render(sink) { return Effect.gen(function* (_) { const context = yield* _(Effect.context()); const document = Context.get(context, Document.Document); const renderContext = Context.get(context, RenderContext.RenderContext); const templateContext = yield* _(CompilerTools.makeTemplateContext(document, renderContext, [Effect.succeed(42n)], sink.onFailure)); const element0 = document.createElement("div"); const nodePart0_comment = document.createComment("hole0"); element0.appendChild(nodePart0_comment); const nodePart0 = CompilerTools.setupNodePart({ index: 0 }, nodePart0_comment, templateContext, null, []); if (nodePart0 !== null) { yield* _(nodePart0, Effect.catchAllCause(sink.onFailure), Effect.forkIn(templateContext.scope)); } if (templateContext.expected > 0 && (yield* _(templateContext.refCounter.expect(templateContext.expected)))) { yield* _(templateContext.refCounter.wait); } yield* _(sink.onSuccess(RenderEvent.DomRenderEvent(element0))); yield* _(Effect.never, Effect.onExit(exit => Scope.close(templateContext.scope, exit))); - })); + }); }); //# sourceMappingURL=div-with-interpolated-effect.js.map ❯ test/index.ts:243:49
test/index.ts > Compiler > compileTemplates > optimizes sparse classes: packages/compiler/test/index.ts#L305
AssertionError: expected 'import * as Document from "@typed/dom…' to deeply equal 'import * as Document from "@typed/dom…' - Expected + Received import * as Document from "@typed/dom/Document"; import * as RenderContext from "@typed/template/RenderContext"; import * as Context from "@typed/context"; import * as CompilerTools from "@typed/template/compiler-tools"; + import * as Effect from "effect/Effect"; import * as RenderEvent from "@typed/template/RenderEvent"; - import * as Effect from "effect/Effect"; import * as Scope from "effect/Scope"; import * as Fx from "@typed/fx"; - export const render = Fx.make(sink => Effect.gen(function* (_) { + export const render = Fx.make(function render(sink) { return Effect.gen(function* (_) { const context = yield* _(Effect.context()); const document = Context.get(context, Document.Document); const renderContext = Context.get(context, RenderContext.RenderContext); const templateContext = yield* _(CompilerTools.makeTemplateContext(document, renderContext, [["foo", "bar"]], sink.onFailure)); const element0 = document.createElement("div"); const template0_element0 = document.createElement("div"); const template0_element0_class = CompilerTools.setupSparseClassNamePart({ nodes: [{ _tag: "className-part", index: 0 }, { _tag: "text", value: " " }, { _tag: "className-part", index: 1 }] }, template0_element0, { ...templateContext, values: templateContext.values[0] }); if (template0_element0_class !== null) { yield* _(template0_element0_class, Effect.catchAllCause(sink.onFailure), Effect.forkIn(templateContext.scope)); } const template0_text0 = document.createTextNode("Hello World"); template0_element0.appendChild(template0_text0); element0.appendChild(template0_element0); if (templateContext.expected > 0 && (yield* _(templateContext.refCounter.expect(templateContext.expected)))) { yield* _(templateContext.refCounter.wait); } yield* _(sink.onSuccess(RenderEvent.DomRenderEvent(element0))); yield* _(Effect.never, Effect.onExit(exit => Scope.close(templateContext.scope, exit))); - })); + }); }); //# sourceMappingURL=div-with-sparse-class.js.map ❯ test/index.ts:305:54
test (20.11.0)
Process completed with exit code 1.
docs (20.11.0)
Process completed with exit code 1.
build (20.11.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (20.11.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test (20.11.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (20.11.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
docs (20.11.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
docs (20.11.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
lint (20.11.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
lint (20.11.0)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.