I have a package with a Project.toml file. In the [deps] section are listed the core dependencies of the package. In the [extras] section are listed some extra dependencies that some test and example scripts need. In particular I have the following:
[extras]
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
[targets]
examples = ["GLMakie"]
The examples subfolder of my project contains some Julia scripts that depend on GLMakie. When I try to run scripts in that folder (I’m just hitting play in VSCode, on a particular file), I get an error saying the GLMakie package isn’t listed in my Project.toml file (which it clearly is). My expectation was that GLMakie would be available to files in the examples folder. The only way I’ve found to fix this, without adding GLMakie to the [deps] section, is to add it to the base environment for the version of Julia I’m currently using (v1.12). Once I do that, the scripts run as expected.
Are my expectations for how the environments should work wrong?