1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-23 02:39:37 +01:00
nix/src
Sergei Zimmerman a2e7c0e040
libexpr: Canonicalize TOML timestamps for toml11 > 4.0
This addresses several changes from toml11 4.0 bump in
nixpkgs [1].

1. Added more regression tests for timestamp formats.
   Special attention needs to be paid to the precision
   of the subsecond range for local-time. Prior versions select the closest
   (upwards) multiple of 3 with a hard cap of 9 digits.

2. Normalize local datetime and offset datetime to always
   use the uppercase separator `T`. This is actually the issue
   surfaced in [2]. This canonicalization is basically a requirement
   by (a certain reading) of rfc3339 section 5.6 [3].

3. If using toml11 >= 4.0 also keep the old behavior wrt
   to the number of digits used for subsecond part of the local-time.
   Newer versions cap it at 6 digits unconditionally.

[1]: https://www.github.com/NixOS/nixpkgs/pull/331649
[2]: https://www.github.com/NixOS/nix/issues/11441
[3]: https://datatracker.ietf.org/doc/html/rfc3339

(cherry picked from commit dc769d72cb)
2025-08-19 00:10:45 +03:00
..
build-remote Apply clang-format universally. 2025-07-18 22:26:03 +03:00
external-api-docs Format .nix files 2025-01-24 17:04:02 +01:00
internal-api-docs Format .nix files 2025-01-24 17:04:02 +01:00
libcmd flake: Apply nixfmt 1.0.0 2025-08-18 23:11:41 +03:00
libexpr libexpr: Canonicalize TOML timestamps for toml11 > 4.0 2025-08-19 00:10:45 +03:00
libexpr-c Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libexpr-test-support Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libexpr-tests Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libfetchers Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libfetchers-c nix-fetchers-c: Init with settings object 2025-04-02 18:29:42 +02:00
libfetchers-tests Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libflake Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libflake-c Fix various typos in source code 2025-05-25 20:14:11 +00:00
libflake-tests Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libmain Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libmain-c Expose the nix component in header include paths 2025-04-01 11:40:42 -04:00
libstore flake: Apply nixfmt 1.0.0 2025-08-18 23:11:41 +03:00
libstore-c Split out store-open.hh and store-registration.hh 2025-05-14 16:07:57 -04:00
libstore-test-support Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libstore-tests Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libutil flake: Apply nixfmt 1.0.0 2025-08-18 23:11:41 +03:00
libutil-c Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libutil-test-support Apply clang-format universally. 2025-07-18 22:26:03 +03:00
libutil-tests Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix docs: Add self-attribute documentation 2025-08-10 15:20:07 +00:00
nix-build Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix-channel Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix-collect-garbage Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix-copy-closure Split out store-open.hh and store-registration.hh 2025-05-14 16:07:57 -04:00
nix-env Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix-instantiate Apply clang-format universally. 2025-07-18 22:26:03 +03:00
nix-store Apply clang-format universally. 2025-07-18 22:26:03 +03:00
perl flake: Apply nixfmt 1.0.0 2025-08-18 23:11:41 +03:00
nix-functional-tests Build Functional tests with Meson 2024-08-14 15:35:40 -04:00
nix-manual Build the manual with Meson 2024-10-09 11:58:17 -04:00