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 function reloading #2835

Merged
merged 6 commits into from
Mar 26, 2020
Merged

Fix function reloading #2835

merged 6 commits into from
Mar 26, 2020

Conversation

bensku
Copy link
Member

@bensku bensku commented Feb 29, 2020

Description

Functions were validated too early in script reload process. To fix this, I added an API for reloading scripts that does it correctly. It might also be useful to addons!

I would appreciate if people with a lot of functions could test if this causes other problems.


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

@bensku bensku added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Feb 29, 2020
Copy link
Contributor

@ShaneBeee ShaneBeee left a comment

Choose a reason for hiding this comment

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

I didn't have too many functions to test this out, but I had 1 function to test with.

Prior to this version:

I have a function in the file spiral.sk and im calling this function in test.sk
if I reload test its fine, if I reload spiral it throws this error:

[01:00:00 ERROR]: The function 'spiral' was deleted or renamed, but is still used in other script(s). These will continue to use the old version of the function until Skript restarts. (test.sk, line 12: loop spiral({_l}, 4, 8):')
[01:00:00 ERROR]: The function 'spiral' was deleted or renamed, but is still used in other script(s). These will continue to use the old version of the function until Skript restarts. (test.sk, line 12: loop spiral({_l}, 4, 8):')

Your PR:

I was able to reload each script without any issues 👍

@bensku bensku requested a review from a team March 22, 2020 13:00
@bensku bensku merged commit 7387993 into master Mar 26, 2020
@Nicofisi Nicofisi deleted the feature/function-reload branch April 16, 2020 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants