plugin: cyclic dependencies are allowed #41672
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Normally golang prohibits cyclic imports on compile time.
However if one uses plugins(each package in an own plugin) and load all thre plugins dynamically in a program, it is allowed (plugin load does not fail). However the result (in the case of my implementation mistake where i noticed it) is an infinite loop as all involved functions call themselfs in a cycle.
What did you expect to see?
Out of uniformity i expected that cyclic imports are also not possible in plugins.
I expected the plugin load to fail on the last of the 3 plugins when the cycle "closes"
What did you see instead?
Cyclic imports are possible and result in e.g. infinite loops.
Is this a conscious design choice ? I did not find any documentation for this behaviour.
If necessary to understand it i could make a minimal code example.
The text was updated successfully, but these errors were encountered: