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

[BUG] Strange error on Medium, but not on Strong preset #31

Closed
brandonsturgeon opened this issue Mar 1, 2022 · 2 comments
Closed

[BUG] Strange error on Medium, but not on Strong preset #31

brandonsturgeon opened this issue Mar 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@brandonsturgeon
Copy link

Describe the bug
I was getting an error when using the Medium preset, but not the Strong preset.

The error:

Tried to Add Child that is referencing a Higher non global variable!

Expected behavior
Given the same input, all presets should display the same behavior (all succeeding, or all failing).

To Reproduce
I simplified the code down to the simplest form that still displayed this bug:

do end
function a() end
math.min(0, 1)

If I remove any one of these lines, the Medium preset works fine.

Screenshots
image

I'll try to investigate later, but wanted to put up an issue in case you already knew the root cause.

Additional context
I'm using the master branch with the fix from this issue applied: #26

@brandonsturgeon brandonsturgeon added the bug Something isn't working label Mar 1, 2022
@levno-710
Copy link
Member

I haven't had this exact issue, but i will try to find out where it originates from.
For your investigation: The error is thrown in line 204 of root/src/prometheus/scope.lua

@levno-710
Copy link
Member

levno-710 commented Mar 1, 2022

This issue had two causes:
The first one was a bug in visitast.lua, that i fixed with 949b4ea.
The second one was a bug in scope.lua that i fixed with 06e4f74
For me this script does work on medium after applying these changes.

However it could be that this doesn't work for you, because i applied these fixes to my development version so maybe the overall fix also relies on some other changes that aren't in the current release.

@levno-710 levno-710 self-assigned this Mar 23, 2022
@levno-710 levno-710 added the waiting for release The issue has been fixed, but the fix is not included in the current release. label Apr 15, 2022
@levno-710 levno-710 removed the waiting for release The issue has been fixed, but the fix is not included in the current release. label May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants