You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/manual/code-loading.md
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -350,25 +350,24 @@ The subscripted `rootsᵢ`, `graphᵢ` and `pathsᵢ` variables correspond to th
350
350
Since the primary environment is typically the environment of a project you're working on, while environments later in the stack contain additional tools, this is the right trade-off: it's better to break your development tools but keep the project working. When such incompatibilities occur, you'll typically want to upgrade your dev tools to versions that are compatible with the main project.
351
351
### "Glue" packages and dependencies
352
352
353
-
A "glue package" is a module that is automatically loaded when a specified set of other packages (called "glue dependencies") are loaded in the current Julia session.
354
-
These are defined by adding the following two sections to a package's `Project.toml` file:
353
+
A "glue package" is a module that is automatically loaded when a specified set of other packages (its "glue dependencies") are loaded in the current Julia session. The glue dependencies of a glue package is a subset of those packages listed under the `[weakdeps]` section of a Project file. Glue packages are defined under the `[gluepkgs]` section in the project file:
355
354
356
355
```toml
357
356
name = "MyPackage"
358
357
359
-
[gluedeps]
358
+
[weakdeps]
360
359
GlueDep = "c9a23..."# uuid
361
360
OtherGlueDep = "862e..."# uuid
362
361
363
362
[gluepkgs]
364
-
GlueFoo = "GlueDep"
365
363
GlueBar = ["GlueDep", "OtherGlueDep"]
364
+
GlueFoo = "GlueDep"
366
365
...
367
366
```
368
367
369
368
The keys under `gluepkgs` are the name of the glue packages.
370
-
They are loaded when all the packages on the right hand side (the glue dependencies) of the glue package are loaded.
371
-
If a glue package only has one glue dependency the lit of glue dependencies can be written as just a string for breviety.
369
+
They are loaded when all the packages on the right hand side (the glue dependencies) of that glue package are loaded.
370
+
If a glue package only has one glue dependency the list of glue dependencies can be written as just a string for brevity.
372
371
The location for the entry point of the glue package is either in `glue/GlueFoo.jl` or `glue/GlueFoo/GlueFoo.jl` for
373
372
glue package `GlueFoo`.
374
373
The content of a glue package is often structured as:
0 commit comments