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

5.18.1 is running ScanEvents out of order #5589

Closed
1 task done
hambold opened this issue Dec 21, 2024 · 5 comments
Closed
1 task done

5.18.1 is running ScanEvents out of order #5589

hambold opened this issue Dec 21, 2024 · 5 comments
Labels
⏱ Awaiting Response This ticket hasn't been triaged yet. 🐛 Bug This is a problem with WeakAuras.

Comments

@hambold
Copy link

hambold commented Dec 21, 2024

Is there an existing issue for this?

  • I have searched the existing open and closed issues.

Description

Hey,

this is an issue introduced in 5.18.1 and it is working as expected in 5.18.0.

It used to be that code called via a ScanEvent would be executed before the lines that followed it.
This is no longer the case in 5.18.1.
I hope the attached image explains the issue. I've also attached the import code to this test WA.

I hope this is a bug and not the way it is intended to work in the future :|

WeakAuras Version

5.18.1

World of Warcraft Flavor

Retail (Default)

World of Warcraft Region

EU

Tested with only WeakAuras

I got this issue with only WeakAuras enabled

Lua Error

No response

Reproduction Steps

  1. Import the provided WA
  2. Open options
  3. Repeatedly select and deselect the WA to print the result in chat

Last Good Version

5.18.0

Screenshots

ScanEvents change

Export String

!WA:2!Lv1tVTTnu86Mb0eTTUeVUGvGEWWaRWziWBTajyya9GvQDskCS9KuwYo5qj(KfNLj1iPCs6T6t9C(cmaFE7IVS75tGGXW(a0d7(YNGrsjN)0Odsp(47p)E)EpsvQvz87RXpVByOaKLMIbbsMYrsiAgHgY4JqscJADfIgeX4T4OrG35jGV7oonB25ceLKBX22JqeAlBPAtBkJcZX6WO2PVwfxabmkwmbqctaYw5sTORKd0bYOh5iKiUSv2YzRKzL9PzFM67N)i)qcLiI(y1xneGKgIeiq6OZr0fcioShJqL(70SJxtNldySym7uAt8aiAkrLCxwkpaE2d4NvuSZrPsvn1nrJsH1KfUCIFeqgejFNVYRqYaRzi8VMkKa(ac9HoNsWYO35eWIz83SK6jz1ub0OW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is a problem with WeakAuras. label Dec 21, 2024
@github-actions github-actions bot added the ⏱ Awaiting Response This ticket hasn't been triaged yet. label Dec 21, 2024
@SpatenLa
Copy link

that is indeed a new behaviour. if you have a reason why it should differently you have to show a usecase.

@InfusOnWoW
Copy link
Contributor

There never was any gurantee on how exactly WeakAuras.ScanEvents behaves.

It has now changed behaviour and might again in the future.

@emptyrivers
Copy link
Contributor

If you have a specific use case that can't be modified to handle asynchronous handling of ScanEvents, I'd like to hear it.

@hambold
Copy link
Author

hambold commented Dec 22, 2024

If you have a specific use case that can't be modified to handle asynchronous handling of ScanEvents, I'd like to hear it.

In the Discord you guys keep advising us to avoid the use of globals and to use ScanEvents instead, if we wish to send stuff between different WeakAuras. So if I use these to request a list from another WA for example, I need to receive it before I can run the rest of my code.
I'm able to work around it, but it's unintuitive and clunky.

I saw in the discussion around the "Click() actions" ticket that ScanEvents doesn't continue the hardware event chain.
I've been using a WA that uses a ScanEvents macro to kick off some code to determine what I should be crafting next and then sends either C_TradeSkillUI.CraftSalvage() or C_TradeSkillUI.CraftRecipe().
It was just a convenient little thing I was using and it's something that AddOns are still allowed to do, but with 5.18.1 it's no longer allowed and I guess it falls under "unintentional breakage, which we aren't going to fix." as Infus said.

I realize I'm not making a strong case here, but I'm not a programmer by trade and I imagine many authors aren't either. I would have never tried learning Lua if it wasn't for WeakAuras, because it was so much more convenient to get into than trying to write an AddOn.
I don't know, from my perspective it's just a frustrating and annoying change, especially because I don't understand why it was necessary and I just wanted to yell it into the void, I guess.

Thanks for your work regardless and Happy Holidays!

@InfusOnWoW
Copy link
Contributor

The reason for that was someone sending a ScanEvents to itself, which then made the aura's function running recursively, and the called functions would modify the states in a way that would confuse the functions calling them. Queueing prevents the inner functions from changing the states in a way the outer functions wouldn't expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏱ Awaiting Response This ticket hasn't been triaged yet. 🐛 Bug This is a problem with WeakAuras.
Projects
None yet
Development

No branches or pull requests

4 participants