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/architecture.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,12 +39,8 @@ This means we always have to write out all dependencies to the lock.
39
39
40
40
When creating the module cache directory all `*.mod` files have to be patched & all `go.sum` files have to be omitted from the file tree.
41
41
42
-
While it may be tempting to create a flat symlink structure (like `lndir`) this is not possible because Go doesn't traverse into packages where the directory is a symlink.
43
-
So one symlink per input file is created when unpacking the module cache.
44
-
45
-
This approach causes a downstream knock-on effect which is that Go embed statements don't consider files that are symlinks.
46
-
47
-
That's why `gobuild.nix` unpacks the module cache using a hybrid approach: create one symlink per source file & copy every non-Go file in full.
42
+
To be more efficient this patching happens at _dependency build time_ and is written to the store as a build output.
43
+
When the module cache is "unpacked" it's symlinked in a structure which is as flat as possible.
0 commit comments