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

[all] RFC: Add dependencies to Gemfile #288

Open
wants to merge 7 commits into
base: staging
Choose a base branch
from

Conversation

sproctor
Copy link
Contributor

@sproctor sproctor commented Feb 5, 2023

I'd like some input here. sqlite3 is a hard dependency, so it can definitely be added here. gtk3 is a hard dependency on Linux, but appears to not be on windows. I think using bundler to install the gem is the way to go. Are there many people using Lich on Windows without GTK3?

@vtcifer
Copy link
Contributor

vtcifer commented Feb 10, 2023

I'd like some input here. sqlite3 is a hard dependency, so it can definitely be added here. gtk3 is a hard dependency on Linux, but appears to not be on windows. I think using bundler to install the gem is the way to go. Are there many people using Lich on Windows without GTK3?

Can you clarify what you mean by hard dependency? I run lich on linux without gtk kind of. I run in docker containers that are built with gtk (all the necessary packages, then the gem is installed, then the packages are all purged - this keeps image size WAY down). So while gtk gem is there, it never really gets used, and in fact if something tries to use it, it fails.

@MahtraDR
Copy link
Contributor

I think of sqlite as the only real hard dependency.

Gtk is entirely optional.

@MahtraDR
Copy link
Contributor

I'd like some input here. sqlite3 is a hard dependency, so it can definitely be added here. gtk3 is a hard dependency on Linux, but appears to not be on windows. I think using bundler to install the gem is the way to go. Are there many people using Lich on Windows without GTK3?

What makes you say GTK3 is a hard dependency on linux? I play without GTK on linux...

@sproctor
Copy link
Contributor Author

If you try to run Lich without the gtk3 gem installed on Linux it fails with a message saying you need to install it.

@MahtraDR
Copy link
Contributor

MahtraDR commented Feb 11, 2023

If you try to run Lich without the gtk3 gem installed on Linux it fails with a message saying you need to install it.

unset DISPLAY

@ondreian
Copy link
Contributor

I think this is a very good proposal, if for now it will only be utilized by devs. The current weird way we distribute Lich means we cannot actually take advantage of a Gemfile for the most part, but it might make for a much better DevEx

@strnglp
Copy link
Contributor

strnglp commented Jul 31, 2023

+1

I just ran into this while trying to package Lich for NixOS. In your latest RC there is a Gemfile so I took a crack at it and ran into a couple of issues.

  1. There's something funky going on with the sqlite3 definition, probably related to the linux specific suffix but I don't know for sure. I'm not really a Ruby dev, I'd defer to you all to ensure it's specified correctly.
  2. When I hacked in the correct sqlite3 I started running into this:
    require': cannot load such file -- mini_portile2 (LoadError)

I'm not sure but that seems like a dependency that isn't specified either in your Gemfile or in sqlite3's (which would surprise me).

Based on the timing of these comments and the newer nature of your Gemfiles I assume that it's still a WIP but wanted to express some interest in sorting this out so I can help get the package setup on Nixpkgs.

EDIT:
This fixed it for me...
gem "sqlite3", "~> 1.6", force_ruby_platform: true
Maybe an SME can validate this approach, I pulled that directly from the sqlite3 gem readme.

@mrhoribu mrhoribu changed the title RFC: Add dependencies to Gemfile [all] RFC: Add dependencies to Gemfile Apr 25, 2024
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

Successfully merging this pull request may close these issues.

5 participants