defmodule
in livebook sometimes raises compilation errors (Module is already defined)
#1677
-
Can someone shed light on how LB integrates with I sometimes observe that modules cannot be redefined, resulting in a compilation error ( This is a bit unfortunate, for example when I try to import this LB: https://github.com/BrooklinJazz/elixir_newbie_website_v1/blob/master/livebook/writing-tests-in-livebook.livemd. The subsequent definitions with the same module name fail. Did this behaviour change somehow in recent versions of LB? Because I'd expect that the the author of the referenced notebook (@BrooklinJazz) would've had the same issues when redefining modules. Or is it just not a good idea to do such things (using the same module name in different code cells)? I realise that the Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @linusdm! This is expected, we now track modules and the given module can only be defined in a single cell to improve reproducibility (since the module is overridden globally). Also see DockYard-Academy/curriculum#622. |
Beta Was this translation helpful? Give feedback.
Hey @linusdm! This is expected, we now track modules and the given module can only be defined in a single cell to improve reproducibility (since the module is overridden globally). Also see DockYard-Academy/curriculum#622.