-
Notifications
You must be signed in to change notification settings - Fork 189
Fix compatibility with musl (and thus Alpine linux) alongside latest rubygems v3.3.21 #192
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
Conversation
A recent change in ruby gems broke tailwindcss-rails compatibility with musl (and thus alpine linxu). The change was shiped in ruby gems v3.3.21. Specifically, this change: https://github.com/rubygems/rubygems/pull/5852/files#diff-b2eac061756123f15f8d8e41075e4b8466a60945cad4e594b4eadf241d1a4089R28 Given the file modified in this commit is an executable, I *think* its safe to mutate the local platform version without side effects. However, this probably deserves some further consideration.
To clarify a bit further, without this change, building assets will fail like this:
This is because technically the platform is The change in ruby gems swapped the comparison of It worked before because |
Thanks for reporting this, I'll take a look shortly. |
I've reached out to a rubygems/bundler maintainer to ask when the fix for this issue (see rubygems/rubygems#5875) will be released in a new version of bundler or rubygems. I'm not sure this is the correct fix -- I'd rather ship a musl flavor of the gem. But I'm also not sure we should be trying to fix this, since we're essentially working around a specific version of the upstream dependency manager. I'm going to wait a few hours to see what the plan is upstream, and if it seems like it won't be fixed soon I'll work on shipping an x86_64-linux-musl platform gem, and maybe I'll even try to address installation of gcompat. |
This was not strictly necessary before now because musl platforms have always used the generic platform gem, but recent changes in rubygems and bundler introduced new behaviors around libc flavors, and so we're going the extra mile here to be explicit. See #192 for context, also see rubygems/rubygems#5875
See #194 for the work being teed up |
Great! Thanks for following up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
A recent change (7 days ago) in ruby gems broke tailwindcss-rails compatibility with musl (and thus Alpine Linux). The change was shipped in rubygems v3.3.21.
Specifically, this change: https://github.com/rubygems/rubygems/pull/5852/files#diff-b2eac061756123f15f8d8e41075e4b8466a60945cad4e594b4eadf241d1a4089R28
Given the file modified in this PR is an executable, I think it's safe to mutate the local platform version without side effects. However, this probably deserves some further consideration.
The readme already mentions that
gcompat
is required if you're using tailwindcss-rails with musl. I did consider displaying a warning ifGem::Platform.local.version
ismusl
. But, short of looking to see ifgcompat
is installed, I'm not sure how we would prevent the warning from displaying needlessly (already installed). In any case, a warning along those lines could be added in another PR.