Skip to content
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

"math" option in compilerconfig defaults not working #3773

Open
pmonty opened this issue Jan 16, 2023 · 6 comments
Open

"math" option in compilerconfig defaults not working #3773

pmonty opened this issue Jan 16, 2023 · 6 comments

Comments

@pmonty
Copy link

pmonty commented Jan 16, 2023

I am trying to compile some rather large files and was getting
SyntaxError: Error evaluating function 'floor': argument must be a number in \assets\css\less\searchbox.less LRM C:\Projects\LRM\LRM\assets\less\custom.less 232

so added the math option always to my compilerconfig.json.defaults file:

{
  "compilers": {
    "less": {
      "autoPrefix": "",
      "cssComb": "none",
      "ieCompat": true,
      "strictUnits": false,
      "relativeUrls": true,
      "rootPath": "",
      "sourceMapRoot": "",
      "sourceMapBasePath": "",
      "sourceMap": false,
      "math": "always"
    },

but now I get:
--math=always is deprecated and will be removed in the future.

I started a thread over here since it might be a visual studio thing but they told me to come here.
failwyn/WebCompiler#68

Less version: I imagine would be the latest stable as I installed the most recent version of the extension in visual studio
Visual Studio 2022
Windows

@pmonty pmonty added the bug label Jan 16, 2023
@iChenLei
Copy link
Member

cc @matthew-dean

@pmonty
Copy link
Author

pmonty commented Jan 16, 2023

Also will just mention that according to these docs it should still be supported right?
https://lesscss.org/usage/#less-options-math

@pmonty
Copy link
Author

pmonty commented Jan 18, 2023

Was testing just by chance to unblock myself if any of the other options worked. They all showed other errors relating to the actual styling but no deprecated message.

@pmonty
Copy link
Author

pmonty commented Jan 24, 2023

Little bit more investigation during some downtime and looks like its just a warning?

console.warn('--math=always is deprecated and will be removed in the future.');

so why does my build fail then?

@matthew-dean
Copy link
Member

matthew-dean commented Mar 31, 2023

This isn't possible to evaluate without seeing an example repo. The failure would be unrelated to the warning, unless you're using a build system that treats warnings as failures. @iChenLei can you add a requirement to bug reports that a reproducible example is provided?

@iChenLei
Copy link
Member

iChenLei commented Apr 1, 2023

@matthew-dean Ok, sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants