nevalang / neva

🌊 Dataflow programming language with static types and implicit parallelism. Compiles to native code and Go
https://nevalang.org
MIT License
85 stars 7 forks source link

CLI: RUN and BUILD commands are working from module's root or upper but not lower #571

Open emil14 opened 2 months ago

emil14 commented 2 months ago

Module's root (work)

cd <module_root>
neva run <path/to/main/pkg>

Upper than module's root (also work)

cd <module_root>
neva run <path/to/main/pkg>

Lower than module's root (doesn't work)

Let's say you have this structure

somedir/
..neva_module/
....foo/
......bar/main.neva

It's intuitive to assume that neva run bar from /somedir/neva_module/foo will work but it actually won't.

The problem is that wd will be /somedir/neva_module/foo and mainPkgPath will be bar. And when builder CD into WD it can't see bar there.

emil14 commented 2 months ago

Note that we have e2e test for that inside e2e folder (run cli not from module root)