-
Notifications
You must be signed in to change notification settings - Fork 65
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
automatically detect musl, allow overriding target #109
Conversation
Tailwind v4 includes binaries for linux-x64-musl and linux-arm64-musl. This commit adds support for automatically selecting those based on the system architecture. It also adds a config option to override the target, if necessary.
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.
This looks good to me but shouldn't we do it only once we support v4.0? I think it will break for older versions, right? Or is the goal to make main about v4.0 exclusively?
@josevalim I'd only merge it after #107.
It will, if you're on musl and want to use v3. You could override the target though, but that's not very comfortable. So we'll need to decide if the goal is to still support Tailwind 3 and 4, or if we say: v0.3 of the library expects Tailwind 4, use v0.2 for v3. Another way would be to change the target selection code depending on the selected Tailwind version, but that could get complex fast. |
Moving the comment from the other thread:
If we want to support Tailwind v3, I'd love to see a better way to handle the targets. Previously we relied on the known targets and raised on an unsupported target. I think now there are going to be cases when we try to download the binary which doesn't exist. I think it'll fail with "This typically means we cannot reach the source or you are behind a proxy." which is pretty confusing. I'd suggest doing this:
|
IMO we only support Tailwind v4 officially. There aren't any other changes in the project anyway and, if there is a need, we just do a new release in the v0.2 branch. |
Tailwind v4 includes binaries for linux-x64-musl and linux-arm64-musl. This commit adds support for automatically selecting those based on the system architecture. It also adds a config option to override the target, if necessary.
Relates to: #107