Test framework: support directory resources#8377
Test framework: support directory resources#8377sovdeeth merged 5 commits intoSkriptLang:dev/featurefrom
Conversation
|
On a second thought, its not really a bug fix so will change base branch to feature. |
|
Please fill out the solution part of the PR template (and perhaps elaborate on ai usage?) |
@sovdeeth |
No worries! You're right they're easy to understand, but part of the reason we ask for the solution section is to ensure the code actually does what the PR author intended it to do. It's unlikely that that's the case here, but it's just good to be sure :) |
Pesekjak
left a comment
There was a problem hiding this comment.
looks good, I would consider using Files#walkFileTree to allow the IOException to be thrown directly
I am not a fan of having to introduce an anonymous FileVisitor just to achieve this, but alright. |
|
it is more verbose but definitely a better option here, good job |
* Test framework: support directory resources * use walkFileTree * oops forgot imports
* Add Origin-applying SyntaxRegistry (#8376) * Add reduce/fold Expression (#8353) * Location with Yaw/Pitch (#8351) * Test framework: support directory resources (#8377) * Test framework: support directory resources * use walkFileTree * oops forgot imports * Pattern Stringification Customization (#8391) * Implement StringificationProperties * Package cleanup * Fix missing call in GroupPatternElement stringification (#8449) Fix GroupPatternElement stringification * Stabilise damage source experiment (#8414) * Stabilise damage source experiment * Replace STABLE with MAINSTREAM * Remove experiment from damage source test * Remove unstable API usage supression --------- Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> * Add vector(n) (#8412) * Init commit * Fix not registering overloading for old namespaces * Standardize Module usage + add child modules (#8346) * child module support * Create child modules and move over existing Bukkit addon modules. * Update newer modules * Clean up * Requested changes and additional conversions Just tags left! * convert last module * standardize package hierarchies * remove bad imports * fix bad examples * Replace ChildAddonModule with HierarchicalAddonModule, move display/interaction modules into entity module, few other requested changes * requested changes * varargs registrar (thanks blue!) * Use addonmodule javadocs to point to other useful tools * Requested Changes * Requested Changes * Added option to compress file backups (#8396) * Add fast path for integer strings in variable name comparator (#8483) * Initial conversion * Some more conversion * fixes * Update StructCommand.java * no tests --------- Co-authored-by: Patrick Miller <apickledwalrus@icloud.com> Co-authored-by: mibers <midaswoah2@gmail.com> Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com> Co-authored-by: devdinc <234956748+devdinc@users.noreply.github.com> Co-authored-by: Tiberiu Sabău <96194994+tibisabau@users.noreply.github.com> Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com> Co-authored-by: Pesek <42549665+Pesekjak@users.noreply.github.com>
Problem
Directory resources are not copied correctly. When using
skript-test-actionwithskript-reflect, custom libraries or nested resources cannot be used because only single files were being copied. This causes missing dependencies or incomplete builds.Solution
The code now recursively copies directories and all their contents while preserving the directory structure.
Files.walkto traverse all nested files and subdirectories.This ensures that both single files and full directory resources are copied correctly into the environment, allowing custom libraries to be used without issues.
Testing Completed
Supporting Information
Completes: none
Related: none
AI assistance: chatgpt (used for drafting PR description and writing the code; manual review and testing performed by author)