add: Script.java record to encapsulate script paths#23
Open
3add wants to merge 4 commits into
Open
Conversation
fix: scripts with the same name in different directories colliding fix: memory leak when removing functions in Functions#removeFunctions(Script) deprecated: all methods using the old string-based scriptName system removed: some unused imports
ShaneBeee
requested changes
May 31, 2026
Member
ShaneBeee
left a comment
There was a problem hiding this comment.
At first glance, this looks good.
thanks for doing this. I planned on doing it but also really didn't want to haha.
Just a few tiny nitpicks
Co-authored-by: Shane Bee <shanebolenback@me.com>
Author
|
Crap, I just noticed everything in the |
…ng them of course (and the test) refactor: FileElement.java, alt+shift+l also the "fileName" wasn't even fileName here, it was Path#toString so fixing that is also nice
Author
|
Turns out that one wasn't bugged since it was using Path#toString, I still updated it to be consistent |
3add
commented
May 31, 2026
| @@ -46,15 +71,27 @@ public static List<LogEntry> loadScript(Path scriptPath, boolean debug) { | |||
| */ | |||
| public static List<LogEntry> loadScript(Path scriptPath, SkriptLogger logger, boolean debug) { | |||
Author
There was a problem hiding this comment.
Maybe we should make this return a Pair<Script, List<LogEntry>> since this method should also return the created Script object. Wdyt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: scripts with the same name in different directories colliding
fix: memory leak when removing functions in Functions#removeFunctions(Script)
deprecated: all methods using the old string-based scriptName system
removed: some unused imports
add: Script class, tracking loaded scripts