-
Notifications
You must be signed in to change notification settings - Fork 39
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
sbt-less seems to be using an old version of less #136
Comments
Which node version are you using? Please post the output of Also, can you please check if there is a
? |
@bwbecker I just merged #138 which adds the same calc code you show above in a scripted test. Please try following:
cd src/sbt-test/sbt-less-plugin/less-same-webjars-different-version/
sbt --sbt-version 1.10.0 -Dproject.version=2.0.1 assets
cat target/web/public/main/css/main.css
h1 {
color: blue;
top: calc(-1.7rem + 2rem / 2 - 5px);
}
$ tree -L 1 ./project/target/node-modules/webjars/less
./project/target/node-modules/webjars/less
├── 3.8.1
└── 4.2.0
3 directories, 0 files Maybe we can figure out what is going on here... |
bwbecker@beta oat-degreeAudit3 % node --version
|
@bwbecker ok thanks. In your project, please run
and please post the dependency tree here. |
Actually, also what does the |
The above seemed unexpected; I expected some output from dependencyTree. So I re-ran it as follows:
See the attached file. The tree from the first command is huge -- nearly 20,000 lines. That has always struck me as strange, but I've never investigated. Finally, the version in package.json:
|
I am a bit lost, I tried lots of stuff now. It actually does look like you are using less 4.2.0... Anyway... lets gets a bit more "intense" now... Can you please update to this temporary sbt-less 2.0.2-M1 version and make sure to clean your target folders and then start sbt and run |
@mkurz -- I have meetings today that prevent me from working on this. I should be able to get to it tomorrow. |
@mkurz -- Matthias, I apologize for apparently wasting your time. I thought I was extremely careful to verify this, but today I reverted my work-around and the original less code does indeed compile as expected. In reviewing my commit logs, my best theory is that I updated sbt-less from 1.1.2 to 2.0.1 and did a reload within SBT, forgetting that doesn't reload plugins. I'm finding it hard to believe that I went for several hours of debugging and writing up the bug report without restarting SBT, but that's the only theory I have. Again, my apologies. |
No problem, happy it works! |
sbt-less
andlessc
are producing different output. In particular,lessc
(v4.2.0) compilesto
while
sbt-less
compiles the same code toThis is consistent with what I've read about OLD versions of
less
. Theless
documentation describes a calc exception beginning with the v3.0.0 release that "For CSS compatibility, calc() does not evaluate math expressions, but will evaluate variables and math in nested functions." This is what I need but am not getting withsbt-less
!This is a Play! project. I have
addSbtPlugin("com.github.sbt" % "sbt-less" % "2.0.1")
(the latest version according to the github sbt-less page)in myplugins.sbt
. When I clean the project,find . -name "main.css"
doesn't find any files. After compiling the running the project, they are found and match what I see in the browser.There is a file in my project,
project/target/less/lessc.js
that matches a file in thesbt-less
repo. It containsless = requireIfExists("less/4.2.0", "less")
. I take the4.2.0
to be a version (good sign! That's recent!). But I don't think that's the version I'm actually getting.The text was updated successfully, but these errors were encountered: