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

Confusing analyzer error messages referring the test code #1246

Closed
galeyang opened this issue Sep 6, 2019 · 2 comments
Closed

Confusing analyzer error messages referring the test code #1246

galeyang opened this issue Sep 6, 2019 · 2 comments
Labels
closed-obsolete Closed as the reported issue is no longer relevant from-study Issues are filed from a research study P2 A bug or feature request we're likely to work on
Milestone

Comments

@galeyang
Copy link

galeyang commented Sep 6, 2019

From the previous UX study, we found users typed the wrong code in an exercise, however, the analyzer was complaining about the test code. Therefore, the analyzer message was confusing as it referred to the incorrect line number and the correct hidden test code. As far as we know, exercise author also had no ways to fix now this because custom error message only show up after execution.

Concrete examples:

  • A test needs to get arguments foo(a, b) so as to verify the output value . However, users do not define it in the function foo() so the analyzer complains the test code error: too many positional arguments: 0 expected, but 1 found
  • A test evaluates return strings, however, users incorrectly define the return type as void. The analyzer complains the test code The expression here has a type of void, and therefore cannot be used - line 88

cc: @legalcodes


Status of this issue is also tracked in https://github.com/orgs/flutter/projects/3.

@galeyang galeyang added the from-study Issues are filed from a research study label Sep 6, 2019
@galeyang
Copy link
Author

galeyang commented Sep 6, 2019

This might be related to "Catch errors caused by expected-but-missing functions in user's code" #1107

@galeyang galeyang added the P2 A bug or feature request we're likely to work on label Sep 10, 2019
@RedBrogdon RedBrogdon added this to the Backlog milestone Sep 11, 2019
@parlough
Copy link
Member

As part of the new, simplified version of the DartPad frontend, the exercise functionality this was related to was removed.

If anyone would like to see similar functionality brought back, please check out #2702 or open a new issue. Thanks so much!

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2024
@parlough parlough added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant from-study Issues are filed from a research study P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants