Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with Gdk requirement from lgi and math.pow problem #24

Open
jerome-diver opened this issue Apr 19, 2021 · 10 comments
Open

error with Gdk requirement from lgi and math.pow problem #24

jerome-diver opened this issue Apr 19, 2021 · 10 comments

Comments

@jerome-diver
Copy link

jerome-diver commented Apr 19, 2021

issue

which

  • after recent update (Archlinux and Fedora-34 both distro), i got an error with Gdk requirement at init.lua line 38
  • and also an error with 'pow' who did attempt for a 'nil' upvalue inside file colors.lua line 92

how to fix

  • change this line 38 in init.lua by:
local gdk = lgi.require('Gdk', '3.0')
  • use of caret instead of math.pow in colors.lua (and comment use of local pow that doesn't make sense in the code):
return u <= 0.0031308 and 25 * u / 323 or ((200 * u + 11) / 211) ^ (12 / 5)

PS

I use this with lua-5.4

@Aire-One
Copy link

It seems related to #22. Thanks for confirming the assumption I did.

PS
I use this with lua-5.4

Are you sure about that? lgi and awesome both doesn't support lua 5.4.

@jerome-diver
Copy link
Author

jerome-diver commented Apr 21, 2021

@Air-One i'm sure because i'm under Fedora-34 and there is only Lua-5.1 and Lua-5.4 packages to choose that can be installed. Also, i didn't install some other than Lua-5.4 packages and no manual installation of any Lua other.
I also had to change my own code (a display setting for multi-screen using lgi library) to Lua-5.4 and some little things in the code to be able to run.
Look at lgi library and see that it doesn't fully support Lua-5.4 but still be usable with Lua-5.4 (and look at my repo with setting display Lua code... i just had to change importation require to make it running under Lua-5.4).
So yes, definitely i'm 100% sure and can provide the proof of that.
Awesome is also working under Lua-5.4 actually and i had to change a bit of code to awesome-wm-nice to make it running with, as i told you.
But ok, if you choose to not trust this, look at this by yourself, do remove Lua-5.3 and install Lua-5.4 and see...

@Aire-One
Copy link

I'm not familiar with Fedora, so maybe they have some kind of magic in their packaging system... I'm actually quite surprised because you are the first user I see, reporting running awesome with lua 5.4 as a "daily driver" and not just experimentally.

AFAIK, we have issues upstream with lua 5.4 that can not be supported currently by awesome because LGI don't fully support it. (Please take a look at issues and PR on the awesome repo for the last past year)

I guess we can bring support to lua 5.4 in awesome by fixing the problems such an upgrade implies (like the random generator fix that was proposed 1-ish year ago). But this couldn't be tagged as a stable version of awesome tho, as (again) lgi does NOT support lua 5.4 in its stable release.

Anyway, I feel curious about the changes you did, and you're welcome to share them with upstream projects 😊

@raven2cz
Copy link

raven2cz commented Jun 2, 2021

Is there any progress with this issue? awesome nice plugin work or not?
Do you have some workround?
I read some notes from Aire-One from the top of this issue, but which init.lua do you mean, which package? Many components have init.lua.
Thanks for info.

@Aire-One
Copy link

Aire-One commented Jun 2, 2021

I read some notes from Aire-One from the top of this issue, but which init.lua do you mean, which package? Many components have init.lua.

I think you are referring this comment on reddit : https://www.reddit.com/r/awesomewm/comments/mdqzuj/module_ruled_not_found_rclua_line_26/gsgh72s?utm_medium=android_app&utm_source=share&context=3

In this case, I was talking about replacing the line https://github.com/mut-ex/awesome-wm-nice/blob/master/init.lua#L57 by :

local gdk = lgi.require('Gdk', '3.0')

(It's still untested, tho...)

You can test it by manually editing the init.lua of the awesome-wm-nice module. The exact location of this file will vary according to how you have installed this module.
If you have followed the instructions in the README, it should be located at ~​/.config/awesome/nice/init.lua.

@raven2cz
Copy link

raven2cz commented Jun 2, 2021

Works!
Thanks for your detailed analysis!
The bug is tested on my station with awesome-git and arch (gnome 4). If there is a project maintainer, please implement this fix.
Thanks again.

@jerome-diver
Copy link
Author

@raven2cz check also that you have no error for colors. µIf then, remove deprecated code (as i shown upper).

@raven2cz
Copy link

raven2cz commented Jun 3, 2021

All tested and works correctly. I created PR.

@Amit0617
Copy link

Amit0617 commented Feb 6, 2022

Thank god github seo is really good. I have installed awesome yesterday and then though to install it and it was throwing errors. This one liner help was useful. Merge it baby it's been requested 6 months back.

@raven2cz
Copy link

raven2cz commented Feb 6, 2022

@mut-ex Hello. I see that your contribution stats is very low last year.
It would be good to consider adding contributors (with write access rights) to your project which develop awesome (@Aire-One ) or can do maintenance of this project. If @Aire-One doesn't want it, I can take it. The forks are not solution, it is your work and your project.

Trial97 added a commit to Trial97/awesome-wm-nice that referenced this issue Mar 7, 2022
mut-ex#24: Error with Gdk requirement from lgi and math.pow problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants