Commit graph

11 commits

Author SHA1 Message Date
Andrew Gallant
08abeadd09 tz: fallback to Etc/Unknown when TZ is set to an invalid value
Previously, when `TZ` was set to an invalid value, Jiff would still
attempt to detect the system configured time zone. But this is arguably
not great, because it silently (aside from logs) rejects an invalid
`TZ` value. In reality, if `TZ` is set, it is likely that the user
intends for it to have an impact. So if it doesn't, we should bleat
about it.

This manifests as an error when using `TimeZone::try_system()` and
manifests as a error sentinel in the form of `Etc/Unknown` when using
`TimeZone::system()`.

We also tweak some of the logging levels. Namely, in #370, I increased
the number of TRACE-level log messages, which makes it much noisier. So
I've promoted a few things that were TRACE to DEBUG without making the
output much noisier. I guess TRACE should be reserved for variable
length things.

Fixes #364
2025-05-17 11:02:57 -04:00
Andrew Gallant
fa82f28448 cargo: fix compilation when only tzdb-concatenated is enabled
The problem was an incorrect `cfg`. And, of course, that this feature
combination wasn't being tested. That has been fixed too.

Fixes #365
2025-05-07 19:03:26 -04:00
Andrew Gallant
b0512f4ef4
jiff-icu: compatibility fixes
I guess we can't just drop the `std` feature quite yet, since Jiff only
implements `std::error::Error` and not `core::error::Error`. Sigh.
2025-05-01 15:56:34 -04:00
Andrew Gallant
11364d2a23 jiff-icu: migrate to icu 2.0.0
This basically does what is necessary to get everything compiled and
tests passing.

We'll add on time zone and offset stuff in a subsequent commit.

Note that we now depend on `icu_calendar` and `icu_time` directly, with
the latter being optional (but enabled by default). In particular, one
can do useful things with just conversions to dates with `icu_calendar`.
But I expect most folks will want both.
2025-04-28 12:12:44 -04:00
Joey de Waal
ef7ed1f85e
jiff-sqlx: remove dependency on sqlx-core
Specifically, the `sqlx-core`, `sqlx-sqlite`
and `sqlx-postgres` crates aren't actually
supposed to be depended on directly.
2025-04-23 08:49:39 -04:00
Andrew Gallant
0541c1979c cargo: restore sanity to iterative development
I'm not sure when or how exactly it happened, but in the last weeks,
I've noticed that `rustc` gets effectively stun-locked whenever I make a
change to a source file in Jiff. A quick examination of what the fuck my
computer is doing seems to reveal that it's spending oodles of time
compiling diesel over and over.

I have no idea why this is happening and I don't really care to spend
the time unraveling the mysteries of diesel.

So I took a hammer to the problem. I have effectively shunted all
examples and all "integration" crates out of Jiff's core workspace and
into their own little bloated fiefdoms. To compensate for the fact that
`cargo test --all` no longer tests these things, I've added shell
scripts to run the requisite tests. And those shell scripts are now run
in CI.

I'm now back to a state where I can save a file in Jiff and I get
sub-second `cargo check` response times.
2025-04-10 20:54:30 -04:00
Andrew Gallant
35b0c4d422 ci: break ./scripts/test into pieces...
... so that we can run each piece in its own job in CI.

This creates an obscene number of jobs, but I'm really hoping this cuts
down on the total wall clock time.
2025-03-06 16:05:00 -05:00
Andrew Gallant
fa62c4fbd7 scripts: fix test-wasm
I'm not sure why this used to work, but now it matches CI and actually
works.
2025-03-06 16:05:00 -05:00
Andrew Gallant
1471f752e5 test: move test and test-wasm into scripts
We are going to try and break `test` apart in order to speed up CI
builds. I don't want to pollute the root project directory with more
random test scripts, so let's tuck them away for now.
2025-03-06 16:05:00 -05:00
Andrew Gallant
6926d6d84f tz: add support for the Android platform
Android support has two prongs:

* The special Android concatenated time zone database will now be read
  by Jiff automatically.
* The `persist.sys.timezone` Android property is read to determine the
  system's configured IANA time zone identifier.

Closes #140
2025-01-12 15:38:41 -05:00
Andrew Gallant
e36fc93abd
first substantial commit 2024-07-21 20:15:13 -04:00