jerous86 / nimqt

Qt bindings for nim
GNU General Public License v2.0
93 stars 6 forks source link

Something went wrong after using "choosenim update devel" #23

Closed grd closed 10 months ago

grd commented 1 year ago

So I am switching to "nim 1.9.1". And I also updated the package.

When I go into the examples again then to compile them I got the following error:

nim cpp -r text_view.nim

/home/user/.nimble/pkgs/nimqt-0.1/nimqt/qtwidgets/qlayoutitem.nim(9, 79) Error: invalid indentation

But when I turn back again with choosenim update stable (this got me into nim 1.6.12) and run the program again

nim cpp -r text_view.nim

then it runs the program.

I am running Ubuntu 22.04.1.

Martinix75 commented 1 year ago

We also happen to me under "Opensuse" but this problem was born recently .. some time ago also with NIM 1.9.1 he compile quietly, I would not want it to be a problem in Nim !! So I hadn't raised the problem waiting for nim updates! Then I don't know if something in nimqt will be changed with nim2 !! bye

grd commented 1 year ago

So... I guess to better wait for release 2.1 and stick with 1.6? Because ATM I think that 2.0 will be here in the next weeks.

I leave this issue open then.

Martinix75 commented 1 year ago

don't know!! You have to see what Jerouse says if it is a thing that he can solve (quickly) or if he is a thing that they have to solve in nim! We will hear what the boss says! :). I repeat is a strange error born recently ... (first it worked).

jerous86 commented 1 year ago

Myeah, I hid a deprecated warning which is now popping up. The inheritable pragma has to be attached to the object part in nim 1.6.10, and in later versions it should apparently be attached to the type itself.

For now, I think it's better to use nim 1.6.10, also because I make use of the ast_pattern_matching library, which also makes use of the old inheritable pragma. so I could fix it, but it will still not compile without some manual intervention :)

But in the near future I'll try to implement something that's compiler version aware.

jerous86 commented 1 year ago

I've been trying to get it to work for both nim 1.6 and nim 2 using the compile time when, but as the old syntax is invalid in the new nim, compilation fails. So I guess I'll wait until nim 2 is the official latest version, and then switch to new syntax.

grd commented 1 year ago

Thanks for the update! I agree, we need to wait for a while.

jerous86 commented 10 months ago

With nim2 out, I think I fixed it (while at the same time also dropping support for pre-nim2). Can you check if it works for you?

grd commented 10 months ago

Thanks! But unfortunately the answer that I get is still the same with all the examples except with sheet.nim which compiles. Right now I am on Linux Mint.

grd commented 10 months ago

I got rid of the old version and cloned the repo again.

jerous86 commented 10 months ago

Is the line number the same? If so, then you are still using somehow an old version, if not, can you paste the error again?

grd commented 10 months ago

I think that the error was on my side. I ran nimble again and now the examples run. Thanks a lot!

autosaver.nim doesn't compile because of possible side effects and (I think) that load_ui.nim doesn't run correctly because in the past I saw a lot more in the ui.

I have a question and I think that I should put a separate issue because of it. It is menu entries. I don't know if you support that because I didn't see that topic inside the documentation.

jerous86 commented 10 months ago

autosaver should be fixed now; load_ui has always looked the same, so that should work fine. Did you see any weird issues with load_ui (or your own code)?

I think it's better if you close this issue, if it all works fine, and create a new one for menu entries. They are supported, but I did not create any documentation for it as I would be just repeating the Qt docs.

grd commented 10 months ago

Again thanks. Thanks a lot!