Open JohnBjrk opened 5 months ago
Create two projects with gleam new: demo1 and demo2.
gleam new
In both project create a file demo.gleam.
demo.gleam
In demo1 with content:
import gleam/io pub fn main() { "demo in demo1" |> io.debug() }
In demo2 with content:
import gleam/io pub fn main() { "demo in demo2" |> io.debug() }
In demo2 add the following to [dependencies] in gleam.toml: demo1 = { path = "../demo1"}
[dependencies]
gleam.toml
demo1 = { path = "../demo1"}
The run the demo module in demo2: gleam run -m demo
demo
gleam run -m demo
On my side I get the output: "demo in demo1"
Expected error or maybe "demo in demo2" with a warning that demo module was shadowed in demo1 dependency.
Note: If the dependency was made in the other direction (demo1 -> demo2) the module from the main project was run.
Oh dear! Thank you
Create two projects with
gleam new
: demo1 and demo2.In both project create a file
demo.gleam
.In demo1 with content:
In demo2 with content:
In demo2 add the following to
[dependencies]
ingleam.toml
:demo1 = { path = "../demo1"}
The run the
demo
module in demo2:gleam run -m demo
On my side I get the output: "demo in demo1"
Expected error or maybe "demo in demo2" with a warning that demo module was shadowed in demo1 dependency.
Note: If the dependency was made in the other direction (demo1 -> demo2) the module from the main project was run.