-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: do not refer to "lazy module loading" #47397
Comments
Would an alternative to trying to give this feature a descriptive name be to simply call it "module loader v2"? Then defer to documentation for what that actually means, differences vs the original loader. |
I'm leaning toward "precise module loading" here and "Go 1.17 precise module loading" elsewhere. |
@bcmills split this into a few different concepts in https://golang.org/cl/333629. "Module graph pruning" is one, but "lazy loading" is still there. Would be good to chat about this more when he gets back. I think "lazy" is a good word here to explain "not loaded until we need it". But we need to explain a lot more than that. |
It may be worth mentioning that "Lazy loading" has some precedence in other languages (React and Angular come to mind, though the user overlap there might be low 😆 ) "Module graph pruning" sounds like "tree shaking" to me. Whatever name you folks choose, I'd suggest using something standard from other package managers so users understand what they're operating with. |
Data point of one: "lazy" is a reasonably well-understood way to describe deferring something, often a calculation, until it's needed. I haven't personally seen anyone confused by its implications w.r.t. module loading. |
Without following the discussion it is not even sufficiently clear if the terminology refers to the go toolchain or to any runtime behaviour. |
My current thinking is that the implementation really spans three concepts:
|
I'm happy to rename any of those three concepts, but I'm probably too close to the implementations to come up with better names for them. I guess “lazy module loading” could be “speculative package loading”, maybe? “Lazy loading” is when we proceed to loading packages under the assumption that the |
Discussed with team. |
Change https://golang.org/cl/339991 mentions this issue: |
Change https://golang.org/cl/335135 mentions this issue: |
For golang/go#47397 Change-Id: I7046bddb17bdd7957603e16580e7c9bab4a8c05a Reviewed-on: https://go-review.googlesource.com/c/website/+/339991 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
Change https://golang.org/cl/345393 mentions this issue: |
…runed module graphs The level of support for pruning — not the lazy/eager loading behavior — is the more fundamental property, and what matters in terms of what invariants we need to maintain. If the main module supports pruned module graphs we load its dependencies lazily, and if it does not support pruned module graphs we load its dependencies eagerly. However, in principle we could also load the module graph lazily even in modules that do not support graph pruning — we would just be more likely to overlook inconsistent requirements introduced by hand-edits or bad VCS merges to the go.mod file. (After this change, a “lazy” module is just one in which we happen not to have loaded the module graph, and an “eager” one is one in which we happen to load the module graph more aggressively.) Updates #36460 For #47397 Change-Id: I0d2ffd21acc913f72ff56b59a6bdc539ebc3d377 Reviewed-on: https://go-review.googlesource.com/c/go/+/345393 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
For golang/go#47397 Change-Id: I7046bddb17bdd7957603e16580e7c9bab4a8c05a Reviewed-on: https://go-review.googlesource.com/c/website/+/339991 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
I think we agreed to call the new module logic something like "fast module loading" or "reduced module graphs" instead of "lazy module loading". The problem with "lazy module loading" is it will mean approximately nothing to anyone.
We need to fix the docs - at least /doc/go1.17 but maybe other places - before the actual release.
/cc @bcmills @jayconrod
The text was updated successfully, but these errors were encountered: