elcritch / figuro

Experimental UI Library for Nim
64 stars 1 forks source link

How to fix "Error: Invalid matching clause: UiAuto" #48

Closed enthus1ast closed 11 months ago

enthus1ast commented 11 months ago

When i try to build the examples i get:

/home/david/projects/forks/figuro/vendor/patty/patty.nim(287, 8) Error: Invalid matching clause: UiAuto

Is this an issue with my setup?


david@dnd:~/projects/forks/figuro$ git pull
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), 593 bytes | 593.00 KiB/s, done.
From https://github.com/elcritch/figuro
   df9bf02..700e8e5  main       -> origin/main
Updating df9bf02..700e8e5
Fast-forward
 figuro/common/glyphs.nim             |  2 +-
 figuro/common/nodes/transfer.nim     |  3 +++
 figuro/renderer/opengl/fontutils.nim | 21 +++++++++++++++++----
 figuro/renderer/opengl/render.nim    |  6 +++---
 figuro/ui/apis.nim                   |  6 +++---
 tests/tclick.nim                     |  6 +++---
 6 files changed, 30 insertions(+), 14 deletions(-)

david@dnd:~/projects/forks/figuro$ atlas rep
[Info] (/home/david/projects/forks/figuro) is the current workspace
[Info] (assume) updated package to ebed5f2b726134400a4aca489d39e54a2e6dcd95
[Info] (assume) updated submodules 
[Info] (ws) updated package to 5ac521b72d7d4860fb394e5e1f9f08cf480e9822
[Info] (ws) updated submodules 
[Info] (urlly) updated package to 99784779f05649df25fd9c33003d8ef6de027345
[Info] (urlly) updated submodules 
[Info] (pixie) updated package to 523b364fcaa288d23ecb3f34c795da97d3637117
[Info] (pixie) updated submodules 
[Info] (macroutils) updated package to 4f178a21e57cb842f112a965d25cda93ac4d68e5
[Info] (macroutils) updated submodules 
[Info] (bumpy) updated package to e6237d8a307fe27a4c9ceb74ba2ab8b80949b026
[Info] (bumpy) updated submodules 
[Info] (vmath) updated package to 7282ae1247f2f384ebeaec3826d7fa38fd0e1df1
[Info] (vmath) updated submodules 
[Info] (crunchy) updated package to d0c9ad33ae72aece49093d7688fc78a7101aa4b0
[Info] (crunchy) updated submodules 
[Info] (nimsimd) updated package to 156e424306756a106442aca985eed61a8d12097b
[Info] (nimsimd) updated submodules 
[Info] (flatty) updated package to 07f6ba8ab96238e5bd1264cf0cea1d1746abb00c
[Info] (flatty) updated submodules 
[Info] (zippy) updated package to a3fd6f0458ffdd7cbbd416be99f2ca80a7852d82
[Info] (zippy) updated submodules 
[Info] (chroma) updated package to b2e71179174e040884ebf6a16cbac711c84620b9
[Info] (chroma) updated submodules 
[Info] (micros) updated package to 6791af3cacfdf1c098dc404376b09865c1a1d2cc
[Info] (micros) updated submodules 
[Info] (nim-stack-strings) updated package to 98df4cefe32fc55cf02ca3895252b1951f16dfd5
[Info] (nim-stack-strings) updated submodules 
[Info] (msgpack4nim) updated package to f4cc097ca9694f17feced9f82994f583ef7911fe
[Info] (msgpack4nim) updated submodules 
[Info] (nimscripter) updated package to 70926d2e383d3d239605573935468efcb470b7b1
[Info] (nimscripter) updated submodules 
[Info] (threading) updated package to bcc284991ba928d1ed299a81a93b7113cc7de04f
[Info] (threading) updated submodules 
[Info] (windy.elcritch.github.com) updated package to 9e3a30259f75c514d1b59963631825f8c74ae5fe
[Info] (windy.elcritch.github.com) updated submodules 
[Info] (asynctools) updated package to a1a17d06713727d97810cad291e29dd7c672738f
[Info] (asynctools) updated submodules 
[Info] (cdecl) updated package to 45e5fb28a5d6c03c2e9892b1d024b1c3689ae56a
[Info] (cdecl) updated submodules 
[Info] (patty) updated package to 31bb61b990b8b3bae1cba2f353fb978448942318
[Info] (patty) updated submodules 
[Info] (opengl) updated package to a6fb649e5bd94d8420d4a11287092a4dc3e922b4
[Info] (opengl) updated submodules 
[Info] (variant) updated package to 59caff018ed3b8b04c0e45ac260b4dc8fdef6ac3
[Info] (variant) updated submodules 
[Info] (supersnappy) updated package to 9d019a184b59dcb7aaa479cb0603f4f3464a0bc3
[Info] (supersnappy) updated submodules 
[Info] (pretty) updated package to a792f139dbb756288a87e77a5043725390665931
[Info] (pretty) updated submodules 
[Info] (cssgrid) updated package to 4d2d5cfb597fc54948842b732ce401b2a04c0461
[Info] (cssgrid) updated submodules 
david@dnd:~/projects/forks/figuro$ cd tests/
david@dnd:~/projects/forks/figuro/tests$ nim c -r tclick
Hint: used config file '/home/david/.choosenim/toolchains/nim-2.0.0/config/nim.cfg' [Conf]
Hint: used config file '/home/david/.choosenim/toolchains/nim-2.0.0/config/config.nims' [Conf]
Hint: used config file '/home/david/projects/forks/figuro/nim.cfg' [Conf]
Hint: used config file '/home/david/projects/forks/figuro/config.nims' [Conf]
Hint: used config file '/home/david/projects/forks/figuro/tests/config.nims' [Conf]
..........................................................................................................................................................................................................................................................................
FSN: {"image", "setgridcols", "gridautoflow", "setgridrows", "stroke", "shadow", "highlight", "justifyitems", "alignitems", "zlevel", "transparency", "cornerradius", "fill", "fillhover", "rotation"}
stack trace: (most recent call last)
/home/david/projects/forks/figuro/vendor/patty/patty.nim(460, 23) match
/home/david/projects/forks/figuro/vendor/patty/patty.nim(444, 7) matchVariant
/home/david/projects/forks/figuro/vendor/patty/patty.nim(435, 28) matchBranch
/home/david/projects/forks/figuro/vendor/patty/patty.nim(410, 39) matchBranchImplicit
/home/david/projects/forks/figuro/vendor/patty/patty.nim(287, 8) resolveSymbol
/home/david/projects/forks/figuro/figuro/ui/core.nim(528, 22) template/generic instantiation of `calcBasicConstraint` from here
/home/david/projects/forks/figuro/figuro/ui/core.nim(433, 28) template/generic instantiation of `calcBasicConstraintImpl` from here
/home/david/projects/forks/figuro/figuro/ui/core.nim(412, 18) template/generic instantiation of `calcBasic` from here
/home/david/projects/forks/figuro/figuro/ui/core.nim(378, 7) template/generic instantiation of `match` from here
/home/david/projects/forks/figuro/vendor/patty/patty.nim(287, 8) Error: Invalid matching clause: UiAuto
david@dnd:~/projects/forks/figuro/tests$ 
elcritch commented 11 months ago

That's odd. Your setup seems right, and thanks for including the details.

It sorta looks like you're compiling against an older CSSGrid, but the version Atlas reported looks right. You might double check your /home/david/projects/forks/figuro/nim.cfg to ensure that it points to the correct CSSGrid; it should be --path:"vendor/cssgrid/src". Some older versions of Atlas messed up the paths in vendored folders.

I also just bumped the version of CSSGrid used to 0.6.0, but the previous one 0.5.16 I think should work fine.

elcritch commented 11 months ago

Also, maybe try a nim c -f -r tclick.nim?

enthus1ast commented 11 months ago

While trying to fix this, i saw that i had also changed the path to nim-stack-strings because of this:

[Error] (nim-stack-strings/$deps/nim-stack-strings) remote URL has been compromised: got: https://github.com/termermc/nim-stack-strings but wanted: https://github.com/termermc/nim-stack-strings/

i had to add "/" to the url, to make atlas rep run without errors.

no luck with nim c -f -r tclick.nim, same error.

I have the newest version of atlas:

$ atlas -v
version: 0.6.3 (sha: ab22f997c22a644924c1a9b920f8ce207da9b77f)

I got it fixed by:

cd vendor/
mv cssgrid cssgrid.old
atlas rep

edit: What do you think? This could be a bug in atlas or?