133 Commits
Author SHA1 Message Date
Oliver Hamlet 3890c3a095 Improve some doc comments 2025-12-30 15:19:42 +00:00
Oliver Hamlet 4bfa4c9539 Don't error if metadata list contains duplicate known Bash Tags
It's harmless to have duplicates, and the list is not documented to contain unique elements.
2025-12-30 15:06:11 +00:00
Oliver Hamlet 9b81824851 Fix writing metadata files in current working directory 2025-12-29 10:22:12 +00:00
Oliver Hamlet caa860b2df Rename YAML emitter functions for clarity 2025-12-28 16:04:31 +00:00
Oliver Hamlet bbfafe25da Tidy up the YAML emitter impl
Reduce duplication, and make the map handling a little less hacky.
2025-12-28 16:01:33 +00:00
Oliver Hamlet 8869878a8a Move detail key before condition key in File YAML 2025-12-28 15:23:02 +00:00
Oliver Hamlet d77aed71eb Fix escaping " and \ in double-quoted YAML strings 2025-12-28 15:22:11 +00:00
Oliver Hamlet e93f1f9632 Add padding in single-item YAML flow lists
To match the style that we use in LOOT's masterlists.
2025-12-28 15:21:51 +00:00
Oliver Hamlet b2b363ad34 Account for prelude substitution in error line and column numbers
If the error occurs before the prelude, the line and column numbers are unchanged.

If the error occurs after the prelude, the line number is offset by the difference between the length of the original and replacement preludes.

If the error occurred within the replacement prelude, the line and column numbers are adjusted to match the position of the error within the prelude file that was used as a replacement, and the error message indicates that the error occurred within the prelude.

These changes should make it easier to debug masterlist loading errors that are due to incorrect syntax.
2025-12-22 22:06:47 +00:00
Oliver Hamlet 0f6492be10 Fix clippy warning & error
They were introduced as part of Rust v1.92.0.
2025-12-22 21:03:37 +00:00
Oliver Hamlet fa97ac8b5d Fix off-by-one error in error column numbers
It turns out that marker column values from Saphyr are not actually 1-indexed.
2025-12-22 21:01:33 +00:00
Oliver Hamlet bc89403134 Reapply "Support plugin and archive symlinks"
This reverts commit da0e35bb2b.

The minimum version of libloadorder has been increased because 18.5.0
included some changes to support symlinked plugins, without which
symlink support is incomplete.
2025-09-30 19:01:08 +01:00
Oliver Hamlet 3aa18c49f4 Depend on windows-sys instead of windows
Using the latter doesn't really add any value, and while libloadorder still pulls in windows, it means less duplication due to version mismatches in the dependency tree.
2025-09-29 21:25:10 +01:00
Oliver Hamlet ef2797838d Fix rustc warning
It only appeared after I updated to Rust v1.90.0.
2025-09-28 13:41:04 +01:00
Oliver Hamlet 6bc6113bb7 Test with long paths on Windows
Long paths can be greater than 260 characters long, but each path component is still limited to 255 characters. The latter is also commonly the component length limit on Linux.

Support for long paths requires Windows 10 1607 or later and a Registry value to be set[1], so to make the cause of test failures clearer when that isn't the case, there's one test that checks that Registry value is set, and long paths are not used in the other tests if it isn't set, so only that one test should failed if the system isn't configured as expected.

GitHub Action's Windows runners do have the Registry value set[2].

This doesn't set the manifest for the Rust tests because it seems to be very difficult to set a manifest for only the tests, and it's not worth the effort when the only tests that fail are those that try to create a symlink, especially since those cases are also covered by the C++ tests.

[1]: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later
[2]: https://github.com/actions/runner-images/blob/releases/win22/20250921/images/windows/scripts/build/Configure-BaseImage.ps1#L73
2025-09-28 13:41:04 +01:00
Oliver Hamlet a677041a55 Fix new Clippy errors
Introduced in Clippy v0.1.89 / Rust v1.89.0.
2025-08-11 18:54:54 +01:00
Oliver Hamlet da0e35bb2b Revert "Support plugin and archive symlinks"
This reverts commit 9f45282bee. This is a
temporary revert so that I can release v0.28.1 without any new features.
2025-08-08 11:28:32 +01:00
Oliver Hamlet 687d907b17 Improve metadata parsing invalid regex error message 2025-08-05 17:05:10 +01:00
Oliver Hamlet 9f45282bee Support plugin and archive symlinks
On Linux, and on Windows when the game is OpenMW or Oblivion Remastered.
2025-08-03 14:26:17 +01:00
Oliver Hamlet d4d6893491 Use enums instead of bools in public API
Replace the boolean parameters for including user metadata and evaluating conditions with MergeMode and EvalMode enums.

The C++ and Python wrappers still use booleans because they're more constrained than enums in those languages, which can be given invalid values.
2025-08-02 16:05:36 +01:00
Oliver Hamlet 4e74a174c5 Enable the doc_markdown Clippy lint in libloot 2025-08-02 16:05:36 +01:00
Oliver Hamlet c61fcd248d Be more specific with clippy's exhaustive_enums lint exceptions 2025-08-02 16:05:36 +01:00
Oliver Hamlet b75eced9ea Rename and tidy up the parameterized-test crate
It needed to be renamed to allow it to be published on crates.io, as there's already a parameterized_test crate there.
2025-08-02 16:05:36 +01:00
Oliver Hamlet 67b50ee8d9 Deny unreachable_pub lint in libloot 2025-07-31 22:10:44 +01:00
Oliver Hamlet cdb4433124 Fix finding archives for plugin basenames containing periods 2025-07-30 19:08:46 +01:00