Package extensions for Julia < 1.9

If I have [weakdeps] and [extensions] sections in my Project.toml, what happens if I load my package under an older Julia? The implicit answer from what I read is that just would be ignored and cause no errors, but could somebody tell me explicitly?

My possible use case: The main functionality of the package could stay LTS compatible and needs just minimal dependencies, but there would be some special subpackage, using a lot of dependencies, to be run under Julia >= 1.9

The weak dependencies will be ignored, but you still need to list them in the [extras] section, otherwise the compat specification won’t be intelligible to older versions of Julia. Older versions of Julia only look at the [deps] section for dependencies

1 Like

What was the old [extras] section used for exactly? I’ve only seen it in use with tests but I wonder why it wouldn’t be called [test] or so then

It is also used for packages that otherwise are indirectly dependencies (like packages you need in tests), here ones that you would add with Requires.jl, which is the fallback of pre-extension-time one should fall back to if on Julia 1.8 or less.