yglukhov / nimx

GUI library
MIT License
1.08k stars 76 forks source link

Cannot open file nimx/property_visitor for import nimx/text_field #526

Open mackrol opened 2 weeks ago

mackrol commented 2 weeks ago

Library fails to build for example from the main github page:

# File: main.nim
import nimx/window
import nimx/text_field

proc startApp() =
    # First create a window. Window is the root of view hierarchy.
    var wnd = newWindow(newRect(40, 40, 800, 600))

    # Create a static text field and add it to view hierarchy
    let label = newLabel(newRect(20, 20, 150, 20))
    label.text = "Hello, world!"
    wnd.addSubview(label)

# Run the app
runApplication:
    startApp()

Import of text_field triggers error:

> nim c -r --threads:on main.nim
...
D:\Scoop\apps\nim\nimble\pkgs2\nimx-0.2-93e5296f1feb91608ec49384ce0081397da0c11d\nimx\clip_view.nim(19, 22) template/generic instantiation of `genVisitorCodeForView` from here
D:\Scoop\apps\nim\nimble\pkgs2\nimx-0.2-93e5296f1feb91608ec49384ce0081397da0c11d\nimx\meta_extensions\visitors_gen.nim(28, 17) Error: cannot open file: nimx / property_visitor

OTOH simpler example without text_field works correctly:

# File: main.nim
import nimx/window

proc startApp() =
    # First create a window. Window is the root of view hierarchy.
    var wnd = newWindow(newRect(40, 40, 800, 600))

# Run the app
runApplication:
    startApp()

Tested on:

Nim Compiler Version 2.0.4 [Windows: amd64]
Compiled at 2024-03-28
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release

with vcc backend and nimx installed via:

nimble install nimx
CardealRusso commented 3 days ago

i got the same error the project looks dead

kai-odri commented 1 day ago

Yeah it broke with the nim 2.0.4, was working fine for me using nim.2.0.2 until today. Is anyone planning on maintaining this?