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

script load order broken on non-windows plaforms #351

Closed
perlguy opened this issue May 23, 2016 · 2 comments
Closed

script load order broken on non-windows plaforms #351

perlguy opened this issue May 23, 2016 · 2 comments

Comments

@perlguy
Copy link

perlguy commented May 23, 2016

File.listFiles() is not guaranteed to return files in any given order. From the java docs on File:

There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

On non-windows platforms, files are returned in whatever order they are stored on the filesystem... you need to explicitly sort the list if you want predictable behavior with respect to removing/adding recipes for the same items/blocks across multiple scripts. I suspect this is why it "works fine" on windows, but is causing problems for people on other platforms.

@AnrDaemon
Copy link

#341 and documentation explicitly states that scripts are to be loaded in a random order :/

@perlguy
Copy link
Author

perlguy commented Jun 28, 2016

Fair enough. I'll pass that on to the ftb guys who are relying on predictable load order.

@perlguy perlguy closed this as completed Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants