Pkg3 "General" registry: dependencies in stdlib

I noticed that the “General” registry has added dependencies to my package, which are the packages in the standard library that my project uses but I forgot to add to my REQUIRE in METADATA. I’m curious, how was this determined? I don’t see any obvious hints in the scripts in Pkg that make the general registry.

Should I amend my REQUIRE file to explicitly include packages in the standard library?

Also, one of these standard libraries is only used during testing for my package. From the Pkg3 documentation it seems like test-specific dependencies should be declared using the [extras] and [targets] tables of Project.toml. I understand from reading discourse that Project.toml should not be in packages until Julia catches up to v1.0. Would this have been handled properly if I had put the test-specific dependencies in a REQUIRE file in my package’s /test directory?

Also how do I determine what ‘versions’ of standard library packages should be placed in the REQUIRE file? Version informations seems to be missing from their status in the package manager.

You shouldn’t put any stdlibs in REQUIRE files. It is determined by looking in the source code but when things are transitioned to Project files they will be determined by looking there.

Standard libraries are not versioned yet.

1 Like


By very high tech means: it uses git grep to look for import or using followed by the name of a stdlib. Has been surprisingly effective.