Skip to content

Remove observable methods #20937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 16, 2025
Merged

Conversation

wagenet
Copy link
Member

@wagenet wagenet commented Jun 16, 2025

Before this can land in main, we need to deprecate all Observable methods and the observer helper.

emberjs/rfcs#1115

Copy link

Estimated Asset Sizes

Diff

--- main/out.txt	2025-06-13 02:23:26.000000000 +0000
+++ pr/./pr-15688937291/out.txt	2025-06-16 18:32:40.000000000 +0000
@@ -1,59 +1,59 @@
-╔═══════╤══════════╤═══════════╗
-║       │ Min      │ Gzip      ║
-╟───────┼──────────┼───────────╢
-║ Total │ 409.3 KB │ 228.73 KB ║
-╚═══════╧══════════╧═══════════╝
+╔═══════╤═══════════╤═══════════╗
+║       │ Min       │ Gzip      ║
+╟───────┼───────────┼───────────╢
+║ Total │ 379.75 KB │ 211.49 KB ║
+╚═══════╧═══════════╧═══════════╝
 
 ╔══════════════════════╤═══════════╤═══════════╗
 ║ @ember/*             │ Min       │ Gzip      ║
 ╟──────────────────────┼───────────┼───────────╢
-║ Total                │ 239.69 KB │ 147.05 KB ║
+║ Total                │ 210.14 KB │ 129.86 KB ║
 ╟──────────────────────┼───────────┼───────────╢
-║ -internals           │ 35.92 KB  │ 25.65 KB  ║
-║ application          │ 12.83 KB  │ 7.58 KB   ║
-║ array                │ 12.66 KB  │ 7.32 KB   ║
+║ -internals           │ 28.24 KB  │ 20.19 KB  ║
+║ application          │ 12.39 KB  │ 7.55 KB   ║
+║ array                │ 1.38 KB   │ 1.35 KB   ║
 ║ canary-features      │ 304 B     │ 405 B     ║
-║ component            │ 1.07 KB   │ 995 B     ║
-║ controller           │ 1.8 KB    │ 1.36 KB   ║
-║ debug                │ 11.4 KB   │ 7.87 KB   ║
+║ component            │ 1.07 KB   │ 967 B     ║
+║ controller           │ 1.25 KB   │ 1.11 KB   ║
+║ debug                │ 10.98 KB  │ 7.82 KB   ║
 ║ deprecated-features  │ 31 B      │ 77 B      ║
 ║ destroyable          │ 561 B     │ 383 B     ║
-║ enumerable           │ 259 B     │ 387 B     ║
-║ helper               │ 823 B     │ 615 B     ║
+║ enumerable           │ 0 B       │ 0 B       ║
+║ helper               │ 823 B     │ 595 B     ║
 ║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
-║ modifier             │ 669 B     │ 605 B     ║
-║ object               │ 33.78 KB  │ 20.82 KB  ║
+║ modifier             │ 669 B     │ 612 B     ║
+║ object               │ 26.82 KB  │ 16.3 KB   ║
 ║ owner                │ 159 B     │ 178 B     ║
 ║ renderer             │ 385 B     │ 344 B     ║
-║ routing              │ 58.05 KB  │ 33.12 KB  ║
-║ runloop              │ 2.2 KB    │ 1.41 KB   ║
-║ service              │ 859 B     │ 741 B     ║
-║ template             │ 396 B     │ 342 B     ║
+║ routing              │ 56.83 KB  │ 33.01 KB  ║
+║ runloop              │ 2.2 KB    │ 1.35 KB   ║
+║ service              │ 859 B     │ 740 B     ║
+║ template             │ 396 B     │ 340 B     ║
 ║ template-compilation │ 429 B     │ 366 B     ║
 ║ template-compiler    │ 57.81 KB  │ 30.44 KB  ║
 ║ template-factory     │ 94 B      │ 160 B     ║
 ║ test                 │ 923 B     │ 627 B     ║
-║ utils                │ 3.93 KB   │ 3.51 KB   ║
+║ utils                │ 3.17 KB   │ 3.19 KB   ║
 ║ version              │ 55 B      │ 131 B     ║
 ╚══════════════════════╧═══════════╧═══════════╝
 
 ╔═════════════════╤═══════════╤══════════╗
 ║ @glimmer/*      │ Min       │ Gzip     ║
 ╟─────────────────┼───────────┼──────────╢
-║ Total           │ 169.61 KB │ 81.69 KB ║
+║ Total           │ 169.61 KB │ 81.63 KB ║
 ╟─────────────────┼───────────┼──────────╢
 ║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
 ║ encoder         │ 596 B     │ 653 B    ║
 ║ env             │ 38 B      │ 87 B     ║
 ║ global-context  │ 886 B     │ 545 B    ║
-║ manager         │ 12.19 KB  │ 5.44 KB  ║
+║ manager         │ 12.19 KB  │ 5.41 KB  ║
 ║ node            │ 2.71 KB   │ 1.81 KB  ║
 ║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
 ║ owner           │ 159 B     │ 202 B    ║
 ║ program         │ 7.1 KB    │ 3.63 KB  ║
 ║ reference       │ 5.51 KB   │ 3.18 KB  ║
 ║ runtime         │ 95.26 KB  │ 42.51 KB ║
-║ tracking        │ 989 B     │ 972 B    ║
+║ tracking        │ 989 B     │ 944 B    ║
 ║ util            │ 3.03 KB   │ 2.29 KB  ║
 ║ validator       │ 6 KB      │ 3.72 KB  ║
 ║ vm              │ 784 B     │ 798 B    ║

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 379.75 KB │ 211.49 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 210.14 KB │ 129.86 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 28.24 KB  │ 20.19 KB  ║
║ application          │ 12.39 KB  │ 7.55 KB   ║
║ array                │ 1.38 KB   │ 1.35 KB   ║
║ canary-features      │ 304 B     │ 405 B     ║
║ component            │ 1.07 KB   │ 967 B     ║
║ controller           │ 1.25 KB   │ 1.11 KB   ║
║ debug                │ 10.98 KB  │ 7.82 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 0 B       │ 0 B       ║
║ helper               │ 823 B     │ 595 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 612 B     ║
║ object               │ 26.82 KB  │ 16.3 KB   ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 385 B     │ 344 B     ║
║ routing              │ 56.83 KB  │ 33.01 KB  ║
║ runloop              │ 2.2 KB    │ 1.35 KB   ║
║ service              │ 859 B     │ 740 B     ║
║ template             │ 396 B     │ 340 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.81 KB  │ 30.44 KB  ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.17 KB   │ 3.19 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 169.61 KB │ 81.63 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.41 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.51 KB ║
║ tracking        │ 989 B     │ 944 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 6 KB      │ 3.72 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤══════════╤═══════════╗
║       │ Min      │ Gzip      ║
╟───────┼──────────┼───────────╢
║ Total │ 409.3 KB │ 228.73 KB ║
╚═══════╧══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 239.69 KB │ 147.05 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 35.92 KB  │ 25.65 KB  ║
║ application          │ 12.83 KB  │ 7.58 KB   ║
║ array                │ 12.66 KB  │ 7.32 KB   ║
║ canary-features      │ 304 B     │ 405 B     ║
║ component            │ 1.07 KB   │ 995 B     ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.4 KB   │ 7.87 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 615 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 605 B     ║
║ object               │ 33.78 KB  │ 20.82 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 385 B     │ 344 B     ║
║ routing              │ 58.05 KB  │ 33.12 KB  ║
║ runloop              │ 2.2 KB    │ 1.41 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 396 B     │ 342 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.81 KB  │ 30.44 KB  ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.93 KB   │ 3.51 KB   ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 169.61 KB │ 81.69 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.51 KB ║
║ tracking        │ 989 B     │ 972 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 6 KB      │ 3.72 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

let SubClass = MyClass.extend({
foo: null,
});
// TODO: Determine if there's anything worth testing here now that observer helper is gone
Copy link
Member Author

Choose a reason for hiding this comment

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

We should investigate this before landing in main.

@@ -24,124 +22,127 @@ moduleFor(
assert.ok(get(obj, 'isDestroyed'), 'object is destroyed after run loop finishes');
}

// TODO: Determine if there's anything useful to test here with observer helper gone
Copy link
Member Author

Choose a reason for hiding this comment

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

We should investigate this before landing in main.

return 'FOO';
}),
});
// TODO: Determine if there's anything useful to test here with observer helper gone
Copy link
Member Author

Choose a reason for hiding this comment

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

We should investigate this before landing in main.

async ['@test global observer helper'](assert) {
let MyMixin = Mixin.create({
count: 0,
// TODO: Determine if there's anything useful to test here with observer helper gone
Copy link
Member Author

Choose a reason for hiding this comment

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

We should investigate this before landing in main.

@wagenet wagenet merged commit 14bdd33 into emberjs:next Jun 16, 2025
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant