Closed NiklasEi closed 1 month ago
This currently fails my build, because I have multiple scss modules that get combined by basro/stylance-rs and are not all valid without the other modules due to CSS variables.
Also having this issue.
Dug into some source code. Why is there tailwind stuff in the compile_sass
function?
// ...
pub async fn compile_sass(style_file: &SourcedSiteFile, optimise: bool) -> Result<Outcome<String>> {
let mut args = vec![style_file.source.as_str()];
optimise.then(|| args.push("--no-source-map"));
let exe = Exe::Sass.get().await.dot()?;
let mut cmd = Command::new(exe);
cmd.args(&args);
log::trace!(
"Style running {}",
GRAY.paint(format!("sass {}", args.join(" ")))
);
match wait_piped_interruptible("Tailwind", cmd, Interrupt::subscribe_any()).await? {
CommandResult::Success(output) => Ok(Outcome::Success(output.stdout())),
CommandResult::Interrupted => Ok(Outcome::Stopped),
CommandResult::Failure(output) => {
log::warn!("Tailwind failed with:");
println!("{}", output.stderr());
Ok(Outcome::Failed)
}
}
}
To me that looks like someone copy pasted the tailwind one and forgot/didn't care to change the inner tailwind naming
On Sat, Mar 9, 2024, at 5:23 AM, Patrick Oberholzer wrote:
Dug into some source code. Why is there tailwind stuff in the
compile_sass
function?// ... pub async fn compile_sass(style_file: &SourcedSiteFile, optimise: bool) -> Result<Outcome
> { let mut args = vec![style_file.source.as_str()]; optimise.then(|| args.push("--no-source-map")); let exe = Exe::Sass.get().await.dot()?; let mut cmd = Command::new(exe); cmd.args(&args); log::trace!( "Style running {}", GRAY.paint(format!("sass {}", args.join(" "))) ); match wait_piped_interruptible("Tailwind", cmd, Interrupt::subscribe_any()).await? { CommandResult::Success(output) => Ok(Outcome::Success(output.stdout())), CommandResult::Interrupted => Ok(Outcome::Stopped), CommandResult::Failure(output) => { log::warn!("Tailwind failed with:"); println!("{}", output.stderr()); Ok(Outcome::Failed) } }
}
— Reply to this email directly, view it on GitHub https://github.com/leptos-rs/cargo-leptos/issues/254#issuecomment-1986856353, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVBTCL3H2D52XAFRTF6V23YXMEONAVCNFSM6AAAAABDNRC6E2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWHA2TMMZVGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>
@benwis Sounds likely to me. If I find the root of this issue and get around to opening a PR, I'll include a fix for that. It doesn't seem urgent, just problematic for debugging. @NiklasEi did you think Tailwind was failing because it said "Tailwind" (understandable) or did you confirm that? Might not be tailwind.
Also, I'll open a separate issue for whatever is going on right now with mine, since it seems not to be quite right for this issue.
@benwis Sounds likely to me. If I find the root of this issue and get around to opening a PR, I'll include a fix for that. It doesn't seem urgent, just problematic for debugging. @NiklasEi did you think Tailwind was failing because it said "Tailwind" (understandable) or did you confirm that? Might not be tailwind.
I did not confirm it by looking into the code. It might not have been Tailwind in the end then, just Sass.
@nvim-ftw Would you like to open a quick PR to patch it to say Sass and not Tailwind, so more people are not confused?
@benwis I'll do it tonight!
On Thu, Mar 14, 2024 at 5:00 PM Ben Wishovich @.***> wrote:
@nvim-ftw https://github.com/nvim-ftw Would you like to open a quick PR to patch it to say Sass and not Tailwind, so more people are not confused?
— Reply to this email directly, view it on GitHub https://github.com/leptos-rs/cargo-leptos/issues/254#issuecomment-1998474773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVITPTKO4WGSWDRXC2HYVPLYYIFVHAVCNFSM6AAAAABDNRC6E2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGQ3TINZXGM . You are receiving this because you were mentioned.Message ID: @.***>
Resolved in #267
To my understanding of the readme, Tailwind should only run if
tailwind-input-file
is set. I do not have it set, but Tailwind still runs duringcargo leptos watch
.