Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Fixes the warnings in the default variable test

Open TheLimeGlass opened this issue 2 years ago • 8 comments

Description

Fixes the warnings in the default variable test. Warnings that this pull request removes:

[21:52:11 INFO]: [Skript] Line 6: (..\..\..\..\..\..\src\test\skript\tests\misc\default variables.sk)
[21:52:11 INFO]:     It is suggested to use brackets around the name of a variable. Example: {example::%player%} = 5
[21:52:11 INFO]: Excluding brackets is deprecated, meaning this warning will become an error in the future.
[21:52:11 INFO]:     Line: testing::no brackets::%living entity%: "String"
[21:52:11 INFO]:
[21:52:11 INFO]: [Skript] Line 7: (..\..\..\..\..\..\src\test\skript\tests\misc\default variables.sk)
[21:52:11 INFO]:     It is suggested to use brackets around the name of a variable. Example: {example::%player%} = 5
[21:52:11 INFO]: Excluding brackets is deprecated, meaning this warning will become an error in the future.
[21:52:11 INFO]:     Line: testing::variables4: 1.6900000000001
[21:52:11 INFO]:

Target Minecraft Versions: any Requirements: none Related Issues: none

TheLimeGlass avatar Apr 15 '23 03:04 TheLimeGlass

Why tho? Isn't the goal of the code you changed is to test the warning feature? it even says no brackets as it's intentional

I would suggest keeping just line 6 and rename the variable to like no brackets warning test but keep the change of line 7

AyhamAl-Ali avatar Apr 15 '23 10:04 AyhamAl-Ali

Why tho? Isn't the goal of the code you changed is to test the warning feature? it even says no brackets as it's intentional

I would suggest keeping just line 6 and rename the variable to like no brackets warning test but keep the change of line 7

I added it because when I developed the default variables I needed to make sure that no brackets worked. Then the warning came along where no brackets gets considered a StringMode.MESSAGE so it's encouraged to make sure it's a variable now (StringMode.VARIABLE...). The warnings are annoying now when in development mode.

TheLimeGlass avatar Apr 15 '23 10:04 TheLimeGlass

Why tho? Isn't the goal of the code you changed is to test the warning feature? it even says no brackets as it's intentional I would suggest keeping just line 6 and rename the variable to like no brackets warning test but keep the change of line 7

I added it because when I developed the default variables I needed to make sure that no brackets worked. Then the warning came along where no brackets gets considered a StringMode.MESSAGE so it's encouraged to make sure it's a variable now (StringMode.VARIABLE...). The warnings are annoying now when in development mode.

Surely it's still valuable to test that it works, though?

sovdeeth avatar Sep 18 '23 22:09 sovdeeth

Why tho? Isn't the goal of the code you changed is to test the warning feature? it even says no brackets as it's intentional I would suggest keeping just line 6 and rename the variable to like no brackets warning test but keep the change of line 7

I added it because when I developed the default variables I needed to make sure that no brackets worked. Then the warning came along where no brackets gets considered a StringMode.MESSAGE so it's encouraged to make sure it's a variable now (StringMode.VARIABLE...). The warnings are annoying now when in development mode.

Surely it's still valuable to test that it works, though?

Well then we need Pikachu's pull request that adds a test runner feature that acts like a try and catch. It's still pending.

TheLimeGlass avatar Oct 14 '23 11:10 TheLimeGlass

I think this change should be done when we do deprecate the brackets. Until then it's still valuable to test.

sovdeeth avatar Feb 01 '24 22:02 sovdeeth

I think this change should be done when we do deprecate the brackets. Until then it's still valuable to test.

They are deprecated. Do you mean remove? Why shouldn't this be merged now? It's just for testing sake? Tired of seeing this error like it's a new error that a branch I made did, when it's not.

TheLimeGlass avatar Feb 06 '24 00:02 TheLimeGlass

I think this change should be done when we do deprecate the brackets. Until then it's still valuable to test.

They are deprecated. Do you mean remove? Why shouldn't this be merged now? It's just for testing sake? Tired of seeing this error like it's a new error that a branch I made did, when it's not.

yeah, I meant remove. I suppose since it's targeting feature it's fine to merge. I just wanted to make sure we're still testing things that are intended to work in 2.8.

sovdeeth avatar Feb 06 '24 00:02 sovdeeth

I think this change should be done when we do deprecate the brackets. Until then it's still valuable to test.

They are deprecated. Do you mean remove? Why shouldn't this be merged now? It's just for testing sake? Tired of seeing this error like it's a new error that a branch I made did, when it's not.

yeah, I meant remove. I suppose since it's targeting feature it's fine to merge. I just wanted to make sure we're still testing things that are intended to work in 2.8.

I fixed default variables in 2.7. It is unrelated to 2.8 and can be included in 2.8.

TheLimeGlass avatar Feb 06 '24 00:02 TheLimeGlass