You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL; DR - Would you be open to a PR that makes tailwind:build update less aggressively?
I came to work today to a failing tailwind build. While investigating this problem,
I discovered that my ./var/tailwind directory contained at least 4 different versions of
the tailwind binary, which I presume means that this bundle always looks for and downloads the latest version
of tailwind when running console tailwind:build.
While I understand that not everyone likes to be chained to strictly pinned dependencies (praise be to Nix), I think that it would be a more sensible default to check if there is any version
of tailwind already downloaded, and if so, only download a different one if a pinned version has been configured, and none of the downloaded versions match the configuration.
Suddenly updating users to a major revision without any notice is a bit jarring.
Let me know if this sounds good to you, and thank you for letting us pin a specific version.
Below is some pseudo code of what I'm thinking:
<?php
/**
* Downloads tailwind if necessary.
* @return The version of binary that will be used.
* /
functionmaybe_download_tailwindss($user_config): string {
$downloaded_versions = find_downloaded_tailwind_binaries();
$pinned_version = $user_config->binary_version;
if ($pinned_version) {
if (in_array($pinned_version, $downloaded_versions)) {
return$pinned_version;
} else {
returndownload_tailwind($pinned_version);
}
} else {
if (empty($downloaded_versions)) {
returndownload_tailwind('latest');
} else {
// Here you could check if a newer version exists upstream and inform the user.returnend($downloaded_versions); // assuming versions are sorted in ascending order.
}
}
}
The text was updated successfully, but these errors were encountered:
TL; DR - Would you be open to a PR that makes
tailwind:build
update less aggressively?I came to work today to a failing tailwind build. While investigating this problem,
I discovered that my
./var/tailwind
directory contained at least 4 different versions ofthe tailwind binary, which I presume means that this bundle always looks for and downloads the latest version
of tailwind when running
console tailwind:build
.While I understand that not everyone likes to be chained to strictly pinned dependencies (praise be to Nix), I think that it would be a more sensible default to check if there is any version
of tailwind already downloaded, and if so, only download a different one if a pinned version has been configured, and none of the downloaded versions match the configuration.
Suddenly updating users to a major revision without any notice is a bit jarring.
Let me know if this sounds good to you, and thank you for letting us pin a specific version.
Below is some pseudo code of what I'm thinking:
The text was updated successfully, but these errors were encountered: