Skip to content
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

[Extension type] VM debugging support #49747

Closed
Tracked by #52684
itsjustkevin opened this issue Aug 19, 2022 · 8 comments
Closed
Tracked by #52684

[Extension type] VM debugging support #49747

itsjustkevin opened this issue Aug 19, 2022 · 8 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team

Comments

@itsjustkevin
Copy link
Contributor

No description provided.

@a-siva a-siva added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on labels Aug 19, 2022
@a-siva a-siva added triaged Issue has been triaged by sub team and removed vm-triaged labels Dec 20, 2022
@eernstg
Copy link
Member

eernstg commented Mar 6, 2023

Please note that this feature has been renamed: It is now the 'inline class' feature.

[Edit Sep 2023: It has been renamed again, it is now 'extension types'.]

@itsjustkevin itsjustkevin changed the title [Views] VM debugging support [Inline Class] VM debugging support Mar 6, 2023
@itsjustkevin itsjustkevin changed the title [Inline Class] VM debugging support [Extension type] VM debugging support Jul 25, 2023
@a-siva
Copy link
Contributor

a-siva commented Sep 12, 2023

Looks like some work on expression evaluation is required.
Consider this example

extension type V0(int id) {
  num foo() => 42;
}
extension type V1(int id) implements V0 {}
extension type V2(int id) implements V0 {}
extension type V(int id) implements V1, V2 {}
main() {
  V v = V(1);
  V1 v1 = V1(1);
  V2 v2 = V2(1);
  print(v.foo());
  print(v1.foo());
  print(v2.foo());
}

Inside devtools if we evaluate
v.foo()
we get the following error

evaluateInFrame: (113) Expression compilation error org-dartlang-debug:synthetic_debug_expression:1:3:
Error: The method 'foo' isn't defined for the class '_Smi'. 
 '_Smi' is from 'dart:core'.

@a-siva
Copy link
Contributor

a-siva commented Sep 12, 2023

When we hover the cursor on V/V1/V2 it shows the type as int, maybe it needs to indicate it is an extension type wrapping int``

@a-siva
Copy link
Contributor

a-siva commented Sep 12, 2023

//cc @derekxu16 @bkonyi

@a-siva a-siva assigned derekxu16 and bkonyi and unassigned a-siva Sep 12, 2023
@bkonyi bkonyi changed the title [Extension type] VM debugging support [Inline Class] VM debugging support Sep 18, 2023
@a-siva
Copy link
Contributor

a-siva commented Sep 18, 2023

@bkonyi the feature is now called extension-types and hence the title.

@bkonyi
Copy link
Contributor

bkonyi commented Sep 18, 2023

Oh, I didn't realized we changed the name again from 'inline class'. I'll change it back.

@bkonyi bkonyi changed the title [Inline Class] VM debugging support [Extension type] VM debugging support Sep 18, 2023
@a-siva a-siva added this to the Dart 3.3 Stable milestone Nov 20, 2023
@a-siva
Copy link
Contributor

a-siva commented Dec 4, 2023

Removing milestone 3.3 per discussion in the Dart scrum meeting this morning

@a-siva a-siva removed this from the Dart 3.3 Stable milestone Dec 4, 2023
@jensjoha
Copy link
Contributor

jensjoha commented Dec 7, 2023

With f5743b9 and c959173 landed evaluation should work.

E.g. with the example code above

> v.foo()
42

Can this issue be closed?

@a-siva a-siva closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team
Projects
None yet
Development

No branches or pull requests

6 participants