This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In css.prep/src/org/netbeans/modules/css/prep/sass/SassExecutable.java ist a hardcoded parameter "--cache-location", which is always added to the execute commandline. This does not work with libsass/sassc. This parameter is unknown and leads to an error. It should be optional, so other implementations of SASS can be used. The other parameters as well. Maybe you can write these in the compiler options input field as default, hence it is editable.
Taking over. Not a defect, it works as expected. Please, provide exact steps to reproduce your issue (what we need to do to investigate your issue). Thanks.
You will need: http://libsass.org and https://github.com/sass/sassc On OSX you can install it via brew. I edited in Settings > Miscellaneous >CSS Preprocessors the Sass path to my SassC executable. i.e.: /usr/local/bin/sassc In my project properties in CSS Preprocessors i checked "compile sas files on save". On save the output comes up: "/usr/local/bin/sassc" "--cache-location" "/Users/seventyeight/Library/Caches/NetBeans/8.0/sass-compiler" ... SassC does not know this argument "--cache-location" and hence it leads to an error: /usr/local/bin/sassc: illegal option -- -
Fine. Please provide how the command line (all the parameters) should look like in your case. Thanks.
Simplest example would be: "sassc -o css/myoutput.css scss/myinput.scss" or via pipe: "sassc scss/myinput.scss > css/myoutput.css"
We will evaluate it and add support for it if it can work as expected for us. Thanks.
Same problem with node-sass, which uses libsass in the background. I tried making a little batch proxy script, stripping the cache parameter. I got no error but Netbeans keeps waiting for the script to finish. The SCSS did not get compiled either.
Same problem with Linux and current sassc + libsass version The --cache-location needs to be removed Usage for sassc: <code> Usage: sassc [options] [INPUT] [OUTPUT] Options: -s, --stdin Read input from standard input instead of an input file. -t, --style NAME Output style. Can be: nested, compressed. -l, --line-numbers Emit comments showing original line numbers. --line-comments -I, --load-path PATH Set Sass import path. -m, --sourcemap Emit source map. -M, --omit-map-comment Omits the source map url comment. -p, --precision Set the precision for numbers. -h, --help Display this help message. </code> Current Netbeans call: <code> "/usr/bin/sassc" "--cache-location" "/home/username/.cache/netbeans/8.0/sass-compiler" "/pathtoscss/style/onepage.scss" "/pathtoscss/style/onepage.css" </code> Should be <code> "/usr/bin/sassc" "/pathtoscss/style/onepage.scss" "/pathtoscss/style/onepage.css" </code> Here's a little Proxy Script which strips the not needed params to use as workaround in the meantime. Put this file somewhere and put the path in the netbeans sass path config option. You may have to change the path for you sassc executable <code> #!/bin/bash echo "SassC Proxy" if [ $1 == "--version" ]; then echo "Sassc Proxy v1" elif [ -n $3 ] && [ -n $4 ]; then echo "Running: sassc $3 $4" /usr/bin/sassc $3 $4 echo Finished else echo "Params wrong: $*" exit 1 fi exit 0 </code> PS: Netbeans calls for some reason "sasscmd --version" as first step, so make sure you handle that call if you do your own workaround script
Hi! This would be problem with any Sass executable that is not original sass or sass.bat I tried to use 'C:\Ruby193\bin\compass.bat' and it gave me the same error. '--cache-location' should be a configurable option, not a hard-coded parameter. Thank you in advance!
Well, NetBeans supports only the official Sass compiler, at least right now. But this should not be a big problem IMO. Simply: - create a script which prints given parameters; - select this script as Sass compiler in IDE Options; - let NetBeans compile some Sass file. -> Your script will print all parameters NetBeans uses for Sass compilation. First, NetBeans checks the version of Sass compiler whether source-maps can be used or not - for this call, simply return "Sass 3.4.0". Then your script will be called with parameters for compilation - simply ignore those ones your compiler does not support (like "--cache-location") and it should work I guess.
Guys, would it work for you if I add a system property for using libsass? It would mean that you would run NetBeans with this property and parameters like --cache-location would be omitted. Also, does libsass support source-maps? If yes, could anyone provide a sample command line call? Thanks for your cooperation!
(In reply to Tomas Mysik from comment #10) > Guys, would it work for you if I add a system property for using libsass? It > would mean that you would run NetBeans with this property and parameters > like --cache-location would be omitted. Also, does libsass support > source-maps? If yes, could anyone provide a sample command line call? One more question - is support sassc enough? Or are there any other popular clients/interfaces? Please, let me know so we can have this change in NB 8.1 final ;) Thanks.
Yes that should work! For SassC the command would be: > sassc --output-style compressed --sourcemap in.scss out.css If output-style is omitted, the output style will be: nested Personally I use node-sass. Sadly the command is just a tad different > node-sass --output-style compressed --source-map in.scss out.css
(In reply to mbicknese from comment #12) > For SassC the command would be: > > sassc --output-style compressed --sourcemap in.scss out.css > > If output-style is omitted, the output style will be: nested > > Personally I use node-sass. Sadly the command is just a tad different > > node-sass --output-style compressed --source-map in.scss out.css Because the parameters are a bit different, it will be done this way: - if property for libsass is used, no other parameters than "in.scss out.css" will be added by NetBeans (so, no source maps etc.). It means, that if you want to use source maps or compress style (or whatever other parameter), you need to provide them (either in Project Properties as compiler parameters or better directly as sass compiler parameters - it means that in IDE Options intead of "/bin/sassc" one will set "/bin/sassc --output-style compressed --sourcemap"). Please, let me know if this is not acceptable from any reason. Thanks.
sounds perfect to me!
Should be done now, please verify. Ládo, please test that the official Sass support is not broken now :) Instructions: if libsass should be used, start NetBeans with parameter [1]; this parameter can also be added to the <nbinstalldir>/etc/netbeans.conf (see netbeans_default_options variable). Then, the IDE will not add any command line parameter automatically - it means that it is up to user to specify proper CLI parameters (compress style, source maps etc.) for her CLI either in Tools > Options > HTML/JS > CSS Preprocessors or Project Properties dialog (CSS Preprocessors > Compiler Options field). Thanks! [1] -J-Dnb.sass.libsass=true http://hg.netbeans.org/web-main/rev/33893ae1b219
Integrated into 'main-silver', will be available in build *201509020320* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/33893ae1b219 User: Tomas Mysik <tmysik@netbeans.org> Log: #247890 - SASS preprocessor does not support libsass/sassc Unofficial support added only via a system property "nb.sass.libsass".
I checked basic Sass compilation in latest dev build and seems fine. I haven't touched the libsass though :) Product Version: NetBeans IDE Dev (Build 201509030002) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
how can i set system properties to test it ?
(In reply to fehrlich from comment #18) > how can i set system properties to test it ? See comment #15, detailed instructions can be found there.
sry must have been blind. Thank you. I just tested it, now i get the error "sassc.exe: unknown option -- trace". Is this another hard coded parameter ?
(In reply to fehrlich from comment #20) > sry must have been blind. Thank you. You are welcome. > I just tested it, now i get the error "sassc.exe: unknown option -- trace". > Is this another hard coded parameter ? No. You had to specify it - either in IDE Options or Project Properties dialog. Again, see comment #15 for more information. Thanks.
sry didnt know you can set parameters in the project itself. There was still the "--trace" parameter. Now it works perfectly. Thank you very much.
(In reply to fehrlich from comment #22) > sry didnt know you can set parameters in the project itself. There was still > the "--trace" parameter. Now it works perfectly. Great to hear! Marking as VERIFIED then. Thanks for reporting.
*** Bug 256020 has been marked as a duplicate of this bug. ***
The same bug still exists. Why did the bug reappear after being fixed? Sass (compile): "/usr/local/bin/sassc" "--cache-location" "/home/user/.cache/netbeans/8.2/sass-compiler" "--debug-info" "/home/user/www/project-01/scss/style.scss" "/home/user/www/project-01/css/style.css" /usr/local/bin/sassc: unrecognized option '--cache-location' See '/usr/local/bin/sassc -h' Done. --- Product Version: NetBeans IDE 8.2 (Build 201610071157) System: Linux version 4.4.0-53 [Linux Mint] $ sassc -h Usage: sassc [options] [INPUT] [OUTPUT] Options: -s, --stdin Read input from standard input instead of an input file. -t, --style NAME Output style. Can be: nested, expanded, compact, compressed. -l, --line-numbers Emit comments showing original line numbers. --line-comments -I, --load-path PATH Set Sass import path. -P, --plugin-path PATH Set path to autoload plugins. -m, --sourcemap Emit source map. -M, --omit-map-comment Omits the source map url comment. -p, --precision Set the precision for numbers. -a, --sass Treat input as indented syntax. -v, --version Display compiled versions. -h, --help Display this help message. $ sassc -v sassc: 3.4.5 libsass: 3.5.0.beta.3-75-ga617 sass2scss: 1.1.0 sass: 3.5
Please, do not reopen verified issues. Simply create a new one, with exact steps to reproduce. Thank you.