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

[FIX] Add warning back in #4880

Merged
merged 5 commits into from
Dec 12, 2023
Merged

[FIX] Add warning back in #4880

merged 5 commits into from
Dec 12, 2023

Conversation

Felienne
Copy link
Member

@Felienne Felienne commented Dec 9, 2023

Fixes #4869

As far as I can see, @ToniSkulj removed this warning in #4320, I suspect by accident, but if not, let me know :)

See:
image

How to test
Observe that code with a space at the start runs but also throws an error:

image

@Felienne Felienne requested a review from jpelay December 9, 2023 10:46
@Felienne
Copy link
Member Author

Felienne commented Dec 9, 2023

Would be a good idea maybe to add a Cypress tests for this @jpelay?

@ghost
Copy link

ghost commented Dec 9, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link
Member

@jpelay jpelay left a comment

Choose a reason for hiding this comment

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

Thank you!! This was probably an oversight by us.

Copy link
Contributor

mergify bot commented Dec 12, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@Felienne
Copy link
Member Author

Thank you!! This was probably an oversight by us.

Np! Do we want to add an issue to make a test so we don't forget?

@jpelay
Copy link
Member

jpelay commented Dec 12, 2023

Thank you!! This was probably an oversight by us.

Np! Do we want to add an issue to make a test so we don't forget?

Yeah, Im on it!

Copy link
Contributor

mergify bot commented Dec 12, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 49dd7db into main Dec 12, 2023
11 checks passed
@mergify mergify bot deleted the fix-warning branch December 12, 2023 19:07
mergify bot pushed a commit that referenced this pull request Dec 13, 2023
Fixes #2394 (finally!!) by checking if declared variables are actually used, also fixes #4884 that was introduced here.

Depends-On: #4880

**How to test**

I have added a test for the exception. To see it in action on the front-end, run code that defines but not uses a variable, and observe you get a warning but the code still runs:

<img width="1382" alt="image" src="https://github.com/hedyorg/hedy/assets/1003685/bb00c145-8d81-4e86-8ea1-316b0ae955c6">

Note that this PR needs #4880 to show the warning in the front-end!
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.

[BUG] InvalidSpaceWarning not being shown in the editor
2 participants