Go SDK resolution conflict between go.mod toolchain directive and .idea/goModules.xml override in GoLand 2023.2+
0 reputation · 05 Aug 2025, 10:35 UTC
When a GoLand project defines both a go.mod toolchain directive and an .idea/goModules.xml SDK override, it is unclear which source the IDE uses to determine the Project SDK.
This ambiguity affects code inspections, navigation, and run/debug configurations, especially when teams share the same repository across different workstations.
What determines the precedence between the two sources, can the behavior be overridden through IDE settings, and does the selected SDK remain consistent after a project reindex or invalidation of caches?