claymager / idris2-pkgs

An unofficial Idris2 package repository for Nix
MIT License
46 stars 13 forks source link

Unable to use the `dom` dependency. #16

Closed srid closed 2 years ago

srid commented 2 years ago

idris2-dom was added in #8. I added depends = dom in the .pkg file, but idris is unable to locate the JS module from that package:

idris2 -o main.js src/Main.idr --cg javascript
Error: Module JS not found

src.Main:3:1--3:10
 1 | module Main
 2 | 
 3 | import JS
     ^^^^^^^^^

Error: Undefined name unsafePerformIO. 

(Interactive):1:1--1:1
 1 | module Main

To reproduce, run nix develop -c make idrisid in this tree: https://github.com/srid/idris-web-playground/commit/eb279f0ad11a5c506132c49d9c3e8336b354275e

srid commented 2 years ago

Seems to be under the package dirs path, though:

image
srid commented 2 years ago

Uh, PEBKAC. Sort of. I should be building the .ipkg file:

image

This ^ is still odd. Transitive dependencies are not being found. Adding sop to my .ipkg file resolves it, but I shouldn't have to do it, ideally.