News for hackers. Stuff that matters.
Re:Everything that uses configuration files should report wh... by jonhohle on Sunday June 25, 2023 @10:33AM (#36468547)
If there are multiple files in a wildcard pattern, what order are they resolved? I know for classpath loading, for example, it’s in directory order, which is file system dependent, and often based on the order the files were written to the directory and/or the size of the directory inode. Lots of fun figuring out why the wrong version of a class is consistently loaded on one or two servers out of twenty. (Always check your classpaths for duplicates kids.)
Re:Everything that uses configuration files should report wh... by cesarb on Sunday June 25, 2023 @11:04AM (#36468939)
> Always check your classpaths for duplicates kids.

I recently discovered extra-enforcer-rules which can help with that, as long as your classpath comes from Maven dependencies.

Re:Everything that uses configuration files should report wh... by ycombobreaker on Sunday June 25, 2023 @11:26AM (#36469219)
I've always seen this solved by sorting (lexicographical order of bytes, originally). First two characters were digits, for all files within a wildcard directory.
Re:Everything that uses configuration files should report wh... by justsomehnguy on Sunday June 25, 2023 @11:46AM (#36469454)
> If there are multiple files in a wildcard pattern, what order are they resolved

If you don't care (eg [0]) then do nothing and let the user bang it's head and reinvent the wheel.

If you care - just sort it and mark it as 'platform dependent' or somehow. Nobody really cares for the exact rules and a simple \d\d\-\w+\.conf pattern for the filenames is more than enough in 99% of cases.

[0] https://www.zabbix.com/documentation/6.0/en/manual/appendix/...

Re:Everything that uses configuration files should report wh... by usrusr on Sunday June 25, 2023 @12:14PM (#36469781)
Oh yes! Good thing if it only happens in the build server and not on deployments, but that can be "fun" enough. Bonus points if you have a culture of repeat builds being "special".